[fetchmail]Solution: MDA returned nonzero status 65
Matthias Andree
matthias.andree@gmx.de
Tue, 26 Apr 2005 11:05:27 +0200
On Mon, 25 Apr 2005, Barsalou wrote:
> I have been getting these messages which I believe are "Host unknown"
> errors from sendmail. After some bit of research, I have decided that
> all of these (although all is a strong word) entries are SPAM. My
> solution to this was to write this script called spamstop:
>
> #!/bin/sh
> /usr/sbin/sendmail $1 $2 $3 $4 $5
Just use "$@" unless you have an ancient shell that wants something
else.
> if [ $? == 65 ] ; then
> exit 0
> fi
> exit $?
This is bogus. 1. POSIX shells don't have ==, use = instead.
2. The if [ ... spoils $?.
Try something like
#! /bin/sh
/usr/sbin/sendmail "$@"
a=$?
if [ $a = 65 ] ; then
exit 0
fi
exit $a
> This traps those errors and fetchmail flushes the mail. I tried using
> 'antispam 65' but for whatever reason, that didn't work.
antispam applies to SMTP replies, not to sendmail exit status codes.
> Additionally I have been getting:
>
> fetchmail: Query status=2 (SOCKET)
>
> This I was able to resolve by using:
>
> antispam 451
For an MDA configuration? Looks like rather like some random hiccup.
As written above, antispam does not apply to sendmail exit codes.
> Also, for this to work I have an mda line that looks like this:
>
> mda "~/spamstop -i -oem -f %F %T"
>
> Can anyone see a better way to deal with this?
Re-read the sendmail operation manual for what -oem does and if you
really want the m in there.
--
Matthias Andree