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: Ralf Hildebrandt (Ralf.Hildebrandtcharite.de)
Date: Mon Jun 02 2003 - 10:03:37 CDT


* Paul Hutchings <paul.hutchingsmira.co.uk>:

> I want to setup a list of old/dead employee addresses that we don't wish to
> receive mail for.

Good. Maybe local_recipient_maps does the trick with no extra frills.

> smtpd_recipient_restrictions =
> permit_mynetworks,
> reject_unauth_destination,
> check_recipient_access hash:/etc/postfix/deadaddress,
> permit

Yep.
  
> /etc/postfix/deadaddress contains:
>
> deadaddress1domain.com reject
> deadaddress2domain.com reject
> deadaddress3domain.com reject

Yep. Way to go.

deadaddress1domain.com 554 Doesn't work here anymore
deadaddress2domain.com 554 Went to work at amazon.com
deadaddress3domain.com 554 Was spammed to deatch by pornmails

> Some additional questions if I may:
>
> Will this work?

Yep.

> If an email comes in addressed to validaddress1, validaddress2 and
> deadaddress1 will the valid recipients still receive it?

Yes.

> Is there a way to not to require "reject" on each line for each address?

:) Well, you HAVE to tell Postfix what to do with a left hand side.
You could write a script that magically adds REJECT.

--
Ralf Hildebrandt Ralf.Hildebrandtcharite.de
my current spamtrap spamtrapcharite.de
http://www.arschkrebs.de/postfix/ Tel. +49 (0)30-450 570-155
"Programming graphics in X is like finding the square root of PI using
Roman numerals." -- Henry Spencer