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

Top Page
Delete this message
Reply to this message
Author: Ian Eiloart
Date:  
To: Mark Goodge, exim users
Subject: Re: [exim] Rejecting messages with no "To:" or "Cc:" field in theheaders


--On 18 November 2010 08:37:51 +0000 Mark Goodge <mark@???>
wrote:

> Please forgive me for what is something of a newbie question, but I've
> searched the documentation and I'm still none the wiser :-)
>
> I have a specific application where we need to reject mail that has no
> "To" or "Cc" 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).


Actually, if the mail is displayed as being sent to "undisclosed
recipients", then it probably has a To: header saying so.

BTW, Mark's solution would reject an email that has a Cc header, but no To
header.

This might work. I've not tested it, though.:

deny    condition      = ${if !def:h_To: {1}}
        condition      = ${if !def:h_Cc: {1}}
        message        = No To or Cc header found





>
> Before anyone asks, I am aware that this isn't recommended practice for
> normal email, as it would lose too much legitimate mail (including mail
> from lists such as this one). But the specific application where I need
> this is the mail server handling our customer support ticketing address,
> which a) is never subscribed to any mailing list address, and b) has no
> reason why any legitimate customer should Bcc us instead of putting our
> address in at least the Cc field. I have checked a large sample of such
> messages on the system and they are 100% spam.
>
> With Postfix, which is what I'm more familiar with, this would be a
> fairly trivial configuration setting. So I'm assuming that the same
> should be true for Exim, if only I knew what the setting was! Can anyone
> enlighten me?
>
> Thanks
>
> Mark
> --
> http://mark.goodge.co.uk




--
Ian Eiloart
IT Services, University of Sussex
01273-873148 x3148
For new support requests, see http://www.sussex.ac.uk/its/help/