block emails with Fetchmail...

James Wilkinson fedora at westexe.demon.co.uk
Tue Jun 20 12:36:58 UTC 2006


Kostas Sfakiotakis wrote:
> Am not sure that i fully understand that . Fetchmail fetches email
> from the remote POP3 Server then it alters the To address as to make
> it suitable for local delivery .

It shouldn't do: either it will create an *envelope* (SMTP-level)
RCPT-TO address based on the address given in the fetchmail.conf file,
or (in multidrop mode) it will try to detect a suitable address from the
mail headers (e.g. suitable Received lines: see the envelope keyword in
fetchmail.conf).

But sendmail should already be configured to accept mail that is
addressed to users on that machine. It's not being tricked.

For example, I'm running Postfix here. But if I was running Sendmail,
Sendmail would be told that it should accept all e-mail to
westexe.demon.co.uk. Fetchmail would download e-mail over POP3 and grab
the fedora at westexe.demon.co.uk e-mail address out of the Received:
headers Demon add, and send the e-mail MAIL FROM whoever, RCPT TO:
<fedora at westexe.demon.co.uk> to Sendmail. So of course Sendmail would
accept it.

In the same way, if I let Sendmail listen on the local network, other
computers on that network could SMTP local e-mails direct to Sendmail,
and Sendmail would know that it was to a local recipient, to be handled
on this machine.

(Note: there is the possibility to configure Sendmail to reject e-mail
with an antispam code, and for Fetchmail to understand this. This should
mean that fetchmail doesn't download the message body. But it's already
too late to properly reject the e-mail -- all you can do is silently
drop it, accept it and use procmail to store it in a spam box, or send
out more spam in the form of rejection notices. This last option is
STRONGLY NOT ADVISED!

See the antispam keyword in fetchmailrc and man fetchmail for more
details.)

James.
-- 
E-mail address: james | WARNING:  Pressing CTRL+ALT+DEL again will restart
@westexe.demon.co.uk  | your computer.  Then again, what won't?  You will
                      | lose unsaved information, and even supposedly saved
                      | information, in any case.  -- David P. Murphy




More information about the fedora-list mailing list