|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: .mailfilter trouble
From: mouss (usebsd
free.fr)
Date: Thu Nov 03 2005 - 12:48:30 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Aurelien Barrere a écrit :
> I configured postfix with maildrop and .mailfilter mechanism but
> unfortunately the message is not rejected as I expected
> I wrote a mail to X
domain.com with in subject "out of office", I want
> this mail to be rejected when matching this pattern
I hope you mean discard or put in a some junk folder. if you reject at
mda level, that results in a bounce, thus backscatter (because sender
may be forged).
anyway this is a question for the maildrop ML. In the meantime, read below
> [snip]
> if ((/.*[Oo]ffice/:hb))
ahuh. This would match things like:
From: mouss-office
example.com
Received: from foo.office-depot.com ...
Subject: when will you come at our office?
...
use
if (/^Subject:\s*out of office\s*$/)
instead. always be as specific as you can. and don't look for "out of
office" in the body.
> {
> filter_out=1
> }
> if ( $filter_out==1 )
> {
> exit
I believe "exit" is not the right choice, nor is "to /dev/null". You
need to set an exit code but I don't remember which one. search maildrop
ML archive or ask there.
better yet, put these in a specific folder so that you can check them
quickly if you want (maybe with the help of a script to grep mail from
some people ... etc). if so, use "to Maildir/.OutOfOffice/" for instance
(the folder must be created in advance (or here with a maildirmake shell
cmd).
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]