Jonathan Hudson <jonathan(_at_)daria(_dot_)co(_dot_)uk>:
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) ?
Upgrade. In 5.7.2 that same section of code reads like this:
else
{
char errbuf[POPBUFSIZE];
int res;
if ((res = handle_smtp_report(ctl, msg))==PS_REFUSED)
return(PS_REFUSED);
strcpy(errbuf, idp->id);
strcat(errbuf, ": ");
strcat(errbuf, smtp_response);
xalloca(from_responses[*bad_addresses],
char *,
strlen(errbuf)+1);
strcpy(from_responses[*bad_addresses], errbuf);
(*bad_addresses)++;
idp->val.status.mark = XMIT_RCPTBAD;
if (outlevel >= O_VERBOSE)
report(stderr,
_("%cMTP listener doesn't like recipient address
`%s'\n"),
ctl->listener, addr);
}
}
if (*bad_addresses)
I think the PS_REFUSED check may solve your problem.
--
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>
"The state calls its own violence `law', but that of the individual `crime'"
-- Max Stirner