addresses with a global data-based hack. At least the global
data is hidden in addrsbr.c.
void mnfree(struct mailname *);
int ismymbox(struct mailname *);
+/*
+ * Enable Email Address Internationalization, which requires
+ * support of 8-bit addresses.
+ */
+void enable_eai();
+
/*
* Parse an address header, and return a sequence of email addresses.
* This function is the main entry point into the nmh address parser.
static char *note = NULL;
static char err[BUFSIZ];
static char adr[BUFSIZ];
+static int eai = 0;
+
+void
+enable_eai() {
+ eai = 1;
+}
char *
getname (const char *addrs)
{
struct adrx *ap;
- const char *const eai = context_find ("eai");
pers = mbox = host = route = grp = note = NULL;
err[0] = '\0';
- if ((ap = getadrx (addrs ? addrs : "", eai && strncasecmp (eai, "utf-8", 5) == 0)) == NULL) {
+ if ((ap = getadrx (addrs ? addrs : "", eai)) == NULL) {
return NULL;
}
/* Enable SMTPUTF8. */
*eai = 1;
- /* Add eai profile entry, to pass utf-8 setting to
- getname()/getadrx(). */
- add_profile_entry ("eai", "utf-8");
+ /* Enable passing of utf-8 setting to getname()/getadrx(). */
+ enable_eai();
}
}