Page 1 of 1

Don't Send replies to noreply@

Posted: 10 Oct 2021 11:18
by elfranko
Hi,
I have an issue, that I want to try and get rid of.
Someone has signed up to a mailing list, and subsequently moved on. we get emails to them sent from a noreply@mailinglist.com
and the NDR for these get stuck in our outgoing queue.

So i'd like to be able to create a rule that says any email to:noreply@* discard
I have tried in header checks (using Regex: /^To: noreply@\ / DISCARD)
and also created a recipient_block in /etc/postfix and mapped it to the relevant part of main.cf

The odd bit is when i test it the noreply address i am using to test receives emails saying "failed"

Has anyone managed to do this, or anything similar

I am working on the theory that anyone using an address that starts no reply doesn't want to get emails to it.


Thanks in advance

Frank

Re: Don't Send replies to noreply@

Posted: 17 Mar 2022 09:16
by pdwalker
Did you ever resolve this problem?

Re: Don't Send replies to noreply@

Posted: 17 Mar 2022 10:36
by pdwalker
blocking email to noreply@ seemed like a good idea, so I added the following rule to my /etc/postfix/header_checks

Code: Select all

/(^To: .*noreply@)/ REJECT noreply@ addresses don't want you sending them mail
and it worked perfectly first time.

Are you sure you wrote your rule correctly?

/^To: noreply@\ / DISCARD)
should be:
/(^To: noreply@)/ DISCARD it is good to put a reason why the mail was rejected here