Hi list, I have a requirement for a mail server that only allows email to pass with a particular word in the subject line. Reading the header checks docs for Postfix I thought I may be able to add this rule: !/^Subject: .*dingdong/ REJECT Need to add dingdong to subject line to send Which should reject all mail unless the subject line contains "dingdong". Unfortunately this seems to block all mail from passing. Removing the "!" works as expected and the server allows all mail to pass, unless dingdong is in the subject line which is rejected. Is this rule valid? Or is there a better way to make this work? Thanks Dean
Plant, Dean wrote:> > !/^Subject: .*dingdong/ REJECT Need to add dingdong to subject line to > send >Hmm, try losing the space maybe? !/^Subject:.*dingdong/ REJECT Need to add dingdong to subject line
On Tue, Jan 13, 2009, Ned Slider wrote:>Plant, Dean wrote: >> >> !/^Subject: .*dingdong/ REJECT Need to add dingdong to subject line to >> send >> > >Hmm, try losing the space maybe? > >!/^Subject:.*dingdong/ REJECT Need to add dingdong to subject lineOr perhaps two rules /^Subject:.*dingdong/ OK /^Subject:.*/ REJECT Bill -- INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax: (206) 232-9186 The stamping of paper is an operation so much easier than the laying of taxes, that a government, in the practice of paper emissions, would rarely fail, in any such emergency [such as an election], to indulge itself too far in the employment of that resource... -- Alexander Hamilton
Plant, Dean a ?crit :> Hi list, > > I have a requirement for a mail server that only allows email to pass > with a particular word in the subject line. > > Reading the header checks docs for Postfix I thought I may be able to > add this rule: > > !/^Subject: .*dingdong/ REJECT Need to add dingdong to subject line to > send > > Which should reject all mail unless the subject line contains > "dingdong". Unfortunately this seems to block all mail from passing. >if /^Subject:/ !/dingdong/ REJECT blah blah endif> Removing the "!" works as expected and the server allows all mail to > pass, unless dingdong is in the subject line which is rejected. > > Is this rule valid? Or is there a better way to make this work? >the rule is (syntactically) valid. but it doesn't do what you want. take the following header: Date: Tue, 13 Jan 2009 15:51:40 -0000 does it contain "dingdong"? does it start with "Subject"? so it's a REJECT.