Hi,
If a mail is received for a non-existent user, the mail body still
gets downloaded (for IMAP) and sent to the postmaster. I tried setting
the postmaster to an empty value:
set postmaster ""
to avoid downloading the body when it is known that there is no valid
user in the header.
The body was not downloaded (as expected). However, that was treated
as an SMTP error:
can't even send to !
The following patch fixes that:
===========================================================================
diff -Naur fetchmail-5.8.10.orig/sink.c fetchmail-5.8.10/sink.c
--- fetchmail-5.8.10.orig/sink.c Mon Jun 25 05:11:40 2001
+++ fetchmail-5.8.10/sink.c Tue Jun 26 10:50:38 2001
@@ -709,6 +709,13 @@
*/
if (!(*good_addresses))
{
+ if (!run.postmaster[0])
+ {
+ if (outlevel >= O_VERBOSE)
+ report(stderr, _("no address matches; no postmaster
set.\n"));
+ SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */
+ return(PS_REFUSED);
+ }
if (strchr(run.postmaster, '@'))
strncpy(addr, run.postmaster, sizeof(addr));
else
===========================================================================
Sunil Shetye.