OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Restricting authorized email destinations for some users

From: Bill Cole (postfixlists-070913billmail.scconsult.com)
Date: Sat Sep 29 2007 - 09:42:54 CDT


At 4:05 PM +0200 9/29/07, Sylvain MEDEOT wrote:
>Hi,
>
>I need to restrict some of my local mail accounts in order for them
>to be allowed to send
>mails only to specific email adresses.
>
>accountmydomain.com => accountanotherdomain.com
> => account2anotherdomain2.com
> => *mydomain.com
>
>To do so, I was thinking about regexp in header_check but I am not
>sure that it is the
>best way to do so.

You could not do this with header_checks, because it only operates on
one header at a time.

>Can somebody on the list point me to the best way to do that ?

The traditional Postfix approach for this would be a "policy daemon."
See http://www.postfix.org/SMTPD_POLICY_README.html

Another workable approach for recent (>2.3) Postfix would be a
'milter' add-on. I am a Sendmail user as well so I lean towards
that approach. The most common milter used for ad hoc arbitrary rules
like this is MIMEDefang, which allows you to drop your own perl in to
act at the different steps in the SMTP transaction.

--
Bill Cole
billscconsult.com