On 1/13/2012 1:10 AM, Morten Frederik Kallesøe wrote:
> Ty for you reply
> 
> I think you misunderstood the direction of the mail i want to limit. i
> wanted to limit "To" and not "From"

You referred repeatedly to "sender".

...
> 
> I went with the header_checks solution

Be aware this will be unreliable.  Understand that the To: header is
essentially a comment and has nothing to do with mail routing.  Mail
that is sent to you will not necessarily have your name in the To:
header.

> 
> cat /etc/postfix/header_checks
> IF /To:/

Much better (but still unreliable):
IF /^(To|Cc): /

> !/(@a\.dk|@b\.dk|@c\.dk)/ REJECT Trying to send to domain thats not 
> whitelisted
> ENDIF
> 
> Works like i want. 

Doubtful.

> I know there is a performance penalty with the pcre
> instead of hash tables, but its very development server, so the
> traffic is very very low.
> 
> It works, thanks.




  -- Noel Jones

Reply via email to