Page 1 of 1

How train MailScanner to not send emails to noreply addresses?

Posted: 26 Jul 2020, 15:57
by Sergio
Hello, Sarah.

Would you be kind to tell how to add a rule server wide to not send emails to addresses that are noreplay@anydomain.clt ?

Thanks,
Sergio

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 28 Jul 2020, 19:02
by csfan
Does blacklisting "To: noreply\@*" (without the quotes) in MailScanner not work? Or, an exim filter rule to drop them?

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 28 Jul 2020, 21:23
by Sergio
i don't want to blacklist any "noreplay@" address, what I want is not to send an automatic replay to any "noreplay@", both are different situations.

Thanks for your help.

Sergio

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 28 Jul 2020, 21:38
by Sarah
I'm not aware of any way to do what you are asking in the MailScanner configuration. You'd probably have to write an exim rule.

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 29 Jul 2020, 00:43
by csfan
Sergio wrote: 28 Jul 2020, 21:23 i don't want to blacklist any "noreplay@" address, what I want is not to send an automatic replay to any "noreplay@", both are different situations.
That's true. I take it this is for auto-responders? If so, something like this in your exim filter file should stop automatic replies to any noreply@ address.

Code: Select all

if $reply_address contains "noreply@"
then
seen finish
endif
The $reply_address variable will first check to see if a Reply-To: header exists in the incoming message. If not, it will check the From: header for the presence of "noreply@".

"seen finish" makes sure the automatic reply is never sent and halts any further actions on it.

Hope the above helps.

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 29 Jul 2020, 01:30
by Sergio
Thanks, csfan.

I am asking for a rule for MailScanner, something like:

To: noreply@* and From: *@* no

So, I don't have to mess with exim.
MailScanner rules are easier to manage and can be copied on all my servers.

Maybe adding that rule under spam.blacklist.rules?

Sergio

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 30 Jul 2020, 15:01
by csfan
Sergio wrote: 29 Jul 2020, 01:30I am asking for a rule for MailScanner, something like:

To: noreply@* and From: *@* no
That should work fine. Although, you would want "yes" as the desired action, so that MailScanner can get the message blacklisted.

You could even probably omit the From: bit, as the To: header is what matters in this case.

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 30 Jul 2020, 21:31
by Sergio
I will give it a try, thanks.

I will add:
To: noreplay@* no

Sergio

Re: How train MailScanner to not send emails to noreply addresses?

Posted: 30 Jul 2020, 23:16
by csfan
You will need "yes" as the action so as to blacklist any emails where the To: header contains noreply@.

Code: Select all

To: noreply@* yes