Re: [exim] Deny when from and to are the same

Pàgina inicial
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
A: exim-users
Assumpte: Re: [exim] Deny when from and to are the same
On 06/04/2019 07:50, Andrew C Aitchison via Exim-users wrote:
> On Fri, 5 Apr 2019, AC via Exim-users wrote:
>>  deny
>>    hosts = ! +relay_from_hosts
>>    condition = ${if eqi{$sender_address}{$local_part@$domain}}
>>    log_message = Same sender and recipient address
>>
>>  deny
>>    hosts = ! +relay_from_hosts
>>    condition = ${if eqi{$reply_address}{$local_part@$domain}}
>>    log_message = Same sender and reply address
>>
>> I'm trying to check when the From: address is the same as the To:
>> address and the  mail is coming from a host outside my accepted network.
>>
>> I just received a message where the addresses in From and To were the
>> same but neither of these rules captured it.
>>
>> What am I missing to perform this check and deny spam  messages like
>> this?
>
> acl_smtp_rcpt runs when processing the RCPT;
> $reply_address cannot be set until the acl_smtp_data ACL.


Also, by "From and To" you're probably talking about the
From: and To: headers. The addresses in those are not always
the same as those in the envelope for the message. Read up
on email basics if this isn't clear.
--
Cheers,
Jeremy