Re: [exim] Rejecting messages with no "To:" or "Cc:" field i…

Top Page
Delete this message
Reply to this message
Author: David Saez Padros
Date:  
To: exim-users
Subject: Re: [exim] Rejecting messages with no "To:" or "Cc:" field in the headers
Hi

> I have a specific application where we need to reject mail that has no
> "To" or "Cc" header


   deny    condition      = ${if !def:h_To: {1}}
           message        = Missing To: header


>(that is, mail which, in a client, would be
> displayed as being sent to "undisclosed recipients"). Alternatively, if
> it's easier, I want to be able to reject mail for which one of our
> domains doesn't appear in the "To" or "Cc" header (ie, we are merely a
> Bcc or list recipient).


   deny  !condition      = ${if match {$h_to:}{@mydomain}}


--
best regards ...

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       telf    +34 902 50 29 75
----------------------------------------------------------------