Re: fetchmail not fetchaing spam

On Mon, 28 Jul 2008, houghi wrote:-

I am using fetchmail to retrieve my mail from my hosting. They arrive
there, but can not be retrieved by fetchmail. This means they stay at
the provider, slowly filling up my mailbox and giving errors on my box.

1) Header of a spam mail:
Return-Path: <mate-sedrob@>

How did That's not good. That address should never have been accepted as
it's missing a host name. As you can guess, the sender is probably a bot
with broken spamware. The other broken bit of software is at the
receiver. It is broken as mail with such a broken sender shouldn't be
accepted. As an example of what should have happened with a properly
configured server is this:

davjam@adder:/local2/possible-viruses> telnet localhost 25
Connected to localhost.
Escape character is '^]'.; ESMTP
220-By sending mail to this server
220-you consent to being scanned for
220-open proxies or be tested to
220-ensure you arent an open relay.
220-If this is not acceptable, disconnect now.
220-This server has a no UBE/UCE policy.
220-The sending of UBE/UCE to this
220-server will result in your server
220-being added to the local
220-blocklist and could also
220-result in a short recital of Vogon poetry.
220-For your information, the local time is now
220 Mon, 28 Jul 2008 19:53:35 +0100'
EHLO localhost Hello localhost [], pleased to meet you
250 HELP
mail from: <someone@>
553 5.1.3 <someone@>... Hostname required
250 2.0.0 Reset state
221 2.0.0 closing connection
Connection closed by foreign host.


2) log error:
Jul 28 20:17:42 penne postfix/smtpd[8750]: warning: Illegal address
syntax from localhost[] in MAIL command: <mate-sedrob@>

And here's the log entry produced by your local server doing the Right
Thing (TM) and rejecting the broken mail sender address.

Is there anything I can do to retrieve that mail with fetchmail so that
it will be killed?

I don't know about using fetchmail to retrieve it. Your local server is
correctly rejecting the mail as the return path should be valid but, for
this mail, it isn't. Unfortunately, because they are rejected, fetchmail
doesn't mark them as received and so they sit there "forever", or until
you either manually delete the bad mail, or your host deletes them.

As a temporary measure, what you could do with is something that will
log in to the mailbox, delete the bad mails and then let fetchmail do
its job.

What you could really do with is for your mail host to fix their
server(s) so it/they reject such obviously bad mail.

David Bolt

-- OGR@100Mnodes, RC5-72@15Mkeys
SUSE 10.1 32 | | openSUSE 10.3 32bit | openSUSE 11.0 32bit
| openSUSE 10.2 64bit | openSUSE 10.3 64bit | openSUSE 11.0 64bit
RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.11