Re: [CentOS] Postfix question: How to reject email with a certain subject header
On Wed, 17 Jun 2009, John R Pierce wrote: > nate wrote: >> 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 >> > > The problem with that approach is that its global to the server.I > dislike putting filtering rules like that in the system, and prefer to > do them on a per user basis, hence my postmailrc suggestion (except I > don't know if CentOS uses postmail as the delivery agent for postfix) Hey Filipe, John, Michael, Thanks for your help on this. I do want a global rejection in this case, so this works out well. Thanks so much everyone!!! Gilbert *** Gilbert Sebenste (My opinions only!) ** *** ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Postfix question: How to reject email with a certain subject header
John R Pierce wrote: > > The problem with that approach is that its global to the server.I > dislike putting filtering rules like that in the system, and prefer to > do them on a per user basis, hence my postmailrc suggestion (except I > don't know if CentOS uses postmail as the delivery agent for postfix) > > I don't believe it does. At least not with a standard postfix configuration. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Postfix question: How to reject email with a certain subject header
nate wrote: > 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 > The problem with that approach is that its global to the server.I dislike putting filtering rules like that in the system, and prefer to do them on a per user basis, hence my postmailrc suggestion (except I don't know if CentOS uses postmail as the delivery agent for postfix) ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Postfix question: How to reject email with a certain subject header
Hello Nate, On Wed, 17 Jun 2009, nate wrote: > Do you want to reject them or eat them and send them to /dev/null ? 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 Yes, but I'd rather eat them and send them to /dev/null. Any idea on how to do that? *** Gilbert Sebenste (My opinions only!) ** Staff Meteorologist, Northern Illinois University E-mail: seben...@weather.admin.niu.edu *** web: http://weather.admin.niu.edu ** *** ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Postfix question: How to reject email with a certain subject header
Hi, On Wed, Jun 17, 2009 at 19:48, nate wrote: > 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 You missed a "/" to close the regexp... If you want to discard the message you can use DISCARD instead of REJECT. See the ACTIONS section of "man header_checks" or the manpage here: http://www.postfix.org/header_checks.5.html It should be something like: /^Subject: Rejected posting to / DISCARD Delete returns from listserv The "Delete returns from listserv" message will appear on your logs, so it will be easier to see which (or how many!) messages are being discarded. HTH, Filipe ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[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!) ** *** ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos