At 02:18 PM 3/18/2004, Toomas Aas wrote:
header MY_XMAILER_BLANK X-Mailer =~ /^\s*$/
describe MY_XMAILER_BLANK X-Mailer: is empty
score MY_XMAILER_BLANK 5.001
However, this seems to also match these messages where X-Mailer: is not
present at all - which was not my intention.
How can I check for an empty, but existing header?
Use a meta rule to combine two rules:
header __XMAILER_EXISTS exists:X-Mailer
header __XMAILER_EMPTY X-Mailer =~ /^\s*$/
meta MY_XMAILER_BLANK (__XMAILER_EXISTS && __XMAILER_EMPTY)