Local State Dir - /var/lib/spamassassin - SARE rules no hits

Martin Hepworth maxsec at gmail.com
Wed Nov 26 09:40:42 GMT 2008


2008/11/26 Daniel Flensburg <Daniel.Flensburg at iris.se>:
> Ok, did this:
>
> 1) "su - postfix -s /bin/bash"
> 2) As postfix user (promt sais: postfix at mailgw:~$)- ran "spamassassin -D --lint"
> The result look ok. It is reading the right folder:
> [...]
> [32442] dbg: config: using "/etc/spamassassin" for site rules pre files
> [32442] dbg: config: read file /etc/spamassassin/init.pre
> [32442] dbg: config: read file /etc/spamassassin/v310.pre
> [32442] dbg: config: read file /etc/spamassassin/v312.pre
> [32442] dbg: config: using "/var/lib/spamassassin/3.001004" for sys rules pre files
> [32442] dbg: config: read file /var/lib/spamassassin/3.001004/saupdates_openprotect_com.pre
> [32442] dbg: config: read file /var/lib/spamassassin/3.001004/updates_spamassassin_org.pre
> [32442] dbg: config: using "/var/lib/spamassassin/3.001004" for default rules dir
> [32442] dbg: config: read file /var/lib/spamassassin/3.001004/70_sare_adult_cf_sare_sa-update_dostech_net.cf
> [32442] dbg: config: read file /var/lib/spamassassin/3.001004/70_sare_bayes_poison_nxm_cf_sare_sa-update_dostech_net.cf
> [...]
>
> 3) Tried to run against a message in quarantine:
>
> cd /var/spool/MailScanner/quarantine/20081126: Permission denied
>
> Ok, so Postfix user cannot read the quarantine!
>
> ls -l gives:
> ¨
> drwxr-xr-x 145 postfix postfix  4096 2008-11-26 09:33 incoming
> drwxrwx---  12 root    www-data 4096 2008-11-26 06:25 quarantine
> drwxr-xr-x   2 postfix postfix  4096 2008-11-25 12:25 spamassassin
>
> in Mailscanner.conf:
>
> Run As User = postfix
> Run As Group = postfix
> Incoming Queue Dir = /var/spool/postfix/hold
> Outgoing Queue Dir = /var/spool/postfix/incoming
> Incoming Work Dir = /var/spool/MailScanner/incoming
> Quarantine Dir = /var/spool/MailScanner/quarantine
> PID file = /opt/MailScanner/var/MailScanner.pid
> Incoming Work User =
> Incoming Work Group =
> Incoming Work Permissions = 0600
> Quarantine User = root
> Quarantine Group = www-data
> Quarantine Permissions = 0660
>
> Before I do something stupid. What would be the right settings? Could I just run chown -R postfix:www-data against the quarantine dir? Do I have to change the setting: Quarantine User = postfix? Something else? chmod the quarantine dir?
>
> Thank you all for your help!
>
> /Daniel
>
> -----Ursprungligt meddelande-----
> Från: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] För Glenn Steen
> Skickat: den 25 november 2008 17:06
> Till: MailScanner discussion
> Ämne: Re: Local State Dir - /var/lib/spamassassin - SARE rules no hits
>
> 2008/11/25 Glenn Steen <glenn.steen at gmail.com>:
>> 2008/11/25 Daniel Flensburg <Daniel.Flensburg at iris.se>:
>>> Glenn!
>>>
>>> Can you please point me in the right direction? The SARE-rules still do not work. But I can cd, ls and nano files in the /var/lib/spamassassin/3.00xxxx directory after running "su - postfix -s /bin/bash".
>>>
>>> What exactly do you mean by "the problem is "closer to the root directory"."?
>>>
>>> Thank you in advance!
>>>
>>> /Daniel
>> Clumsy expression... What I meant is that if the perms look ok on the
>> local files, but you still cannot access them as the PF user, then the
>> problem would be situated in a parent directorys' permissions. Hope
>> that was a bit clearer:-)
>>
> As the postfix user, what does a "spamassassin -D --lint" (or even
> better, "spamassassin -D -t <
> /path/to/a/message/file/probably/from/your/spam/quarantine") say? Does
> it seem to be reading the correct rule files from the correct rule
> directories?
>
> Cheers
> --
> -- Glenn
> email: glenn < dot > steen < at > gmail < dot > com
> work: glenn < dot > steen < at > ap1 < dot > se
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>


Daniel

I'd also suggest

Quarantine User = postfix


-- 
Martin Hepworth
Oxford, UK


More information about the MailScanner mailing list