OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: Reject mail to specific addresses?

From: Michael Breton (mbretoncommtel.net)
Date: Mon Jun 02 2003 - 10:08:44 CDT


> -----Original Message-----
> From: Paul Hutchings [mailto:paul.hutchingsmira.co.uk]
> Sent: Monday, June 02, 2003 10:59 AM
> To: 'postfix-userscloud9.net'
> Subject: Reject mail to specific addresses?
>
> I want to setup a list of old/dead employee addresses that we
> don't wish to
> receive mail for.
>
> Am I right in thinking that I can have the following
>
> smtpd_recipient_restrictions =
> permit_mynetworks,
> reject_unauth_destination,
> check_recipient_access hash:/etc/postfix/deadaddress,
> permit
>
> /etc/postfix/deadaddress contains:
>
> deadaddress1domain.com reject
> deadaddress2domain.com reject
> deadaddress3domain.com reject
>
> Some additional questions if I may:
>
> Will this work?

Yes, it would work. This will not block email sent to
never_been_a_valid_emaildomain.com, so you system would generate a bounce
for those.

> If an email comes in addressed to validaddress1, validaddress2 and
> deadaddress1 will the valid recipients still receive it?
> Is there a way to not to require "reject" on each line for
> each address?

A better way is to tell postfix what the valid recipients are.

If the addresses are local (nor virtual), then using local_recipient_maps.

If the addresses are to be relayed to another server, then
relay_recipient_maps would be the way to go.

Good luck,

Michael Breton
Commtel