fetchmail-friends
[Top] [All Lists]

[fetchmail]fetchmail, postfix and spam

2001-03-08 14:21:34
I really like postfix + fetchmail apart from the 571 issue. 

Postfix reports rejects from its access.db after the RCPT TO: rather
than the MAIL FROM: bit. This causes soem problem with fetchmail, as
it will send the bouse message, then try to forward to postmaster,
which fails, because its not a local problem (postfix again rejects
the sender) ! Fetchmail then exits, 

fetchmail: Query status=10 (SMTP)

leaving the offending mail on the server, ad infinitum. Huum maybe
this is postfix problem ....

On the premise that I feel happier hacking fetchmail, I end up with
the somewhat ugly patch v 5.5.5.

--- /tmp/fetchmail-5.5.5/sink.c Tue Sep 26 09:03:21 2000
+++ sink.c      Thu Mar  8 21:18:45 2001
@@ -37,6 +37,8 @@
 #include  "smtp.h"
 #include  "i18n.h"
 
+#define SORDID_POSTFIX_HACK
+
 /* BSD portability hack...I know, this is an ugly place to put it */
 #if !defined(SIGCHLD) && defined(SIGCLD)
 #define SIGCHLD        SIGCLD
@@ -803,7 +805,12 @@
                else
                {
                    char        errbuf[POPBUFSIZE];
-
+#ifdef SORDID_POSTFIX_HACK
+                   if (str_find(&ctl->antispam, atoi(smtp_response)))
+                   {
+                       return(handle_smtp_report(ctl, msg));
+                   }
+#else              
                    strcpy(errbuf, idp->id);
                    strcat(errbuf, ": ");
                    strcat(errbuf, smtp_response);
@@ -819,6 +826,7 @@
                        report(stderr, 
                              _("%cMTP listener doesn't like recipient address 
`%s'\n"),
                              ctl->listener, addr);
+#endif             
                }
            }
        if (*bad_addresses)


Any other suggestions (please don't suggest another MTA) ?

Regards


<Prev in Thread] Current Thread [Next in Thread>