set permission? how
8 answers - 2672 bytes -

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
=
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
from=<aaaaa (AT) aaaa (DOT) nl>, size=2933, class=0, nrcpts=1,
msgid=<000b01c6a0ef$74cda560$0200a8c0@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 / line 1486
Jul 6 13:29:36 localhost spamd[4018]: spamd: processing message
<000b01c6a0ef$74cda560$0200a8c0@desktophencofor root:508
Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
permission at / line 1486
Jul 6 13:29:36 localhost spamd[4018]: locker: safe_lock: cannot create tmp
lockfile / for
/ 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
/ for
/ 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=<000b01c6a0ef$74cda560$0200a8c0@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=<fdsfds (AT) fdsfsdfds (DOT) 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
No.1 | | 2875 bytes |
| 
Don't run it as root. As best I can tell from that chunk of log
sendmail is running spamc as root.
{^_^}
Message
From: "hansje2000" <keijz384 (AT) xs4all (DOT) 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
=
--
Jul 6 13:29:36 localhost sendmail[4078]: k66BTZrS004078:
from=<aaaaa (AT) aaaa (DOT) nl>, size=2933, class=0, nrcpts=1,
msgid=<000b01c6a0ef$74cda560$0200a8c0@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 / line 1486
Jul 6 13:29:36 localhost spamd[4018]: spamd: processing message
<000b01c6a0ef$74cda560$0200a8c0@desktophencofor root:508
Jul 6 13:29:36 localhost spamd[4018]: mkdir /root/.spamassassin: no
permission at / line 1486
Jul 6 13:29:36 localhost spamd[4018]: locker: safe_lock: cannot create tmp
lockfile / for
/ 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
/ for
/ 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=<000b01c6a0ef$74cda560$0200a8c0@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=<fdsfds (AT) fdsfsdfds (DOT) 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
No.2 | | 106 bytes |
| 
Yes i know thate already, but how do i have to tell spamd to run under usr
spambucket, and not as root.
No.3 | | 253 bytes |
| 
man spamd
About 20 to 30 lines down the page.
{^_^}
Message
From: "hansje2000" <keijz384 (AT) xs4all (DOT) nl>
Yes i know thate already, but how do i have to tell spamd to run under usr
spambucket, and not as root.
--
No.4 | | 400 bytes |
| 
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
No.5 | | 2981 bytes |
| 
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 -LG
Jul 8 10:03:07 localhost sendmail[3630]: :
from=<blablabla (AT) blablabla (DOT) nl>, size=2991, class=0, nrcpts=1,
msgid=<001e01c6a264$f04e9930$0200a8c0@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 / line 1486
Jul 8 10:03:07 localhost spamd[3579]: spamd: processing message
<001e01c6a264$f04e9930$0200a8c0@desktophencofor root:508
Jul 8 10:03:07 localhost spamd[3579]: mkdir /root/.spamassassin: No
permision at / line 1486
Jul 8 10:03:07 localhost spamd[3579]: locker: safe_lock: cannot create tmp
lockfile / for
/ 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
/ for
/ 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=<001e01c6a264$f04e9930$0200a8c0@desktophenco>,autolearn=no
Jul 8 10:03:07 localhost sendmail[3630]: : Milter add:
header: X-Spam-Flag: YES
Jul 8 10:03:07 localhost sendmail[3630]: : 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]: : Milter add:
header: X-Spam-Level:
Jul 8 10:03:07 localhost sendmail[3630]: : Milter add:
header: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on
ProdecoBoy
Jul 8 10:03:07 localhost sendmail[3630]: : Milter change:
header Content-Type: from
multipart/alternative;\n\tboundary=""
to multipart/mixed; boundary=""
Jul 8 10:03:07 localhost sendmail[3630]: : Milter message:
body replaced
Jul 8 10:03:08 localhost spamd[3568]: prefork: child states: II
Jul 8 10:03:07 localhost sendmail[3633]: :
to=<fdsf (AT) fgdfds (DOT) nl>, delay=00:00:00, xdelay=00:00:00, mailer=local,
pri=37007, dsn=2.0.0, stat=Sent
No.6 | | 1129 bytes |
| 
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 /
auto_whitelist_path /
hope this helps a bit,
regards,
Matthias
No.7 | | 2672 bytes |
| 
From: "Matthias Fuhrmann" <Matthias.Fuhrmann (AT) stud (DOT) uni-hannover.de>
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 /
auto_whitelist_path /
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. 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.
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. this
much is working he can study it and start making the changes he wants.
{^_^}
No.8 | | 4444 bytes |
| 
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
?!
first of all what I did today:
1: I said # spamass-milter -p /var/run/spamass.sock -f -b
spambucket (AT) mydomain (DOT) 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 /
Auto_whitelist_path /
(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
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
/ I/
besturingsoperatie voor apparaat
So he says thate there is a I/ error.
Now I looked at the file(/) 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=<sender (AT) mail (DOT) nl>, size=2992, class=0, nrcpts=1,
msgid=<003a01c6a41e$8a3f82b0$0200a8c0@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
<003a01c6a41e$8a3f82b0$0200a8c0@desktophencofor 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=<003a01c6a41e$8a3f82b0$0200a8c0@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 (AT) mail (DOT) nl
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter add:
header: X-STo: <recieve (AT) mail (DOT) nl>
Jul 10 14:44:18 localhost sendmail[4024]: k6ACiIWi004024: Milter delete:
rcpt <recieve (AT) mail (DOT) 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=""
to multipart/mixed; boundary=""
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 (AT) mail (DOT) 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
seems to work now?
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 (AT) mail (DOT) 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