diff options
-rw-r--r-- | fetchmail.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c index 3e5a991d..08a762b4 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -180,6 +180,18 @@ char **argv; else strcpy(hostp->localname, user); + /* + * Turn the localname into a full Internet address... + * otherwise exim (somebody's smail equivalent) becomes + * annoyed much later when the SMTP interface tries to + * ship it a local name in a RCPT TO command. + */ + if (strchr(hostp->localname, '@') == 0) + { + strcat(hostp->localname, "@"); + strcat(hostp->localname, hostp->smtphost); + } + /* check that delivery is going to a real local user */ if ((pw = getpwnam(user)) == (struct passwd *)NULL) exit(PS_SYNTAX); /* has to be from bad rc file */ |