You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Robert Moskowitz <rg...@htt-consult.com> on 2007/08/17 18:58:40 UTC

Addendum -- New spamassassin significant install problems

I left off below that I am using
spam-milter	0.3.1-1

===================================================================

I am new to this.  I have been running my mail server in various flavors
for 10+ years. Always trying to do better....

PLATFORM:

Centos 5.0
1Ghz processor 512Mb memory

Mail server:        Scalix 11.1
MTA:                   Sendmail ver. 8.13.8
Spamassassin:   3.1.9
Webmin:             1.360

I followed the Scalix WiKi spamassassin install instructions:
http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin

I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
The meter just sits there near the beginning for quite some time.
Often, the sending times out.

I read through much of the spamassassin WiKi.  Nothing on performance
seems to apply.  When I go into the /var/log/maillog, I catch soom real
problems.

I enabled DNS checking (dns_available yes) and restarted spamassassin
via webmin and caught the following in the maillog:

Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
localhost.localdomain [127.0.0.1] at port 48800
Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
not specified with -u, not found, or set to root, falling back to nobody
at /usr/bin/spamd line 1161, <GEN4> line 4.

And looking at running processes via webmin I see:

1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
/var/run/spamd.pid
1381     nobody     12:13     spamd child
1382     root     12:13     spamd child

What do I change so that it does not fall back to 'nobody'?

Now this MIGHT explain something else I am seeing in maillog:

Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
lockfile
/root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
/root/.spamassassin/auto-whitelist.lock: Permission denied
Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
auto-whitelist file failed: locker: safe_lock: cannot create tmp
lockfile
/root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
/root/.spamassassin/auto-whitelist.lock: Permission denied

Please lend me a hand in cleaning what looks to be a very basic set of
install problems.



Re: Addendum -- New spamassassin significant install problems

Posted by dougp23 <do...@gmail.com>.
Also, Robert, take a look at this page:

http://www.stearns.org/doc/spamassassin-setup.current.html

local.cf has TONS of options, many of which are lightly documented.  Pay
close attention to
bayes_path
auto_whitelist_path

Scalix is also a bit of an oddity when it comes to using spamass-milter
(trust me, I'm a Scalix user myself).  just try using the -b and -r flag
together in the milter and watch the fun as the same message is regenerated,
scanned, and mailed 20 odd times!!!

Sorry, I got off track there!  Just check out that link, a lot of good
stuff.
Hope it's helpful.

Doug


James Lay wrote:
> 
> 
> 
> 
> On 8/17/07 2:13 PM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
> 
>> Well maybe progress but things are still wrong.
>> 
>> James Lay wrote:
>>> 
>>> On 8/17/07 11:53 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>> 
>>>   
>>>> More questions...
>>>> 
>>>> James Lay wrote:
>>>>     
>>>>> On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>>> 
>>>>>   
>>>>>       
>>>>>> thanks for the quick reply.
>>>>>> 
>>>>>> James Lay wrote:
>>>>>>     
>>>>>>         
>>>>>>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>>>>> 
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>> I left off below that I am using
>>>>>>>> spam-milter 0.3.1-1
>>>>>>>> 
>>>>>>>> ===================================================================
>>>>>>>> 
>>>>>>>> I am new to this.  I have been running my mail server in various
>>>>>>>> flavors
>>>>>>>> for 10+ years. Always trying to do better....
>>>>>>>> 
>>>>>>>> PLATFORM:
>>>>>>>> 
>>>>>>>> Centos 5.0
>>>>>>>> 1Ghz processor 512Mb memory
>>>>>>>> 
>>>>>>>> Mail server:        Scalix 11.1
>>>>>>>> MTA:                   Sendmail ver. 8.13.8
>>>>>>>> Spamassassin:   3.1.9
>>>>>>>> Webmin:             1.360
>>>>>>>> 
>>>>>>>> I followed the Scalix WiKi spamassassin install instructions:
>>>>>>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>>>>>>> 
>>>>>>>> I am using Thunderbird 1.5.0.12, sending mail has a significant
>>>>>>>> delay.
>>>>>>>> The meter just sits there near the beginning for quite some time.
>>>>>>>> Often, the sending times out.
>>>>>>>> 
>>>>>>>> I read through much of the spamassassin WiKi.  Nothing on
>>>>>>>> performance
>>>>>>>> seems to apply.  When I go into the /var/log/maillog, I catch soom
>>>>>>>> real
>>>>>>>> problems.
>>>>>>>> 
>>>>>>>> I enabled DNS checking (dns_available yes) and restarted
>>>>>>>> spamassassin
>>>>>>>> via webmin and caught the following in the maillog:
>>>>>>>> 
>>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>>>>>>> localhost.localdomain [127.0.0.1] at port 48800
>>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root:
>>>>>>>> user
>>>>>>>> not specified with -u, not found, or set to root, falling back to
>>>>>>>> nobody
>>>>>>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>>>>>>     
>>>>>>>>         
>>>>>>>>            
>>>>>>> Robert,
>>>>>>> 
>>>>>>> What's your startup line to start spamd look like?  If you're
>>>>>>> starting it
>>>>>>> like:
>>>>>>> 
>>>>>>> Spamd -u spamduser
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>> from file: /etc/rc.d/init.d/spamassassin:
>>>>>> 
>>>>>> # Set default spamd configuration.
>>>>>> SPAMDOPTIONS="-d -c -m5 -H"
>>>>>> SPAMD_PID=/var/run/spamd.pid
>>>>>> 
>>>>>> and as you can see below, the actual command that got run was:
>>>>>> 
>>>>>> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
>>>>>> 
>>>>>> So no -u at all!
>>>>>>     
>>>>>>         
>>>>>>> Is that user in your /etc/passwd file?
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>> No spamduser.
>>>>>> 
>>>>>> What files would I expect to see owned by spamduser. Oh, wait. If the
>>>>>> user's not there, there better not be any files owned by it....
>>>>>>     
>>>>>>         
>>>>> Doh!
>>>>> 
>>>>> It's running as root then
>>>>>       
>>>> Gee, I thought that was clear from the maillog lines and running
>>>> processes...
>>>> 
>>>> But then it has those processes running as 'nobody' as well..
>>>>     
>>>>> ...no goodness there.
>>>>>       
>>>> Why not? Security (it should be running chrooted then?)? other reasons?
>>>>     
>>>>> I created a user and group
>>>>> called spamfilter, then su'd to root, then su'd to spamfilter and ran
>>>>> my
>>>>> bayes and pyzor setups as spamfilter.
>>>>>       
>>>> This makes no sense to me. You created the user spamfilter. You logged
>>>> in as spamfilter, su'd to root and su'd to spamfiltre? What does that
>>>> accomplish? Or are you logged in as James and trying to be spamfilter?
>>>> If so does not: login spamfilter do the same thing? (I did a fair bit
>>>> of
>>>> unix back in '93, then nothing for over 10 years...).
>>>> 
>>>>     
>>> 
>>> When you su to root, then su to spamfilter, you in effect are now logged
>>> in
>>> as that user.  Because spamd will drop privileges to spamfilter, you
>>> should
>>> setup pyzor and razor and run test like spamassassin -D --lint as the
>>> user
>>> it will be running as.
>>>   
>> I just created the spamfilter userid and group. I did not install pyzor
>> or razor yet. What are they and why do I want to install them?
>> 
>> I ran the spamassassin -D --lint
>> 
>> I had a bit of a problem adding the -u spamfilter, so I asked on the
>> Centos list where I was suppose to do this and was told it goes in
>> /etc/sysconfig/spamassassin. That worked but I am still getting the
>> errors. Even after a system reboot.
>> 
>> Oh and nothing in the /home/spamfilter/.spamassassin
>> 
>> 2264 root 15:48 /usr/bin/spamd -u spamfilter -d -c -m5 -H -r
>> /var/run/spamd.pid
>> 2301 spamfilter 15:48 spamd child
>> 2302 spamfilter 15:48 spamd child
>> 
>> Aug 17 16:00:31 z9m9z sendmail[3913]: l7HK0VeM003913:
>> from=<1-...@mx121.susanshopping.com>, size=6708,
>> class=0, nrcpts=1,
>> msgid=<1-...@mx121.susanshopping.com>,
>> proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
>> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: connection from
>> localhost.localdomain [127.0.0.1] at port 36972
>> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: creating default_prefs:
>> /root/.spamassassin/user_prefs
>> Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>> Aug 17 16:00:31 z9m9z spamd[2301]: config: cannot write to
>> /root/.spamassassin/user_prefs: Permission denied
>> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: failed to create readable
>> default_prefs: /root/.spamassassin/user_prefs
>> Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: processing message
>> <1-...@mx121.susanshopping.com> for root:502
>> Aug 17 16:00:33 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>> Aug 17 16:00:33 z9m9z spamd[2301]: locker: safe_lock: cannot create tmp
>> lockfile 
>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for
>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>> Aug 17 16:00:33 z9m9z spamd[2301]: auto-whitelist: open of
>> auto-whitelist file failed: locker: safe_lock: cannot create tmp
>> lockfile 
>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for
>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>> Aug 17 16:00:33 z9m9z spamd[2301]: spamd: identified spam (8.5/5.0) for
>> root:502 in 2.6 seconds, 7247 bytes.
>> 
>> 
> 
> Spamd is still looking at /root/ as it's home dir.  Maybe CentOs compiled
> SpamAssassin differently?  Not sure at this point :(
> 
> James
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Addendum----New-spamassassin-significant-install-problems-tf4286992.html#a12253643
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Addendum -- New spamassassin significant install problems

Posted by James Lay <jl...@slave-tothe-box.net>.


On 8/17/07 2:13 PM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:

> Well maybe progress but things are still wrong.
> 
> James Lay wrote:
>> 
>> On 8/17/07 11:53 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>> 
>>   
>>> More questions...
>>> 
>>> James Lay wrote:
>>>     
>>>> On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>> 
>>>>   
>>>>       
>>>>> thanks for the quick reply.
>>>>> 
>>>>> James Lay wrote:
>>>>>     
>>>>>         
>>>>>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>>>> 
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> I left off below that I am using
>>>>>>> spam-milter 0.3.1-1
>>>>>>> 
>>>>>>> ===================================================================
>>>>>>> 
>>>>>>> I am new to this.  I have been running my mail server in various flavors
>>>>>>> for 10+ years. Always trying to do better....
>>>>>>> 
>>>>>>> PLATFORM:
>>>>>>> 
>>>>>>> Centos 5.0
>>>>>>> 1Ghz processor 512Mb memory
>>>>>>> 
>>>>>>> Mail server:        Scalix 11.1
>>>>>>> MTA:                   Sendmail ver. 8.13.8
>>>>>>> Spamassassin:   3.1.9
>>>>>>> Webmin:             1.360
>>>>>>> 
>>>>>>> I followed the Scalix WiKi spamassassin install instructions:
>>>>>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>>>>>> 
>>>>>>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>>>>>>> The meter just sits there near the beginning for quite some time.
>>>>>>> Often, the sending times out.
>>>>>>> 
>>>>>>> I read through much of the spamassassin WiKi.  Nothing on performance
>>>>>>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>>>>>>> problems.
>>>>>>> 
>>>>>>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>>>>>>> via webmin and caught the following in the maillog:
>>>>>>> 
>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>>>>>> localhost.localdomain [127.0.0.1] at port 48800
>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>>>>>>> not specified with -u, not found, or set to root, falling back to nobody
>>>>>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>>>>>     
>>>>>>>         
>>>>>>>            
>>>>>> Robert,
>>>>>> 
>>>>>> What's your startup line to start spamd look like?  If you're starting it
>>>>>> like:
>>>>>> 
>>>>>> Spamd -u spamduser
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> from file: /etc/rc.d/init.d/spamassassin:
>>>>> 
>>>>> # Set default spamd configuration.
>>>>> SPAMDOPTIONS="-d -c -m5 -H"
>>>>> SPAMD_PID=/var/run/spamd.pid
>>>>> 
>>>>> and as you can see below, the actual command that got run was:
>>>>> 
>>>>> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
>>>>> 
>>>>> So no -u at all!
>>>>>     
>>>>>         
>>>>>> Is that user in your /etc/passwd file?
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> No spamduser.
>>>>> 
>>>>> What files would I expect to see owned by spamduser. Oh, wait. If the
>>>>> user's not there, there better not be any files owned by it....
>>>>>     
>>>>>         
>>>> Doh!
>>>> 
>>>> It's running as root then
>>>>       
>>> Gee, I thought that was clear from the maillog lines and running
>>> processes...
>>> 
>>> But then it has those processes running as 'nobody' as well..
>>>     
>>>> ...no goodness there.
>>>>       
>>> Why not? Security (it should be running chrooted then?)? other reasons?
>>>     
>>>> I created a user and group
>>>> called spamfilter, then su'd to root, then su'd to spamfilter and ran my
>>>> bayes and pyzor setups as spamfilter.
>>>>       
>>> This makes no sense to me. You created the user spamfilter. You logged
>>> in as spamfilter, su'd to root and su'd to spamfiltre? What does that
>>> accomplish? Or are you logged in as James and trying to be spamfilter?
>>> If so does not: login spamfilter do the same thing? (I did a fair bit of
>>> unix back in '93, then nothing for over 10 years...).
>>> 
>>>     
>> 
>> When you su to root, then su to spamfilter, you in effect are now logged in
>> as that user.  Because spamd will drop privileges to spamfilter, you should
>> setup pyzor and razor and run test like spamassassin -D --lint as the user
>> it will be running as.
>>   
> I just created the spamfilter userid and group. I did not install pyzor
> or razor yet. What are they and why do I want to install them?
> 
> I ran the spamassassin -D --lint
> 
> I had a bit of a problem adding the -u spamfilter, so I asked on the
> Centos list where I was suppose to do this and was told it goes in
> /etc/sysconfig/spamassassin. That worked but I am still getting the
> errors. Even after a system reboot.
> 
> Oh and nothing in the /home/spamfilter/.spamassassin
> 
> 2264 root 15:48 /usr/bin/spamd -u spamfilter -d -c -m5 -H -r
> /var/run/spamd.pid
> 2301 spamfilter 15:48 spamd child
> 2302 spamfilter 15:48 spamd child
> 
> Aug 17 16:00:31 z9m9z sendmail[3913]: l7HK0VeM003913:
> from=<1-...@mx121.susanshopping.com>, size=6708,
> class=0, nrcpts=1,
> msgid=<1-...@mx121.susanshopping.com>,
> proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: connection from
> localhost.localdomain [127.0.0.1] at port 36972
> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: creating default_prefs:
> /root/.spamassassin/user_prefs
> Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
> Aug 17 16:00:31 z9m9z spamd[2301]: config: cannot write to
> /root/.spamassassin/user_prefs: Permission denied
> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: failed to create readable
> default_prefs: /root/.spamassassin/user_prefs
> Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
> Aug 17 16:00:31 z9m9z spamd[2301]: spamd: processing message
> <1-...@mx121.susanshopping.com> for root:502
> Aug 17 16:00:33 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission
> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
> Aug 17 16:00:33 z9m9z spamd[2301]: locker: safe_lock: cannot create tmp
> lockfile 
> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> Aug 17 16:00:33 z9m9z spamd[2301]: auto-whitelist: open of
> auto-whitelist file failed: locker: safe_lock: cannot create tmp
> lockfile 
> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> Aug 17 16:00:33 z9m9z spamd[2301]: spamd: identified spam (8.5/5.0) for
> root:502 in 2.6 seconds, 7247 bytes.
> 
> 

Spamd is still looking at /root/ as it's home dir.  Maybe CentOs compiled
SpamAssassin differently?  Not sure at this point :(

James



Re: Addendum -- New spamassassin significant install problems

Posted by Robert Moskowitz <rg...@htt-consult.com>.
Well maybe progress but things are still wrong.

James Lay wrote:
>
> On 8/17/07 11:53 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>
>   
>> More questions...
>>
>> James Lay wrote:
>>     
>>> On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>
>>>   
>>>       
>>>> thanks for the quick reply.
>>>>
>>>> James Lay wrote:
>>>>     
>>>>         
>>>>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>>>> I left off below that I am using
>>>>>> spam-milter 0.3.1-1
>>>>>>
>>>>>> ===================================================================
>>>>>>
>>>>>> I am new to this.  I have been running my mail server in various flavors
>>>>>> for 10+ years. Always trying to do better....
>>>>>>
>>>>>> PLATFORM:
>>>>>>
>>>>>> Centos 5.0
>>>>>> 1Ghz processor 512Mb memory
>>>>>>
>>>>>> Mail server:        Scalix 11.1
>>>>>> MTA:                   Sendmail ver. 8.13.8
>>>>>> Spamassassin:   3.1.9
>>>>>> Webmin:             1.360
>>>>>>
>>>>>> I followed the Scalix WiKi spamassassin install instructions:
>>>>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>>>>>
>>>>>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>>>>>> The meter just sits there near the beginning for quite some time.
>>>>>> Often, the sending times out.
>>>>>>
>>>>>> I read through much of the spamassassin WiKi.  Nothing on performance
>>>>>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>>>>>> problems.
>>>>>>
>>>>>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>>>>>> via webmin and caught the following in the maillog:
>>>>>>
>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>>>>> localhost.localdomain [127.0.0.1] at port 48800
>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>>>>>> not specified with -u, not found, or set to root, falling back to nobody
>>>>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>>>>     
>>>>>>         
>>>>>>             
>>>>> Robert,
>>>>>
>>>>> What's your startup line to start spamd look like?  If you're starting it
>>>>> like:
>>>>>
>>>>> Spamd -u spamduser
>>>>>   
>>>>>       
>>>>>           
>>>> from file: /etc/rc.d/init.d/spamassassin:
>>>>
>>>> # Set default spamd configuration.
>>>> SPAMDOPTIONS="-d -c -m5 -H"
>>>> SPAMD_PID=/var/run/spamd.pid
>>>>
>>>> and as you can see below, the actual command that got run was:
>>>>
>>>> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
>>>>
>>>> So no -u at all!
>>>>     
>>>>         
>>>>> Is that user in your /etc/passwd file?
>>>>>   
>>>>>       
>>>>>           
>>>> No spamduser.
>>>>
>>>> What files would I expect to see owned by spamduser. Oh, wait. If the
>>>> user's not there, there better not be any files owned by it....
>>>>     
>>>>         
>>> Doh!
>>>
>>> It's running as root then
>>>       
>> Gee, I thought that was clear from the maillog lines and running
>> processes...
>>
>> But then it has those processes running as 'nobody' as well..
>>     
>>> ...no goodness there.
>>>       
>> Why not? Security (it should be running chrooted then?)? other reasons?
>>     
>>> I created a user and group
>>> called spamfilter, then su'd to root, then su'd to spamfilter and ran my
>>> bayes and pyzor setups as spamfilter.
>>>       
>> This makes no sense to me. You created the user spamfilter. You logged
>> in as spamfilter, su'd to root and su'd to spamfiltre? What does that
>> accomplish? Or are you logged in as James and trying to be spamfilter?
>> If so does not: login spamfilter do the same thing? (I did a fair bit of
>> unix back in '93, then nothing for over 10 years...).
>>
>>     
>
> When you su to root, then su to spamfilter, you in effect are now logged in
> as that user.  Because spamd will drop privileges to spamfilter, you should
> setup pyzor and razor and run test like spamassassin -D --lint as the user
> it will be running as.
>   
I just created the spamfilter userid and group. I did not install pyzor 
or razor yet. What are they and why do I want to install them?

I ran the spamassassin -D --lint

I had a bit of a problem adding the -u spamfilter, so I asked on the 
Centos list where I was suppose to do this and was told it goes in 
/etc/sysconfig/spamassassin. That worked but I am still getting the 
errors. Even after a system reboot.

Oh and nothing in the /home/spamfilter/.spamassassin

2264 root 15:48 /usr/bin/spamd -u spamfilter -d -c -m5 -H -r 
/var/run/spamd.pid
2301 spamfilter 15:48 spamd child
2302 spamfilter 15:48 spamd child

Aug 17 16:00:31 z9m9z sendmail[3913]: l7HK0VeM003913: 
from=<1-...@mx121.susanshopping.com>, size=6708, 
class=0, nrcpts=1, 
msgid=<1-...@mx121.susanshopping.com>, 
proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 17 16:00:31 z9m9z spamd[2301]: spamd: connection from 
localhost.localdomain [127.0.0.1] at port 36972
Aug 17 16:00:31 z9m9z spamd[2301]: spamd: creating default_prefs: 
/root/.spamassassin/user_prefs
Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission 
denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 16:00:31 z9m9z spamd[2301]: config: cannot write to 
/root/.spamassassin/user_prefs: Permission denied
Aug 17 16:00:31 z9m9z spamd[2301]: spamd: failed to create readable 
default_prefs: /root/.spamassassin/user_prefs
Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission 
denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 16:00:31 z9m9z spamd[2301]: spamd: processing message 
<1-...@mx121.susanshopping.com> for root:502
Aug 17 16:00:33 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission 
denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 16:00:33 z9m9z spamd[2301]: locker: safe_lock: cannot create tmp 
lockfile 
/root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for 
/root/.spamassassin/auto-whitelist.lock: Permission denied
Aug 17 16:00:33 z9m9z spamd[2301]: auto-whitelist: open of 
auto-whitelist file failed: locker: safe_lock: cannot create tmp 
lockfile 
/root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for 
/root/.spamassassin/auto-whitelist.lock: Permission denied
Aug 17 16:00:33 z9m9z spamd[2301]: spamd: identified spam (8.5/5.0) for 
root:502 in 2.6 seconds, 7247 bytes.



Re: Different permission problems

Posted by Matt Kettler <mk...@verizon.net>.
Robert Moskowitz wrote:
> The saga continues.
>
> Still don't have things right, where might I look?
>
> Why does spam assassin continue to try and write to /root ??
You're running 3.1.9 I see, from past posts.

That version is subject to this bug in the setuid code:

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5574

This bugfix is pending for the not-yet-released 3.1.10 tree, and is
already present in the fully-released 3.2.3 version of spamassassin.

I'm not 100% sure if that's the cause, but it seems quite likely. (note:
there's a LOT of unrelated stuff on that bugreport)



Different permission problems

Posted by Robert Moskowitz <rg...@htt-consult.com>.
The saga continues.

Still don't have things right, where might I look?

Why does spam assassin continue to try and write to /root ??


Aug 17 17:13:09 z9m9z spamd[10449]: spamd: connection from 
localhost.localdomain [127.0.0.1] at port 59858
Aug 17 17:13:09 z9m9z spamd[10449]: spamd: creating default_prefs: 
/root/.spamassassin/user_prefs
Aug 17 17:13:09 z9m9z spamd[10449]: mkdir /root/.spamassassin: 
Permission denied at 
/usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 17:13:09 z9m9z spamd[10449]: config: cannot write to 
/root/.spamassassin/user_prefs: Permission denied
Aug 17 17:13:09 z9m9z spamd[10449]: spamd: failed to create readable 
default_prefs: /root/.spamassassin/user_prefs
Aug 17 17:13:09 z9m9z spamd[10449]: mkdir /root/.spamassassin: 
Permission denied at 
/usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
Aug 17 17:13:09 z9m9z spamd[10449]: spamd: processing message 
<LY...@lists.universalservice.org> 
for root:502



Re: Addendum -- New spamassassin significant install problems

Posted by James Lay <jl...@slave-tothe-box.net>.


On 8/17/07 11:53 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:

> More questions...
> 
> James Lay wrote:
>> 
>> On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>> 
>>   
>>> thanks for the quick reply.
>>> 
>>> James Lay wrote:
>>>     
>>>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>> 
>>>>   
>>>>       
>>>>> I left off below that I am using
>>>>> spam-milter 0.3.1-1
>>>>> 
>>>>> ===================================================================
>>>>> 
>>>>> I am new to this.  I have been running my mail server in various flavors
>>>>> for 10+ years. Always trying to do better....
>>>>> 
>>>>> PLATFORM:
>>>>> 
>>>>> Centos 5.0
>>>>> 1Ghz processor 512Mb memory
>>>>> 
>>>>> Mail server:        Scalix 11.1
>>>>> MTA:                   Sendmail ver. 8.13.8
>>>>> Spamassassin:   3.1.9
>>>>> Webmin:             1.360
>>>>> 
>>>>> I followed the Scalix WiKi spamassassin install instructions:
>>>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>>>> 
>>>>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>>>>> The meter just sits there near the beginning for quite some time.
>>>>> Often, the sending times out.
>>>>> 
>>>>> I read through much of the spamassassin WiKi.  Nothing on performance
>>>>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>>>>> problems.
>>>>> 
>>>>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>>>>> via webmin and caught the following in the maillog:
>>>>> 
>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>>>> localhost.localdomain [127.0.0.1] at port 48800
>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>>>>> not specified with -u, not found, or set to root, falling back to nobody
>>>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>>>     
>>>>>         
>>>> Robert,
>>>> 
>>>> What's your startup line to start spamd look like?  If you're starting it
>>>> like:
>>>> 
>>>> Spamd -u spamduser
>>>>   
>>>>       
>>> from file: /etc/rc.d/init.d/spamassassin:
>>> 
>>> # Set default spamd configuration.
>>> SPAMDOPTIONS="-d -c -m5 -H"
>>> SPAMD_PID=/var/run/spamd.pid
>>> 
>>> and as you can see below, the actual command that got run was:
>>> 
>>> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
>>> 
>>> So no -u at all!
>>>     
>>>> Is that user in your /etc/passwd file?
>>>>   
>>>>       
>>> No spamduser.
>>> 
>>> What files would I expect to see owned by spamduser. Oh, wait. If the
>>> user's not there, there better not be any files owned by it....
>>>     
>> 
>> Doh!
>> 
>> It's running as root then
> Gee, I thought that was clear from the maillog lines and running
> processes...
> 
> But then it has those processes running as 'nobody' as well..
>> ...no goodness there.
> Why not? Security (it should be running chrooted then?)? other reasons?
>> I created a user and group
>> called spamfilter, then su'd to root, then su'd to spamfilter and ran my
>> bayes and pyzor setups as spamfilter.
> This makes no sense to me. You created the user spamfilter. You logged
> in as spamfilter, su'd to root and su'd to spamfiltre? What does that
> accomplish? Or are you logged in as James and trying to be spamfilter?
> If so does not: login spamfilter do the same thing? (I did a fair bit of
> unix back in '93, then nothing for over 10 years...).
> 

When you su to root, then su to spamfilter, you in effect are now logged in
as that user.  Because spamd will drop privileges to spamfilter, you should
setup pyzor and razor and run test like spamassassin -D --lint as the user
it will be running as.

> And how do you run the bayes and pyzor setups? I am looking for a url
> but not finding it...

Pyzor:  http://wiki.apache.org/spamassassin/UsingPyzor

Razor:  http://wiki.apache.org/spamassassin/RazorSiteWide

Note, I pointed these all to /home/spamfilter instead of
/etc/mail/spamassassin and ran them as user spamfilter.

>> Here's what's in the dir:
>> 
>> drwxr-xr-x  2 spamfilter spamfilter 4096 2005-09-03 11:31 .pyzor
>> drwxr-xr-x  2 spamfilter spamfilter 4096 2005-10-09 19:22 .razor
>> drwx------  2 spamfilter spamfilter 4096 2007-08-17 11:25 .spamassassin
>> 
>> These are auto created I believe.  Maybe try a similar setup on your
>> machine...add the user and group, make sure /home/spamfilter is owned by
>> spamfilter, 
> That makes sense, but where did the .spamassassin come from? Creating
> the user, or the bayes setup.......
>> then modify the options above to -u spamfilter,
> Wait! above where? In the /etc/rc.d/d.init/spamassassin? Adding the -u
> option to the list of defaults?

Add that -u spamfilter to your SPAMDOPTIONS=

>> then su to root,
>> su to spamfilter, cd to /home/spamfilter and rum spammassassin --lint, then
>> spamassassin -D --lint and see if you get any errors.
> ???? Where is there info on these command line uses of spamassassin.
> Nothing in the Man pages.

Spamassassin -h will give you the options.

>> Also, may want to change the shell in your /etc/passwd to /bin/false so that
>> user has no
>> remote access.
>>   
> yeah, makes sense once you have things working...
>> James
>>   
>>>>> And looking at running processes via webmin I see:
>>>>> 
>>>>> 1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
>>>>> /var/run/spamd.pid
>>>>> 1381     nobody     12:13     spamd child
>>>>> 1382     root     12:13     spamd child
>>>>> 
>>>>> What do I change so that it does not fall back to 'nobody'?
>>>>> 
>>>>> Now this MIGHT explain something else I am seeing in maillog:
>>>>> 
>>>>> Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
>>>>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>>>>> Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
>>>>> lockfile
>>>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>>>> Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
>>>>> auto-whitelist file failed: locker: safe_lock: cannot create tmp
>>>>> lockfile
>>>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>>>> 
>>>>> Please lend me a hand in cleaning what looks to be a very basic set of
>>>>> install problems.
>>>>>     
>>>>>         
>> 
>> 
>> 
>>   



Re: Addendum -- New spamassassin significant install problems

Posted by Robert Moskowitz <rg...@htt-consult.com>.
More questions...

James Lay wrote:
>
> On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>
>   
>> thanks for the quick reply.
>>
>> James Lay wrote:
>>     
>>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>>>
>>>   
>>>       
>>>> I left off below that I am using
>>>> spam-milter 0.3.1-1
>>>>
>>>> ===================================================================
>>>>
>>>> I am new to this.  I have been running my mail server in various flavors
>>>> for 10+ years. Always trying to do better....
>>>>
>>>> PLATFORM:
>>>>
>>>> Centos 5.0
>>>> 1Ghz processor 512Mb memory
>>>>
>>>> Mail server:        Scalix 11.1
>>>> MTA:                   Sendmail ver. 8.13.8
>>>> Spamassassin:   3.1.9
>>>> Webmin:             1.360
>>>>
>>>> I followed the Scalix WiKi spamassassin install instructions:
>>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>>>
>>>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>>>> The meter just sits there near the beginning for quite some time.
>>>> Often, the sending times out.
>>>>
>>>> I read through much of the spamassassin WiKi.  Nothing on performance
>>>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>>>> problems.
>>>>
>>>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>>>> via webmin and caught the following in the maillog:
>>>>
>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>>> localhost.localdomain [127.0.0.1] at port 48800
>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>>>> not specified with -u, not found, or set to root, falling back to nobody
>>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>>     
>>>>         
>>> Robert,
>>>
>>> What's your startup line to start spamd look like?  If you're starting it
>>> like:
>>>
>>> Spamd -u spamduser
>>>   
>>>       
>> from file: /etc/rc.d/init.d/spamassassin:
>>
>> # Set default spamd configuration.
>> SPAMDOPTIONS="-d -c -m5 -H"
>> SPAMD_PID=/var/run/spamd.pid
>>
>> and as you can see below, the actual command that got run was:
>>
>> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
>>
>> So no -u at all!
>>     
>>> Is that user in your /etc/passwd file?
>>>   
>>>       
>> No spamduser.
>>
>> What files would I expect to see owned by spamduser. Oh, wait. If the
>> user's not there, there better not be any files owned by it....
>>     
>
> Doh!
>
> It's running as root then
Gee, I thought that was clear from the maillog lines and running 
processes...

But then it has those processes running as 'nobody' as well..
> ...no goodness there.
Why not? Security (it should be running chrooted then?)? other reasons?
> I created a user and group
> called spamfilter, then su'd to root, then su'd to spamfilter and ran my
> bayes and pyzor setups as spamfilter.  
This makes no sense to me. You created the user spamfilter. You logged 
in as spamfilter, su'd to root and su'd to spamfiltre? What does that 
accomplish? Or are you logged in as James and trying to be spamfilter? 
If so does not: login spamfilter do the same thing? (I did a fair bit of 
unix back in '93, then nothing for over 10 years...).

And how do you run the bayes and pyzor setups? I am looking for a url 
but not finding it...
> Here's what's in the dir:
>
> drwxr-xr-x  2 spamfilter spamfilter 4096 2005-09-03 11:31 .pyzor
> drwxr-xr-x  2 spamfilter spamfilter 4096 2005-10-09 19:22 .razor
> drwx------  2 spamfilter spamfilter 4096 2007-08-17 11:25 .spamassassin
>
> These are auto created I believe.  Maybe try a similar setup on your
> machine...add the user and group, make sure /home/spamfilter is owned by
> spamfilter, 
That makes sense, but where did the .spamassassin come from? Creating 
the user, or the bayes setup.......
> then modify the options above to -u spamfilter, 
Wait! above where? In the /etc/rc.d/d.init/spamassassin? Adding the -u 
option to the list of defaults?
> then su to root,
> su to spamfilter, cd to /home/spamfilter and rum spammassassin --lint, then
> spamassassin -D --lint and see if you get any errors.
???? Where is there info on these command line uses of spamassassin. 
Nothing in the Man pages.
> Also, may want to change the shell in your /etc/passwd to /bin/false so that user has no
> remote access.
>   
yeah, makes sense once you have things working...
> James
>   
>>>> And looking at running processes via webmin I see:
>>>>
>>>> 1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
>>>> /var/run/spamd.pid
>>>> 1381     nobody     12:13     spamd child
>>>> 1382     root     12:13     spamd child
>>>>
>>>> What do I change so that it does not fall back to 'nobody'?
>>>>
>>>> Now this MIGHT explain something else I am seeing in maillog:
>>>>
>>>> Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
>>>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>>>> Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
>>>> lockfile
>>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>>> Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
>>>> auto-whitelist file failed: locker: safe_lock: cannot create tmp
>>>> lockfile
>>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>>>
>>>> Please lend me a hand in cleaning what looks to be a very basic set of
>>>> install problems.
>>>>     
>>>>         
>
>
>
>   

Re: Addendum -- New spamassassin significant install problems

Posted by James Lay <jl...@slave-tothe-box.net>.


On 8/17/07 11:24 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:

> thanks for the quick reply.
> 
> James Lay wrote:
>> 
>> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>> 
>>   
>>> I left off below that I am using
>>> spam-milter 0.3.1-1
>>> 
>>> ===================================================================
>>> 
>>> I am new to this.  I have been running my mail server in various flavors
>>> for 10+ years. Always trying to do better....
>>> 
>>> PLATFORM:
>>> 
>>> Centos 5.0
>>> 1Ghz processor 512Mb memory
>>> 
>>> Mail server:        Scalix 11.1
>>> MTA:                   Sendmail ver. 8.13.8
>>> Spamassassin:   3.1.9
>>> Webmin:             1.360
>>> 
>>> I followed the Scalix WiKi spamassassin install instructions:
>>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>> 
>>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>>> The meter just sits there near the beginning for quite some time.
>>> Often, the sending times out.
>>> 
>>> I read through much of the spamassassin WiKi.  Nothing on performance
>>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>>> problems.
>>> 
>>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>>> via webmin and caught the following in the maillog:
>>> 
>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>>> localhost.localdomain [127.0.0.1] at port 48800
>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>>> not specified with -u, not found, or set to root, falling back to nobody
>>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>>     
>> 
>> Robert,
>> 
>> What's your startup line to start spamd look like?  If you're starting it
>> like:
>> 
>> Spamd -u spamduser
>>   
> from file: /etc/rc.d/init.d/spamassassin:
> 
> # Set default spamd configuration.
> SPAMDOPTIONS="-d -c -m5 -H"
> SPAMD_PID=/var/run/spamd.pid
> 
> and as you can see below, the actual command that got run was:
> 
> /usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid
> 
> So no -u at all!
>> Is that user in your /etc/passwd file?
>>   
> No spamduser.
> 
> What files would I expect to see owned by spamduser. Oh, wait. If the
> user's not there, there better not be any files owned by it....

Doh!

It's running as root then...no goodness there.  I created a user and group
called spamfilter, then su'd to root, then su'd to spamfilter and ran my
bayes and pyzor setups as spamfilter.  Here's what's in the dir:

drwxr-xr-x  2 spamfilter spamfilter 4096 2005-09-03 11:31 .pyzor
drwxr-xr-x  2 spamfilter spamfilter 4096 2005-10-09 19:22 .razor
drwx------  2 spamfilter spamfilter 4096 2007-08-17 11:25 .spamassassin

These are auto created I believe.  Maybe try a similar setup on your
machine...add the user and group, make sure /home/spamfilter is owned by
spamfilter, then modify the options above to -u spamfilter, then su to root,
su to spamfilter, cd to /home/spamfilter and rum spammassassin --lint, then
spamassassin -D --lint and see if you get any errors.  Also, may want to
change the shell in your /etc/passwd to /bin/false so that user has no
remote access.

James
>>> And looking at running processes via webmin I see:
>>> 
>>> 1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
>>> /var/run/spamd.pid
>>> 1381     nobody     12:13     spamd child
>>> 1382     root     12:13     spamd child
>>> 
>>> What do I change so that it does not fall back to 'nobody'?
>>> 
>>> Now this MIGHT explain something else I am seeing in maillog:
>>> 
>>> Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
>>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>>> Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
>>> lockfile
>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>> Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
>>> auto-whitelist file failed: locker: safe_lock: cannot create tmp
>>> lockfile
>>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>> 
>>> Please lend me a hand in cleaning what looks to be a very basic set of
>>> install problems.
>>>     
> 



Re: Addendum -- New spamassassin significant install problems

Posted by Robert Moskowitz <rg...@htt-consult.com>.
thanks for the quick reply.

James Lay wrote:
>
> On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:
>
>   
>> I left off below that I am using
>> spam-milter 0.3.1-1
>>
>> ===================================================================
>>
>> I am new to this.  I have been running my mail server in various flavors
>> for 10+ years. Always trying to do better....
>>
>> PLATFORM:
>>
>> Centos 5.0
>> 1Ghz processor 512Mb memory
>>
>> Mail server:        Scalix 11.1
>> MTA:                   Sendmail ver. 8.13.8
>> Spamassassin:   3.1.9
>> Webmin:             1.360
>>
>> I followed the Scalix WiKi spamassassin install instructions:
>> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
>>
>> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
>> The meter just sits there near the beginning for quite some time.
>> Often, the sending times out.
>>
>> I read through much of the spamassassin WiKi.  Nothing on performance
>> seems to apply.  When I go into the /var/log/maillog, I catch soom real
>> problems.
>>
>> I enabled DNS checking (dns_available yes) and restarted spamassassin
>> via webmin and caught the following in the maillog:
>>
>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
>> localhost.localdomain [127.0.0.1] at port 48800
>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
>> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
>> not specified with -u, not found, or set to root, falling back to nobody
>> at /usr/bin/spamd line 1161, <GEN4> line 4.
>>     
>
> Robert,
>
> What's your startup line to start spamd look like?  If you're starting it
> like:
>
> Spamd -u spamduser
>   
from file: /etc/rc.d/init.d/spamassassin:

# Set default spamd configuration.
SPAMDOPTIONS="-d -c -m5 -H"
SPAMD_PID=/var/run/spamd.pid

and as you can see below, the actual command that got run was:

/usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid

So no -u at all!
> Is that user in your /etc/passwd file?
>   
No spamduser.

What files would I expect to see owned by spamduser. Oh, wait. If the 
user's not there, there better not be any files owned by it....
>> And looking at running processes via webmin I see:
>>
>> 1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
>> /var/run/spamd.pid
>> 1381     nobody     12:13     spamd child
>> 1382     root     12:13     spamd child
>>
>> What do I change so that it does not fall back to 'nobody'?
>>
>> Now this MIGHT explain something else I am seeing in maillog:
>>
>> Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
>> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
>> Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
>> lockfile
>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>> Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
>> auto-whitelist file failed: locker: safe_lock: cannot create tmp
>> lockfile
>> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
>> /root/.spamassassin/auto-whitelist.lock: Permission denied
>>
>> Please lend me a hand in cleaning what looks to be a very basic set of
>> install problems.
>>     


Re: Addendum -- New spamassassin significant install problems

Posted by James Lay <jl...@slave-tothe-box.net>.


On 8/17/07 10:58 AM, "Robert Moskowitz" <rg...@htt-consult.com> wrote:

> I left off below that I am using
> spam-milter 0.3.1-1
> 
> ===================================================================
> 
> I am new to this.  I have been running my mail server in various flavors
> for 10+ years. Always trying to do better....
> 
> PLATFORM:
> 
> Centos 5.0
> 1Ghz processor 512Mb memory
> 
> Mail server:        Scalix 11.1
> MTA:                   Sendmail ver. 8.13.8
> Spamassassin:   3.1.9
> Webmin:             1.360
> 
> I followed the Scalix WiKi spamassassin install instructions:
> http://www.scalix.com/wiki/index.php?title=HowTos/SpamAssassin
> 
> I am using Thunderbird 1.5.0.12, sending mail has a significant delay.
> The meter just sits there near the beginning for quite some time.
> Often, the sending times out.
> 
> I read through much of the spamassassin WiKi.  Nothing on performance
> seems to apply.  When I go into the /var/log/maillog, I catch soom real
> problems.
> 
> I enabled DNS checking (dns_available yes) and restarted spamassassin
> via webmin and caught the following in the maillog:
> 
> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: connection from
> localhost.localdomain [127.0.0.1] at port 48800
> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: setuid to root succeeded
> Aug 17 12:13:28 z9m9z spamd[1381]: spamd: still running as root: user
> not specified with -u, not found, or set to root, falling back to nobody
> at /usr/bin/spamd line 1161, <GEN4> line 4.

Robert,

What's your startup line to start spamd look like?  If you're starting it
like:

Spamd -u spamduser

Is that user in your /etc/passwd file?

James

> 
> And looking at running processes via webmin I see:
> 
> 1373     root     12:13     /usr/bin/spamd -d -c -m5 -H -r
> /var/run/spamd.pid
> 1381     nobody     12:13     spamd child
> 1382     root     12:13     spamd child
> 
> What do I change so that it does not fall back to 'nobody'?
> 
> Now this MIGHT explain something else I am seeing in maillog:
> 
> Aug 17 12:48:16 z9m9z spamd[1381]: mkdir /root/.spamassassin: Permission
> denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536
> Aug 17 12:48:16 z9m9z spamd[1381]: locker: safe_lock: cannot create tmp
> lockfile
> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> Aug 17 12:48:16 z9m9z spamd[1381]: auto-whitelist: open of
> auto-whitelist file failed: locker: safe_lock: cannot create tmp
> lockfile
> /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.1381 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> 
> Please lend me a hand in cleaning what looks to be a very basic set of
> install problems.
> 
>