Don't Send replies to noreply@

Questions and answers about how to do stuff
Post Reply
elfranko
Posts: 19
Joined: 03 Sep 2018 08:03

Don't Send replies to noreply@

Post 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
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Don't Send replies to noreply@

Post by pdwalker »

Did you ever resolve this problem?
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Don't Send replies to noreply@

Post 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
Post Reply