You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by hansje2000 <ke...@xs4all.nl> on 2006/07/07 00:34:45 UTC
set permission? how
How to set permission to usser spambucket
I created a new usser (spambucket) on my box. he has his own
/home/spambucket
Next i fired up as root:
Next: [root@ProdecoBoy root]# spamd -u spambucket
Output=
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
from=<aa...@aaaa.nl>, size=2933, class=0, nrcpts=1,
msgid=<00...@desktophenco>, proto=ESMTP,
daemon=MTA, relay=smtp-vbr5.xs4all.nl [194.109.24.25]
Jul 6 13:29:36 localhost spamd[4018]: spamd: connection from
localhost.localdomain [127.0.0.1] at port 33321
Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
permission at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
Jul 6 13:29:36 localhost spamd[4018]: spamd: processing message
<00...@desktophenco> for root:508
Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
permission at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
Jul 6 13:29:36 localhost spamd[4018]: locker: safe_lock: cannot create tmp
lockfile /root/.spamassassin/auto-whitelist.lock.ProdecoBoy.4018 for
/root/.spamassassin/auto-whitelist.lock: no permission
Jul 6 13:29:36 localhost spamd[4018]: auto-whitelist: open of
auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile
/root/.spamassassin/auto-whitelist.lock.ProdecoBoy.4018 for
/root/.spamassassin/auto-whitelist.lock: Toegang geweigerd
Jul 6 13:29:36 localhost spamd[4018]: spamd: identified spam (1001.3/5.0)
for root:508 in 0.2 seconds, 3242 bytes.
Jul 6 13:29:36 localhost spamd[4018]: spamd: result: Y 1001 -
GTUBE,HTML_MESSAGE,MISSING_SUBJECT
scantime=0.2,size=3242,user=root,uid=508,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33321,mid=<00...@desktophenco>,autolearn=no
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter add:
header: X-Spam-Flag: YES
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter add:
header: X-Spam-Status: Yes, score=1001.3 required=5.0
tests=GTUBE,HTML_MESSAGE,\r\n\tMISSING_SUBJECT autolearn=no version=3.1.3
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter: data,
reject=550 5.7.1 Blocked by SpamAssassin
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
to=<fd...@fdsfsdfds.nl>, delay=00:00:00, pri=32933, stat=Blocked by
SpamAssassin
Jul 6 13:29:36 localhost spamd[4016]: prefork: child states: II
Jul 6 13:29:50 localhost spamd[4016]: spamd: server hit by SIGHUP,
restarting
Jul 6 13:29:50 localhost spamd[4016]: SIGCHLD handler "DEFAULT" not
defined.
Jul 6 13:29:50 localhost spamd[4016]: spamd: child 4019 killed successfully
Jul 6 13:29:50 localhost spamd[4016]: spamd: child 4018 killed successfully
How do is setup the permission to usr spambucket..
--
View this message in context: http://www.nabble.com/set-permission--how-tf1903359.html#a5208689
Sent from the SpamAssassin - Users forum at Nabble.com.
Re: set permission? how
Posted by jdow <jd...@earthlink.net>.
man spamd
About 20 to 30 lines down the page.
{^_^}
----- Original Message -----
From: "hansje2000" <ke...@xs4all.nl>
>
> Yes i know thate already, but how do i have to tell spamd to run under usr
> spambucket, and not as root.
>
>
> --
> View this message in context:
> http://www.nabble.com/set-permission--how-tf1903359.html#a5209496
> Sent from the SpamAssassin - Users forum at Nabble.com.
Re: set permission? how
Posted by hansje2000 <ke...@xs4all.nl>.
Hey hello: some update whate i did to try spamassassin running
The first thing I want to say is that it looks like spamassassin is running
?!
Okay first of all what I did today:
1: I said # spamass-milter -p /var/run/spamass.sock -f -b
spambucket@mydomain.com
So he puts the spam to spambucket mailbox
2: I put some lines in the /etc/mail/local.cf like Matthias said:
Bayes_path /home/spambucket/spamassassin/bayes
Auto_whitelist_path /home/spambucket/spamassassin/auto-whitelist
(I hope that this is the normal way to config it here, looks a little
strange, but it seems to work).
3: I said # spamd ?u spambucket
Okey hey created the file auto-whitelist in /home/spambucket/spamassassin/
now (looks good)
4: I sent myself some spam and look at the mail log :
Jul 10 14:19:56 localhost spamd[3561]: auto-whitelist: open of
auto-whitelist file failed: auto-whitelist: cannot open auto_whitelist_path
/home/spambucket/spamassassin/auto-whitelist: Ongeschikte I/O
besturingsoperatie voor apparaat
So he says thate there is a I/O error.
Now I looked at the file(/home/spambucket/spamassassin/auto-whitelist) it
has user and group (root permission).
5: I changed this file to spambucket permission (I hope thate I did good by
this???)
Now it seems to work when I see my mail-log!!
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024:
from=<se...@mail.nl>, size=2992, class=0, nrcpts=1,
msgid=<00...@desktophenco>, proto=ESMTP,
daemon=MTA, relay=smtp-vbr9.xs4all.nl [194.109.24.29]
Jul 10 14:44:18 localhost spamd[4022]: spamd: connection from
localhost.localdomain [127.0.0.1] at port 33922
Jul 10 14:44:18 localhost spamd[4022]: spamd: processing message
<00...@desktophenco> for root:508
Jul 10 14:44:18 localhost spamd[4022]: spamd: identified spam (1001.3/5.0)
for root:508 in 0.2 seconds, 3387 bytes.
Jul 10 14:44:18 localhost spamd[4022]: spamd: result: Y 1001 -
GTUBE,HTML_MESSAGE,MISSING_SUBJECT
scantime=0.2,size=3387,user=root,uid=508,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33922,mid=<00...@desktophenco>,autolearn=no
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-Spam-Flag: YES
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-Spam-Status: Yes, score=1001.3 required=5.0
tests=GTUBE,HTML_MESSAGE,\n\tMISSING_SUBJECT autolearn=no version=3.1.3
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add: rcpt:
spambucket@mail.nl
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-Spam-Orig-To: <re...@mail.nl>
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter delete:
rcpt <re...@mail.nl>
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-Spam-Level: **************************************************
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on
ProdecoBoy
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: Subject: *****SPAM*****
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter change:
header Content-Type: from
multipart/alternative;\n\tboundary="----=_NextPart_000_003B_01C6A42F.4DC852B0"
to multipart/mixed; boundary="----------=_44B24BA2.69B131D0"
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter message:
body replaced
Jul 10 14:44:19 localhost spamd[4020]: prefork: child states: II
Jul 10 14:44:19 localhost sendmail[4027]: k6ACiIWi004024:
to=spambucket@mail.nl, delay=00:00:01, xdelay=00:00:00, mailer=local,
pri=37064, dsn=2.0.0, stat=Sent
Jul 10 14:44:20 localhost ipop3d[4029]: pop3 service init from 192.168.0.2
Okey seems to work now??
Okey some questions about what I did today:
1: When I restart my linuxbox spamassassin falls back to user root again!
How can I prevent this to keep it -u spambucket?
2: In the beginning I told spamass-milter to sent the spam to spambucket
mailbox, but it does not happen ;(
Little mail-log:
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add: rcpt:
spambucket@mail.nl
But I get the spam mail in my normal mailbox. How can I set this right?
3: did i do good to set permission on auto-whitelist to spambucket?
Many credits and thanks for reply
Matthias and Jdow
--
View this message in context: http://www.nabble.com/set-permission--how-tf1903359.html#a5251716
Sent from the SpamAssassin - Users forum at Nabble.com.
Re: set permission? how
Posted by jdow <jd...@earthlink.net>.
From: "Matthias Fuhrmann" <Ma...@stud.uni-hannover.de>
> On Sat, 8 Jul 2006, hansje2000 wrote:
>
>>
>> I realy tryed evrything on her, but still thate permission errors.
>>
>> i reinstal it for 5 times now..
>> read about 100 pages of spammassassin but nothing specialy about settingup
>> for ussers to find just little pieces.. and did not reale help me out there.
>>
>> The user spambucket is present on my box.
>>
>> did 100 times spamd -u spambucket
>> did 100 times spamc -u spambucket
>> did 100 times spamass-milter -u spambucket
>> And still have thate no permision error.
>>
>> How can i prevent this on the hard way to run as spambucket?
>>
>> Is there some other command
>
> no, its all invoked by those commands above (spamd/spamc).
> have alook in your init script /etc/init.d/spamassassin. the line which
> executes spamd looks like:
> spamd -u spambucket ... ?
>
> ensure spamd is runing as user spambucket while listing processes using:
> ps -ef | grep spamd
>
> if so, have a look in your /etc/mail/spamassassin/local.cf
> did you defined things like:
> bayes_path /home/spambucket/.spamassassin/bayes
> auto_whitelist_path /home/spambucket/.spamassassin/auto-whitelist
>
> hope this helps a bit,
For one thing he never dropped spamd into the daemon mode. So it's
not running when he tries to run spamc, which makes the whole exercise
futile.
The simplest way to run spamd is to take its defaults and run it as
"spamd -d". Then it will be running in the background. Of course, to
stop it you need to send its process a SIGKILL. And there is a
possibility that by now he has something lurking in the background
that needs the SIGKILL treatment. Do all this as root. Don't get
fancy and run as something else until you have its basics working.
Once he has spamd running, one basic process and its children processes,
he can try spamc. I don't remember what it was he was trying to accomplish
with the -u spambucket. But if he wants to test as user spambucket and
the /home/spambucket directory is present then he can copy some sample
messages to "/home/spambucket" and run "su -l spambucket" to get into
that account. Now he can sit and run the simplest instance of spamc,
"spamc < testmessage1" to run spamc against test message 1. Once this
much is working he can study it and start making the changes he wants.
{^_^}
Re: set permission? how
Posted by Matthias Fuhrmann <Ma...@stud.uni-hannover.de>.
On Sat, 8 Jul 2006, hansje2000 wrote:
>
> I realy tryed evrything on her, but still thate permission errors.
>
> i reinstal it for 5 times now..
> read about 100 pages of spammassassin but nothing specialy about settingup
> for ussers to find just little pieces.. and did not reale help me out there.
>
> The user spambucket is present on my box.
>
> did 100 times spamd -u spambucket
> did 100 times spamc -u spambucket
> did 100 times spamass-milter -u spambucket
> And still have thate no permision error.
>
> How can i prevent this on the hard way to run as spambucket?
>
> Is there some other command
no, its all invoked by those commands above (spamd/spamc).
have alook in your init script /etc/init.d/spamassassin. the line which
executes spamd looks like:
spamd -u spambucket ... ?
ensure spamd is runing as user spambucket while listing processes using:
ps -ef | grep spamd
if so, have a look in your /etc/mail/spamassassin/local.cf
did you defined things like:
bayes_path /home/spambucket/.spamassassin/bayes
auto_whitelist_path /home/spambucket/.spamassassin/auto-whitelist
hope this helps a bit,
regards,
Matthias
Re: set permission? how
Posted by hansje2000 <ke...@xs4all.nl>.
I realy tryed evrything on her, but still thate permission errors.
i reinstal it for 5 times now..
read about 100 pages of spammassassin but nothing specialy about settingup
for ussers to find just little pieces.. and did not reale help me out there.
The user spambucket is present on my box.
did 100 times spamd -u spambucket
did 100 times spamc -u spambucket
did 100 times spamass-milter -u spambucket
And still have thate no permision error.
How can i prevent this on the hard way to run as spambucket?
Is there some other command
MAIL -LOG
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630:
from=<bl...@blablabla.nl>, size=2991, class=0, nrcpts=1,
msgid=<00...@desktophenco>, proto=ESMTP,
daemon=MTA, relay=smtp-vbr12.xs4all.nl [194.109.24.32]
Jul 8 10:03:07 localhost spamd[3579]: spamd: connection from
localhost.localdomain [127.0.0.1] at port 33254
Jul 8 10:03:07 localhost spamd[3579]: mkdir /root/.spamassassin: No
permision at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
Jul 8 10:03:07 localhost spamd[3579]: spamd: processing message
<00...@desktophenco> for root:508
Jul 8 10:03:07 localhost spamd[3579]: mkdir /root/.spamassassin: No
permision at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
Jul 8 10:03:07 localhost spamd[3579]: locker: safe_lock: cannot create tmp
lockfile /root/.spamassassin/auto-whitelist.lock.ProdecoBoy.3579 for
/root/.spamassassin/auto-whitelist.lock: No permision
Jul 8 10:03:07 localhost spamd[3579]: auto-whitelist: open of
auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile
/root/.spamassassin/auto-whitelist.lock.ProdecoBoy.3579 for
/root/.spamassassin/auto-whitelist.lock: No permision
Jul 8 10:03:07 localhost spamd[3579]: spamd: identified spam (1001.3/5.0)
for root:508 in 0.2 seconds, 3387 bytes.
Jul 8 10:03:07 localhost spamd[3579]: spamd: result: Y 1001 -
GTUBE,HTML_MESSAGE,MISSING_SUBJECT
scantime=0.2,size=3387,user=root,uid=508,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33254,mid=<00...@desktophenco>,autolearn=no
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter add:
header: X-Spam-Flag: YES
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter add:
header: X-Spam-Status: Yes, score=1001.3 required=5.0
tests=GTUBE,HTML_MESSAGE,\n\tMISSING_SUBJECT autolearn=no version=3.1.3
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter add:
header: X-Spam-Level: **************************************************
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter add:
header: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on
ProdecoBoy
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter change:
header Content-Type: from
multipart/alternative;\n\tboundary="----=_NextPart_000_001F_01C6A275.B3D76930"
to multipart/mixed; boundary="----------=_44AF66BB.45CF1F16"
Jul 8 10:03:07 localhost sendmail[3630]: k68837Os003630: Milter message:
body replaced
Jul 8 10:03:08 localhost spamd[3568]: prefork: child states: II
Jul 8 10:03:07 localhost sendmail[3633]: k68837Os003630:
to=<fd...@fgdfds.nl>, delay=00:00:00, xdelay=00:00:00, mailer=local,
pri=37007, dsn=2.0.0, stat=Sent
--
View this message in context: http://www.nabble.com/set-permission--how-tf1903359.html#a5229172
Sent from the SpamAssassin - Users forum at Nabble.com.
Re: set permission? how
Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
hansje2000 wrote:
> Yes i know thate already, but how do i have to tell spamd to run under usr
> spambucket, and not as root.
As you know, you're already running spamd parent process as the user
"spambucket". If you want to have the spamd children run as that same
user then you need to run spamc either as the user "spambucket" or with
"-u spambucket".
Daryl
Re: set permission? how
Posted by hansje2000 <ke...@xs4all.nl>.
Yes i know thate already, but how do i have to tell spamd to run under usr
spambucket, and not as root.
--
View this message in context: http://www.nabble.com/set-permission--how-tf1903359.html#a5209496
Sent from the SpamAssassin - Users forum at Nabble.com.
Re: set permission? how
Posted by jdow <jd...@earthlink.net>.
Don't run it as root. As best I can tell from that chunk of log
sendmail is running spamc as root.
{^_^}
----- Original Message -----
From: "hansje2000" <ke...@xs4all.nl>
>
> How to set permission to usser spambucket
>
> I created a new usser (spambucket) on my box. he has his own
> /home/spambucket
>
> Next i fired up as root:
> Next: [root@ProdecoBoy root]# spamd -u spambucket
> Output=
>
>
> Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
> from=<aa...@aaaa.nl>, size=2933, class=0, nrcpts=1,
> msgid=<00...@desktophenco>, proto=ESMTP,
> daemon=MTA, relay=smtp-vbr5.xs4all.nl [194.109.24.25]
> Jul 6 13:29:36 localhost spamd[4018]: spamd: connection from
> localhost.localdomain [127.0.0.1] at port 33321
> Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
> permission at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
> Jul 6 13:29:36 localhost spamd[4018]: spamd: processing message
> <00...@desktophenco> for root:508
> Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
> permission at /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1486
> Jul 6 13:29:36 localhost spamd[4018]: locker: safe_lock: cannot create tmp
> lockfile /root/.spamassassin/auto-whitelist.lock.ProdecoBoy.4018 for
> /root/.spamassassin/auto-whitelist.lock: no permission
> Jul 6 13:29:36 localhost spamd[4018]: auto-whitelist: open of
> auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile
> /root/.spamassassin/auto-whitelist.lock.ProdecoBoy.4018 for
> /root/.spamassassin/auto-whitelist.lock: Toegang geweigerd
> Jul 6 13:29:36 localhost spamd[4018]: spamd: identified spam (1001.3/5.0)
> for root:508 in 0.2 seconds, 3242 bytes.
> Jul 6 13:29:36 localhost spamd[4018]: spamd: result: Y 1001 -
> GTUBE,HTML_MESSAGE,MISSING_SUBJECT
> scantime=0.2,size=3242,user=root,uid=508,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33321,mid=<00...@desktophenco>,autolearn=no
> Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter add:
> header: X-Spam-Flag: YES
> Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter add:
> header: X-Spam-Status: Yes, score=1001.3 required=5.0
> tests=GTUBE,HTML_MESSAGE,\r\n\tMISSING_SUBJECT autolearn=no version=3.1.3
> Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078: Milter: data,
> reject=550 5.7.1 Blocked by SpamAssassin
> Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
> to=<fd...@fdsfsdfds.nl>, delay=00:00:00, pri=32933, stat=Blocked by
> SpamAssassin
> Jul 6 13:29:36 localhost spamd[4016]: prefork: child states: II
> Jul 6 13:29:50 localhost spamd[4016]: spamd: server hit by SIGHUP,
> restarting
> Jul 6 13:29:50 localhost spamd[4016]: SIGCHLD handler "DEFAULT" not
> defined.
> Jul 6 13:29:50 localhost spamd[4016]: spamd: child 4019 killed successfully
> Jul 6 13:29:50 localhost spamd[4016]: spamd: child 4018 killed successfully
>
>
> How do is setup the permission to usr spambucket..
> --
> View this message in context:
> http://www.nabble.com/set-permission--how-tf1903359.html#a5208689
> Sent from the SpamAssassin - Users forum at Nabble.com.