diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-12-18 16:48:24 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-12-18 16:48:24 +0000 |
commit | 417ed3307c628d8c8daad2da6a594f1fbf6015a3 (patch) | |
tree | 09f04ba3e7c5e2f88214375219e676800573596f | |
parent | 4a450d202eef80e016e6778adf1de185004be8b4 (diff) | |
download | fetchmail-417ed3307c628d8c8daad2da6a594f1fbf6015a3.tar.gz fetchmail-417ed3307c628d8c8daad2da6a594f1fbf6015a3.tar.bz2 fetchmail-417ed3307c628d8c8daad2da6a594f1fbf6015a3.zip |
Avoid postmaster screwage.
svn path=/trunk/; revision=2285
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | sink.c | 13 |
2 files changed, 15 insertions, 3 deletions
@@ -1,5 +1,10 @@ Release Notes: +fetchmail-4.7.2 (): +* Don't append the destination address to a postmaster name containing @. + +There are 246 people on fetchmail-friends and 329 on fetchmail-announce. + fetchmail-4.7.1 (Fri Dec 18 03:02:22 EST 1998): * FEATURE FREEZE IS NOW IN EFFECT! No new features until after 5.0.0. * Enable fetchmail to build correctly on systems without socketpair. @@ -627,7 +627,9 @@ int open_sink(struct query *ctl, struct msgblk *msg, else /* forward to an SMTP or LMTP listener */ { const char *ap; - char options[MSGBUFSIZE], addr[128], **from_responses; + char options[MSGBUFSIZE]; + char addr[HOSTLEN+USERNAMELEN+1]; + char **from_responses; int total_addresses; /* build a connection to the SMTP listener */ @@ -729,11 +731,16 @@ int open_sink(struct query *ctl, struct msgblk *msg, */ if (!(*good_addresses)) { + if (strchr(run.postmaster, '@')) + strcpy(addr, run.postmaster); + else + { #ifdef HAVE_SNPRINTF - snprintf(addr, sizeof(addr)-1, "%s@%s", run.postmaster, ctl->destaddr); + snprintf(addr, sizeof(addr)-1, "%s@%s", run.postmaster, ctl->destaddr); #else - sprintf(addr, "%s@%s", run.postmaster, ctl->destaddr); + sprintf(addr, "%s@%s", run.postmaster, ctl->destaddr); #endif /* HAVE_SNPRINTF */ + } if (SMTP_rcpt(ctl->smtp_socket, addr) != SM_OK) { |