Index: [Article Count Order] [Thread]

Date:  Fri, 29 Feb 2008 07:20:53 +0100
From:  Michael Stauber <bq (at mark) solarspeed.net>
Subject:  [coba-e:12146] Re: AW:  disable remote mail for root user
To:  coba-e (at mark) bluequartz.org
Message-Id:  <200802290720.53576.bq (at mark) solarspeed.net>
In-Reply-To:  <10a601c87a54$0ec4d000$6302a8c0@x2>
References:  <0c1301c878cb$11efedd0$6302a8c0@x2> <10a601c87a54$0ec4d000$6302a8c0@x2>
X-Mail-Count: 12146

Hi Florian,

> > what is the best way to disable remote mail to user root@sitename on
> > a cbq system? i'd like to reject everything to root@whateversite that
> > does not originate from localhost.
>
> no ideas on this? ;)

If you want to automatically discard ALL messages to root, then 
edit /etc/mail/aliases and change ...

# Person who should get root's mail
root:           admin

... to ...

# Person who should get root's mail
root:           /dev/null

This is insofar more efficient as /etc/mail/aliases is rather static and 
doesn't get overwritten by the GUI. The only negative side effect that I see 
there is that those emails still get accepted and processed before they're 
being trash-binned, which may be undesireable.

Anther way to really filter emails based on certain criteria (like: email 
doesn't originate from localhost) is to either create a procmailrc rule, or a 
custom SpamAssassin rule (if you're using SpamAssassin), which deals with 
that aspect by adding some logic to it.

The procmailrc rule also will only kick on when the emails are already past 
Sendmail. The SpamAssassin rule (if your SpamAssassin is implemented through 
a Milter) can reject the email while it's being processed. But like said: 
That really depends on the way SpamAssassin is implemented.

-- 
With best regards,

Michael Stauber