--- parse.c.orig Wed Mar 18 20:22:12 1998 +++ parse.c Wed Mar 18 20:24:47 1998 @@ -517,10 +517,41 @@ uschar *s = (uschar *)mailbox; uschar *t = (uschar *)yield; *domain = 0; +/* The following code by djc@microwave.com allows broken + MAIL FROM: lines that are sent by Worldgroup BBS systems +*/ + +/* Addresses in the form (foo bar)@baz.frob get converted to "foo bar"@baz.frob */ + +if (s[0] == '(') +{ char *ket = strchr(s, ')'); + if (ket != NULL) + { *s = '\"'; + *ket = '\"'; } + } + +/* Addresses in the form <(foo bar)@baz.frob> get converted to <"foo bar"@baz.frob> */ + +if (s[0] == '<') + if (s[1] == '(') + { { char *ket = strchr(s, ')'); + char *keu = strchr(s, '('); + if (ket != NULL) + { *keu = '\"'; + *ket = '\"'; + } + } + } + +/* The preceding code by djc@microwave.com allows broken + MAIL FROM: lines that are sent by Worldgroup BBS systems +*/ + + /* At the start of the string we expect either an addr-spec or a phrase preceding a . If groups are allowed, we might also find a phrase preceding a colon and an address. If we find an initial word followed by a dot, strict interpretation of the RFC would cause it to be taken as the start of an addr-spec. However, many mailers break the rules