vacation(1) doesn't work: smtpd[39062]: ccca6c1750c9b32e smtp failed-command command="RCPT TO:<<d...@example.com>> " result="501 5.1.3 Recipient address syntax error"
--- vacation.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vacation.c b/vacation.c index 7105f56..72f02f7 100644 --- a/vacation.c +++ b/vacation.c @@ -179,6 +179,17 @@ main(int argc, char *argv[]) /* NOTREACHED */ } +void +fixfrom(void) +{ + char *p; + + if ((p = strchr(from, '<'))) { + memmove(from, p + 1, strlen(p)); + from[strcspn(from, ">")] = 0; + } +} + /* * readheaders -- * read mail headers @@ -223,6 +234,7 @@ readheaders(void) *p = '\0'; (void)strlcpy(from, buf + 5, sizeof(from)); from[strcspn(from, "\n")] = '\0'; + fixfrom(); if (junkmail()) exit(0); } @@ -252,6 +264,7 @@ readheaders(void) exit(1); } from[strcspn(from, "\n")] = '\0'; + fixfrom(); if (junkmail()) exit(0); break; -- 2.44.0