Gilbert Sebenste
2009-Jun-17 23:20 UTC
[CentOS] Postfix question: How to reject email with a certain subject header
Hello everyone, Occasionally I get emails which have a subject header of "Rejected posting to Blah", from a listserv I am on. Without going into a 10 page diatribe of why, I'd like to reject these automatically, sending them to /dev/null. I used to run Sendmail and that was pretty easy to do. How can I do this under Postfix under CentOS 5.3? Any help is appreciated. Thanks! Gilbert ******************************************************************************* Gilbert Sebenste ******** (My opinions only!) ****** *******************************************************************************
nate
2009-Jun-17 23:48 UTC
[CentOS] Postfix question: How to reject email with a certain subject header
Gilbert Sebenste wrote:> Hello everyone, > > Occasionally I get emails which have a subject header of "Rejected posting > to Blah", from a listserv I am on. Without going into a 10 page diatribe > of why, I'd like to reject these automatically, sending them to /dev/null. > I used to run Sendmail and that was pretty easy to do. How can I do this > under Postfix under CentOS 5.3?Do you want to reject them or eat them and send them to /dev/null ? If you want to reject them something like this would work: header_checks = regexp:/etc/postfix/regexp_table and in /etc/postfix/regexp_table something like: /^Subject: This is the subject I want to reject REJECT 554 Custom rejection message nate
John R Pierce
2009-Jun-18 00:11 UTC
[CentOS] Postfix question: How to reject email with a certain subject header
Gilbert Sebenste wrote:> Hello everyone, > > Occasionally I get emails which have a subject header of "Rejected posting > to Blah", from a listserv I am on. Without going into a 10 page diatribe > of why, I'd like to reject these automatically, sending them to /dev/null. > I used to run Sendmail and that was pretty easy to do. How can I do this > under Postfix under CentOS 5.3? > > Any help is appreciated. Thanks! >are you using procmail as the delivery agent? if so, you'd add something like the following to your ~/.procmailrc ... :0: * ^Subject:.*Rejected posting to Blah.* /dev/null