Re: [Exim] ACL to reject mail from MAILER-DAEMON to anyone b…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Giuliano Gavazzi
Ημερομηνία:  
Προς: Brian Kendig
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] ACL to reject mail from MAILER-DAEMON to anyone but me?
At 9:48 am -0400 2004/04/30, Brian Kendig wrote:
>I wrote:
>
>>I want to refuse all messages that come from MAILER-DAEMON@* and are
>>NOT addressed to brian@???.
>
>The ACL that I set up to try to do this is:
>
>deny message   = The original message did not originate from this site
>      condition = ${if
>eq{$sender_address}{MAILER_DAEMON@$domain}{yes}{no}}
>      condition = ${if eq{$local_part}{brian}{no}{yes}}

>
>But it doesn't seem to be having any effect, even when I test it with
>exim -bh. I don't know why it's not working,
>


apart from the typo, it will not work because the $sender_address
contains the envelope sender that is most likely empty when the From:
header is MAILER-DAEMON. So, to solve your problem use:

${if eq{$sender_address}{}{yes}{no}}

or, equivalently in this case:

${if eq {$sender_address_local_part}{}{no}{yes}}

Giuliano