diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | fetchmail.man | 25 | ||||
-rw-r--r-- | sink.c | 30 |
4 files changed, 37 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in index 415700d4..0494a0cb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,7 +3,7 @@ # If you're running QNX, we can't assume a working autoconf. # So just uncomment all the lines marked QNX. -VERS=4.6.7 +VERS=4.6.8 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -5,9 +5,10 @@ fetchmail-4.6.8 (): <acme@conectiva.com.br> and Jorge Godoy <jorge@bestway.com.br>. First supported language is Brazilo-Portuegese (LC_ALL=pt_BR). * Fixed Debian Bug#29913: -M on the command line causes SEGV in daemon mode. -* Emit a message when fetchlimit is reached. +* Emit an informational message when fetchlimit is reached. +* Added bounce-mail capability on common error types. -There are 247 people on fetchmail-friends and 309 on fetchmail-announce. +There are 246 people on fetchmail-friends and 309 on fetchmail-announce. fetchmail-4.6.7 (Sat Nov 21 13:59:47 EST 1998): * Gerald Britton's patches to enable Hesiod support. diff --git a/fetchmail.man b/fetchmail.man index fbc34e0f..6c365754 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -841,6 +841,24 @@ is fetching from an IMAP server, the antispam response will be detected and the message rejected immediately after the headers have been fetched, without reading the message body. Thus, you won't pay for downloading spam message bodies. +.P +Mail that is spam-blocked triggers an RFC1892 bounce message informing +the originator that we do not accept mail from it. + +.SH SMTP/ESMTP ERROR HANDLING +Besides the spam-blocking described above,fetchmail takes special +actions on the following SMTP/ESMTP error responses +.TP 5 +452 (insufficient system storage) +Leave the message in the server mailbox for later retrieval. +.TP 5 +552 (message exceeds fixed maximum message size) +Delete the message from the server. Send bounce-mail to the originator. +.TP 5 +553 (invalid sending domain) +Delete the message from the server. Send bounce-mail to the originator. +.P +Other errors trigger an attempt .SH THE RUN CONTROL FILE The preferred way to set up fetchmail is to write a @@ -1750,9 +1768,8 @@ temporarily discards any suid privileges it may have while running the MDA. For maximum safety, however, don't use an mda command containing %F or %T when fetchmail is run from the root account itself. .PP -LMTP support is untested. Mail could be lost if some but not all -deliveries of a message addressed to multiple users fail; such -deliveries are not retried. +Fetchmail's method of sending bouncemail requires that port 25 of localhost +be available for sending mail via SMTP. .PP Send comments, bug reports, gripes, and the like to the fetchmail-friends list <fetchmail-friends@ccil.org>. An HTML FAQ is @@ -1768,7 +1785,7 @@ SMTP/ESMTP: RFC 821, RFC 1869, RFC 1652, RFC 1870, RFC1983, RFC 1985 .TP 5 mail: -RFC 822 +RFC 822, RFC 1892 .TP 5 POP2: RFC 937 @@ -273,7 +273,8 @@ static int send_bouncemail(struct msgblk *msg, || SMTP_data(sock) != SM_OK) return(FALSE); - error(0, 0, "SMTP: (bounce-message body)"); + if (outlevel >= O_VERBOSE) + error(0, 0, "SMTP: (bounce-message body)"); /* bouncemail headers */ SockPrintf(sock, "Return-Path: <>"); @@ -567,6 +568,9 @@ int open_sink(struct query *ctl, struct msgblk *msg, responses[0] = smtp_response; + /* required by RFC1870; sets us up to be able to send bouncemail */ + SMTP_rset(ctl->smtp_socket); + if (str_find(&ctl->antispam, smtperr)) { /* @@ -582,7 +586,6 @@ int open_sink(struct query *ctl, struct msgblk *msg, * 571 = sendmail's "unsolicited email refused" * */ - SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */ send_bouncemail(msg, _("We do not accept mail from you.)\r\n"), 1, responses); @@ -613,7 +616,6 @@ int open_sink(struct query *ctl, struct msgblk *msg, * this is not an actual failure, we're very likely to be * able to recover on the next cycle. */ - SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */ return(PS_TRANSIENT); case 552: /* message exceeds fixed maximum message size */ @@ -622,7 +624,6 @@ int open_sink(struct query *ctl, struct msgblk *msg, * ESMTP server. Don't try to ship the message, * and allow it to be deleted. */ - SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */ send_bouncemail(msg, _("This message was too large.\r\n"), 1, responses); @@ -633,20 +634,16 @@ int open_sink(struct query *ctl, struct msgblk *msg, * These latter days 553 usually means a spammer is trying to * cover his tracks. */ - SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */ send_bouncemail(msg, _("Invalid address.\r\n"), 1, responses); return(PS_REFUSED); - default: /* retry with postmaster's address */ - if (SMTP_from(ctl->smtp_socket,run.postmaster,options)!=SM_OK) - { - error(0, -1, _("%cMTP error: %s"), - ctl->listener, - smtp_response); - return(PS_SMTP); /* should never happen */ - } + default: /* bounce the error back to the sender */ + send_bouncemail(msg, + _("General SMTP/ESMTP error.\r\n"), + 1, responses); + return(PS_REFUSED); } } @@ -825,18 +822,15 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) if (errors == 0) return(TRUE); /* all deliveries succeeded */ else - { /* * One or more deliveries failed. * If we can bounce a failures list back to the sender, * return TRUE, deleting the message from the server so - * it won't be re-forwarded on subsequent poll - * cycles. + * it won't be re-forwarded on subsequent poll cycles. */ return(send_bouncemail(msg, - "LSMTP partial delivery failure.\r\n", + _("LSMTP partial delivery failure.\r\n"), errors, responses)); - } } } |