OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: need to reject legitimate mail with various SMTP error codes

From: Magnus Bäck (magnusdsek.lth.se)
Date: Mon Oct 03 2005 - 15:37:54 CDT


On Monday, October 03, 2005 at 22:30 CEST,
     "N.J. Thomas" <njtayvali.org> wrote:

> I'm testing a program that sends mail on our internal LAN. I'd like to
> set up a dummy MTA that will reject legitimate mail with various SMTP
> error codes of my own choosing -- to see how our program will respond.
>
> Is the correct way to do this with Postfix in auth.cf with the
> smtpd_client_restrictions parameter and reject/reject_code restrictions?
>
> Short of hacking up the source code, what is the best way to do this?

Postfix has no auth.cf, but I assume you mean main.cf.

Simpler cases can be managed with the basic Postfix features like
smtpd restrictions, and header_checks/body_checks, but if you want
more control a custom policy server is the way to go.

http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.postfix.org/SMTPD_POLICY_README.html
http://www.postfix.org/BUILTIN_FILTER_README.html

--
Magnus Bäck
magnusdsek.lth.se