tmp blocking new incomming mail

Gary Alexander garyalex at
Fri Jun 6 10:49:45 IST 2008

2008/6/6 Jan Agermose <ja at>:
> hi
> I want to block for new mails with out stopping mailscanner handling mails
> already queued and I dont want to do it by sending a "get back later" error
> since this will not ofload to the 2. MX correct? So I was thinking that I
> could simply block using iptables but Im not sure how to write the rule with
> out stopping Mailscanner completly. But as I understand it the incomming
> sendmail is listening on eht0 and the outgoing is listening on the
> lo-interface? So if I block port 25 on eth0 only then Mailscanner will still
> be able to process all the mails queued already?
> regards
> Jan

You can do it with iptables:

iptables -I INPUT -i eth0 -p tcp -m tcp --dport 25 -j REJECT

That's applicable if eth0 is your external interface to the internet...

Open Answers to IT Questions -
Recycle your unwanted goods -

More information about the MailScanner mailing list