procmail
[Top] [All Lists]

Re: yet another procmail recipe

2006-10-31 09:19:14
On 10/30/06, Kanda Nikornpongsin <thaichili(_at_)hotmail(_dot_)com> wrote:
Not sure if this is a qmail or procmail question as I am pretty new to both.

I would like to DROP all mails that are NOT sending to "mydomain.com".
Originally our /etc/tcp.smtp on the qmail server was set as a "REALYCLIENT"
for a particular internal ip. I remove "RELAYCLINT" part and it is no longer
allow any mails relay to this host. But the host that sends out e-mails got
a bunch of reject messages. I would like to change the behavior a bit so
that the mails just gets dropped instead of bouncing the messages back?

Hi Kanda,

The best fix for this would be to reconfigure the problem host to use
another relay.  If you don't have access to that server, then you
could block it entirely with a firewall rule.  That would put an end
to any messages on your end and any bounces on theirs.

But if you still want to accept mail from this host, but just drop all
its messages, you'll need to make sure that qmail uses the global
procmail file.  There's a script for this here: /var/qmail/boot/proc.
If that doesn't exist on your system, it's in the source code as
proc.sh.  (Hmmm, I see the latest qmail is 1.03 which came out in 98).

You'll need to copy that script to /var/qmail/rc, I think, and then
restart qmail.  Then you can add all the rules you want to
/etc/procmailrc.  You'll probably want to match the Received: header
and then drop any messages from the problem host.

-- 
-- Matt Dunford -- zenmatic(_at_)gmail(_dot_)com

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>