Re: Postfix header check help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux