+1.2.10
+ o Fix nasty bug in the new 1.2.9 find_email_adr() making comma in
+ quoted text in From: being discarded as invalid
+ o Simply make all addresses lowercase before doing anything else
+ wrt. sub/unsub and bounce
o Add czech listtexts (Lukas Hluze)
o Make non list emails (subconf, moderation etc.) also honor relayhost
and smtpport
struct email_container *find_email_adr(const char *str,
struct email_container *retstruct)
{
+ char *c1 = NULL, *c2 = NULL;
char *p;
char *s;
char *cur;
cur = p;
+oncemore:
p = strchr(p, ',');
if (p) {
/* If there's a comma, replace it with a NUL, so
- * cur will only have one address in it. */
- *p = '\0';
- p += 1;
+ * cur will only have one address in it. Except
+ * it's not in ""s */
+ c1 = strchr(cur, '"');
+ if(c1) {
+ c2 = strchr(c1+1, '"');
+ }
+ if(c2) {
+ if(*(c2-1) == '\\') {
+ *c2 = ' ';
+ c2 = NULL;
+ goto oncemore;
+ }
+ }
+ if(c2 && c2 < p) {
+ *p = '\0';
+ p += 1;
+ } else {
+ *p = ' ';
+ goto oncemore;
+ }
}
while(cur && ((' ' == *cur) ||
int main(int argc, char **argv)
{
- int opt, fd, dsnbounce = 0;
+ int opt, fd, dsnbounce = 0, i = 0;
char *listdir = NULL, *address = NULL, *number = NULL;
char *bindir, *mlmmjsend, *savename;
- char *mailname = NULL, *bfilename, *a, *buf;
+ char *mailname = NULL, *bfilename, *a, *buf, *lowcaseaddr;
size_t len;
time_t t;
int probe = 0;
a = strrchr(address, '@');
*a = '=';
}
+
+ /* Make the address lowercase */
+ lowcaseaddr = mystrdup(address);
+ i = 0;
+ while(lowcaseaddr[i]) {
+ lowcaseaddr[i] = tolower(lowcaseaddr[i]);
+ i++;
+ }
+ address = lowcaseaddr;
if(number != NULL && probe != 0) {
fprintf(stderr, "You can only specify one of -n or -p\n");