Thread: [Postfixadmin-devel] vacation and spam
Brought to you by:
christian_boltz,
gingerdog
|
From: <to...@st...> - 2007-11-08 15:59:07
|
hello, i'm wondering if there is a way to add in vacation.pl, a check to Spamassassin header flag in order to avoid autoreply with spam messages. thx for your answers Tonio |
|
From: David G. <da...@co...> - 2007-11-08 16:57:07
|
to...@st... wrote : > hello, > i'm wondering if there is a way to add in vacation.pl, a check to =20 > Spamassassin header flag in order to avoid autoreply with spam messages. >=20 Yes that should be quite easy to do. I'm tempted to add it into the file, as a quick check - but wonder whether it would be best if there was some sort of user defined list - either in a database, or the vacation.pl file itself? thanks, David. --=20 David Goodwin=20 [ david at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ] |
|
From: Martin A. <li...@am...> - 2007-11-08 17:08:14
Attachments:
vacation.patch
|
Pardon, fix ;-) Try this: |
|
From: tonio <to...@st...> - 2007-11-08 17:33:09
|
Martin Ambroz a écrit : > Pardon, fix ;-) Try this: > Thx a lot ! Works exactly like i wanted. I think this check is a must have to avoid backscatter mails from vacation service. Thx again for your help Tonio |
|
From: David G. <da...@co...> - 2007-11-08 18:20:00
|
Martin Ambroz wrote :
> Pardon, fix ;-) Try this:
> --- vacation.pl 2007-11-08 17:52:32.000000000 +0100
> +++ vacation.pl 2007-11-08 17:58:19.000000000 +0100
> @@ -325,6 +325,7 @@
> elsif (/^cc:\s+(.*)\n$/i) { $cc =3D $1; $lastheader =3D \$cc; } =20
> elsif (/^subject:\s+(.*)\n$/i) { $subject =3D $1; $lastheader =3D \$s=
ubject; } =20
> elsif (/^message-id:\s+(.*)\n$/i) { $messageid =3D $1; $lastheader =
=3D \$messageid; } =20
> + elsif (/^x-spam-flag:\s+yes/i) { exit (0); }=20
> elsif (/^precedence:\s+(bulk|list|junk)/i) { exit (0); } =20
> elsif (/^x-loop:\s+postfix\ admin\ virtual\ vacation/i) { exit (0); }=
=20
> else {$lastheader =3D "" ; }
Is there any difference between x-spam-flag and x-spam-status?
X-Spam-Flag: YES =
=
=20
X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on $(hostname)
X-Spam-Level: ***** =
=
=20
X-Spam-Status: Yes, score=3D5.9 required=3D5
David.
--=20
David Goodwin=20
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
|
|
From: tonio <to...@st...> - 2007-11-08 20:27:48
|
David Goodwin a écrit :
> Martin Ambroz wrote :
>
>> Pardon, fix ;-) Try this:
>>
>
>
>> --- vacation.pl 2007-11-08 17:52:32.000000000 +0100
>> +++ vacation.pl 2007-11-08 17:58:19.000000000 +0100
>> @@ -325,6 +325,7 @@
>> elsif (/^cc:\s+(.*)\n$/i) { $cc = $1; $lastheader = \$cc; }
>> elsif (/^subject:\s+(.*)\n$/i) { $subject = $1; $lastheader = \$subject; }
>> elsif (/^message-id:\s+(.*)\n$/i) { $messageid = $1; $lastheader = \$messageid; }
>> + elsif (/^x-spam-flag:\s+yes/i) { exit (0); }
>> elsif (/^precedence:\s+(bulk|list|junk)/i) { exit (0); }
>> elsif (/^x-loop:\s+postfix\ admin\ virtual\ vacation/i) { exit (0); }
>> else {$lastheader = "" ; }
>>
>
>
> Is there any difference between x-spam-flag and x-spam-status?
>
>
> X-Spam-Flag: YES
> X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on $(hostname)
> X-Spam-Level: *****
> X-Spam-Status: Yes, score=5.9 required=5
>
> David.
>
>
From SA Wiki:
--
SpamAssassin <http://wiki.apache.org/spamassassin/SpamAssassin> adds the
headers *X-Spam-Status*, X-Spam-Level, X-Spam-Checker-Version and
(conditionally) *X-Spam-Flag*;
--
*
***
|
|
From: Martin A. <li...@am...> - 2007-11-11 17:22:51
Attachments:
vacation.pl.patch
|
So it needs a little improvement then. |
|
From: tonio <to...@st...> - 2007-11-11 22:25:31
|
Martin Ambroz a écrit :
> So it needs a little improvement then.
>
i've just checked and it's works.
But in svn revision 203 code was:
elsif (/^x-spam-flag:\s+yes$/i) { exit (0); }
and now it's:
elsif (/^x-spam-(flag|status):\s+yes/i) { exit (0); }
no problem with '$' missing ?
anyway it seems working in both case.
Thx for your help
Tonio
|
|
From: Martin A. <li...@am...> - 2007-11-11 22:52:07
|
There can't be $ because this line is not ending with yes and there is always some description why it's marked as spam behind. > no problem with '$' missing ? |