You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Pál László (Sq.)" <vl...@vlad.hu> on 2005/06/28 20:52:20 UTC

special chars in subject + .procmailrc

Hi,

Anyone knows a way to tell spamassassin to handle some special
characters (HU, iso and utf) as normal characters in message subject?
Currently spa. gives 2.9 points for single ó á or é. I would like to
override this setting but only for a specific language.

I have the following settings in effect in local.cf

rewrite_header Subject *****SPAM*****
ok_languages hu en de it
ok_locales hu en de it
trusted_networks 10.9.8.0/24
dns_available yes
whitelist_from news-notify-return@virusbuster.hu
report_safe 1
required_score 6.1
rewrite_subject         1
use_terse_report        1
skip_rbl_checks         0
use_razor2              1
use_dcc                 1
use_pyzor               1



I also would like to remove spams over a certain level, so I'v created
the following .procmailrc entry

:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
/dev/null

It seems not working. What is the problem?

Thank you for your help

L:


Re: special chars in subject + .procmailrc

Posted by Evan Platt <ev...@espphotography.com>.
At 11:52 AM 6/28/2005, you wrote:
>* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*

I believe that it should be

* ^X-Spam-Level:.\*


Re: special chars in subject + .procmailrc

Posted by Loren Wilton <lw...@earthlink.net>.
> here is how I do it
> then I don't have to count stars  :)
>
> :0 H:
> * ^X-Spam-Status: +(yes|no), +score=\/[^. ]*
> * ? (( ${MATCH} > 14 ))
> /dev/null

Just curious - won't that /dev/null a ham message that scores higher than 14
also?
You seem to be matching against spam-status = no there, if I'm reading that
right.

        Loren


Re: special chars in subject + .procmailrc

Posted by Tim Litwiller <ti...@litwiller.net>.
Chris Thielen wrote:
> Pál László (Sq.) wrote:
> 
>> I also would like to remove spams over a certain level, so I'v created
>> the following .procmailrc entry
>>
>> :0
>> * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
>> /dev/null
>>
>> It seems not working. What is the problem?
>>  
>>
> 
> Looks fine to me.  Is that recipe in your procmailrc AFTER spamassassin 
> is called?  Or is it being skipped for some reason?
> 
> Here's mine:
> 
>        :0H
>        *^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
>        Maildir/.Junk.2bLearnt/


here is how I do it
then I don't have to count stars  :)


# ---------------------------------------
# Default Shell, Program & file locations
# ---------------------------------------
SHELL=/bin/bash
DEFAULT=$HOME/Maildir/
FORMAIL=/usr/bin/formail
MAILDIR=$HOME/Mail
PMDIR=$HOME
SENDMAIL=/usr/sbin/sendmail
# -----------------------------------------------
# this is where procmail mimedefang is configured
# -----------------------------------------------
INCLUDERC=/etc/procmailrc

# -----------------
# delete duplicates
# -----------------
:0 Wh: msgid.lock
| $FORMAIL -D 8192 msgid.cache

#---------------------------------------------------
#rules to sort out mailing lists that don't get spam
#---------------------------------------------------
:0 H:
* ^List-Id:.*video4linux-list.redhat.com
v4l/new

:0 H:
* ^From:.comics@comicmembers.com
dilbert/new

#-------------------
#spamassassin filter
#-------------------
:0fw
| /usr/bin/spamc

:0 H:
* ^X-Spam-Status: +(yes|no), +score=\/[^. ]*
* ? (( ${MATCH} > 14 ))
/dev/null

:0 H:
* ^X-Spam-Status: Yes.*
Junk/new

#-------------------------------------------
# rules for mailing lists that get some spam
#-------------------------------------------
:0 H:
* ^List-Id:.*ivtv-devel.lists.sourceforge.net
ivtv/new

# --------------------------
# all else goes to the inbox
# --------------------------
:0
$DEFAULT


my new server will run the mail thru spamassassin before it gets to 
procmail - I'm not sure yet if I will like that.








Re: special chars in subject + .procmailrc

Posted by Chris Thielen <cm...@someone.dhs.org>.
Pál László (Sq.) wrote:

>>>It looks this entry has been skipped somehow. Other rule moving spam
>>>police messages to /dev/nul works fine.
>>>      
>>>
>>    
>>
>SA invoked by amavisd
>
>L:
>
>  
>
Hi,

Sorry, I don't know anything about amavisd... I assume SA is being 
called BEFORE procmail kicks in for delivery?  Also, please keep this 
conversation on the list, that way others who do know stuff can chime in!

Chris

Re: special chars in subject + .procmailrc

Posted by Chris Thielen <cm...@someone.dhs.org>.
Pál László (Sq.) wrote:

> It looks this entry has been skipped somehow. Other rule moving spam
> police messages to /dev/nul works fine.


I'm not seeing where SA is called.  It appears that SA is being invoked 
from outside procmail. 

Can you give more info about your system's processing chain?

>  
> Here is my complete .procmailrc
>  
> Is there any way to set-up this /dev/nul behaviour systemwide?


There should be an /etc/procmailrc where you can specify global procmail 
recipes.

>  
>  
> # Please check if all the paths in PATH are reachable, remove the ones
> that
> # are not.
>  
> PATH= $PATH:$HOME/bin:/usr/bin:/usr/local/bin:.
> MAILDIR=$HOME/mail      # You'd better make sure it exists
> #DEFAULT=$MAILDIR/egyeb
> LOGFILE=$MAILDIR/procmail.log
> LOCKFILE=$HOME/.lockmail
>  
> :0
> * ^From.*spamassassin.apache.org
> spamassassin
>  
> :0
> * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
> /dev/null/
>  
> :0
> * ^From.*spam.police@vlad.hu
> /dev/null
>  
> :0
> * ^To: budapest-mindeningyen@yahoogroups.com
> Bp_Free
>  
> :0
> * ^To.*lotuszpagoda*
> Pagoda
>  
> :0
> * ^From.*webmin@*
> Rendszer
>  
> :0
> * ^From.*root@.*
> Rendszer
>  
> :0
> * ^From.*randivonal*
> Randivonal
> :0
> * !^Content-Type: message/
> * !^Content-Type: multipart/
> * !^Content-Type: application/pgp
> {
>     :0 fBw
>     * ^-----BEGIN PGP MESSAGE-----
>     * ^-----END PGP MESSAGE-----
>     | formail \
>         -i "Content-Type: application/pgp; format=text; x-action=encrypt"
>  
>     :0 fBw
>     * ^-----BEGIN PGP SIGNED MESSAGE-----
>     * ^-----BEGIN PGP SIGNATURE-----
>     * ^-----END PGP SIGNATURE-----
>     | formail \
>         -i "Content-Type: application/pgp; format=text; x-action=sign"
> }
>  
>   :0 fBw
>     * ^-----BEGIN PGP PUBLIC KEY BLOCK-----
>     * ^-----END PGP PUBLIC KEY BLOCK-----
>     | formail -i "Content-Type: application/pgp-keys; format=text;"
> # Mail that is very likely spam (>15) can be dropped on the floor.
> # Move the # up one line to save it on the server instead.
> # Note that dropping mail on the floor is a *bad*
> # idea unless you really, really believe no false positives will
> # have a score greater than 15.
>  
>  


Re: special chars in subject + .procmailrc

Posted by Chris Thielen <cm...@someone.dhs.org>.
Pál László (Sq.) wrote:

>I also would like to remove spams over a certain level, so I'v created
>the following .procmailrc entry
>
>:0
>* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
>/dev/null
>
>It seems not working. What is the problem?
>  
>

Looks fine to me.  Is that recipe in your procmailrc AFTER spamassassin 
is called?  Or is it being skipped for some reason?

Here's mine:

        :0H
        *^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
        Maildir/.Junk.2bLearnt/