Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Don Armstrong
On Sun, 08 Oct 2006, Zach Sadecki wrote:
 There are some basic incompatibility problems between the socket that 
 the spamass-milter startup script creates and what is needed for use 
 with Postfix.  First of all, Postfix runs chrooted, so the socket must 
 be under its queue directory (/var/spool/postfix) to be accessible. 
 Second, ownership and permissions prevent Postfix from using the socket, 
 as it runs as user 'postfix' and the socket is owned by root with 644 
 permissions.
 
 my hack to make this work on my system was to change $SOCKET in 
 /etc/init.d/spamass-milter to /var/spool/postfix/var/run/spamass.sock 
 and to add 'chown postfix $SOCKET' in the start/restart routine.

I've changed the way that this is done now; you can easily set SOCKET
in /etc/default/spamass-milter, and I've added an RUNAS option there
as well, which you can use to change the user that spamass-milter is
running as.

Can you check the debs on
http://archimedes.ucr.edu/ss/spamass-milter_0.3.1-3_i386.deb to make
sure that they resolve the issues for postfix users?


Don Armstrong
 
-- 
Certainly the game is rigged. Don't let that stop you. If you don't
bet, you can't win.
 -- Robert Heinlein _Time Enough For Love_ p240

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Zach Sadecki

I've changed the way that this is done now; you can easily set SOCKET
in /etc/default/spamass-milter, and I've added an RUNAS option there
as well, which you can use to change the user that spamass-milter is
running as.

Can you check the debs on
http://archimedes.ucr.edu/ss/spamass-milter_0.3.1-3_i386.deb to make
sure that they resolve the issues for postfix users?


Don Armstrong
 


With the 0.3.1-3 script I get this on startup:

Starting Sendmail milter plugin for SpamAssassin: Could not open
pidfile: Permission denied

I believe the problem is that the postfix user has no write permissions
to /var/run and therefore can't write the .pid file (error didn't go
away after I deleted spamass.pid).  Also previous versions of
spamass-milter leave the root owned .pid file in there after stopping
causing another owner/permission problem. I went in and manually changed
the owner of spamass.pid to postfix and the problem went away.

Also, another permission problem is that the /var/spool/postfix 
directory is owned by root, too, causing socket write issues during startup.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Don Armstrong
On Fri, 13 Oct 2006, Zach Sadecki wrote:
 Works fine now.  Thanks.

Ok; I've got one last iteration which should obviate the need to even
edit the defaults file. Can you see if it works for you?


Don Armstrong

-- 
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.
 -- Jeremy S. Anderson

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Zach Sadecki

Works fine now.  Thanks.

Don Armstrong wrote:

On Fri, 13 Oct 2006, Zach Sadecki wrote:


I've changed the way that this is done now; you can easily set SOCKET
in /etc/default/spamass-milter, and I've added an RUNAS option there
as well, which you can use to change the user that spamass-milter is
running as.

Can you check the debs on
http://archimedes.ucr.edu/ss/spamass-milter_0.3.1-3_i386.deb to make
sure that they resolve the issues for postfix users?


Don Armstrong


With the 0.3.1-3 script I get this on startup:

Starting Sendmail milter plugin for SpamAssassin: Could not open
pidfile: Permission denied

I believe the problem is that the postfix user has no write permissions
to /var/run and therefore can't write the .pid file (error didn't go
away after I deleted spamass.pid).  Also previous versions of
spamass-milter leave the root owned .pid file in there after stopping
causing another owner/permission problem. I went in and manually changed
the owner of spamass.pid to postfix and the problem went away.

Also, another permission problem is that the /var/spool/postfix
directory is owned by root, too, causing socket write issues during
startup.


Ah, ok...

I've changed the init scripts and defaults again, so it should work
correctly.

Can you try reinstalling the version above? (It's been updated)


Don Armstrong
 



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Don Armstrong
On Fri, 13 Oct 2006, Zach Sadecki wrote:

 I've changed the way that this is done now; you can easily set SOCKET
 in /etc/default/spamass-milter, and I've added an RUNAS option there
 as well, which you can use to change the user that spamass-milter is
 running as.
 
 Can you check the debs on
 http://archimedes.ucr.edu/ss/spamass-milter_0.3.1-3_i386.deb to make
 sure that they resolve the issues for postfix users?
 
 
 Don Armstrong
  
 
 With the 0.3.1-3 script I get this on startup:
 
 Starting Sendmail milter plugin for SpamAssassin: Could not open
 pidfile: Permission denied
 
 I believe the problem is that the postfix user has no write permissions
 to /var/run and therefore can't write the .pid file (error didn't go
 away after I deleted spamass.pid).  Also previous versions of
 spamass-milter leave the root owned .pid file in there after stopping
 causing another owner/permission problem. I went in and manually changed
 the owner of spamass.pid to postfix and the problem went away.
 
 Also, another permission problem is that the /var/spool/postfix
 directory is owned by root, too, causing socket write issues during
 startup.

Ah, ok...

I've changed the init scripts and defaults again, so it should work
correctly.

Can you try reinstalling the version above? (It's been updated)


Don Armstrong
 
-- 
The attackers hadn't simply robbed the bank. They had carried off
everything portable, including the security cameras, the carpets, the
chairs, and the light and plumbing fixtures. The conspirators had
deliberately punished the bank, for reasons best known to themselves,
or to their unknown controllers. They had superglued doors and
shattered windows, severed power and communications cables, poured
stinking toxins into the wallspaces, and concreted all of the sinks
and drains. In eight minutes, sixty people had ruined the building so
thouroughly that it had to be condemed and later demolished.
 -- Bruce Sterling, _Distraction_ p4

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Zach Sadecki
Uhh...  It works fine if I use the PIDFILE entry in the defaults file 
like you had in the last attempt, but if I comment it out (since you 
removed that line in the latest defaults from the .deb) it gives the 
Starting Sendmail milter plugin for SpamAssassin: Could not open 
pidfile: Permission denied error again.


Don Armstrong wrote:

On Fri, 13 Oct 2006, Zach Sadecki wrote:

Works fine now.  Thanks.


Ok; I've got one last iteration which should obviate the need to even
edit the defaults file. Can you see if it works for you?


Don Armstrong




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Don Armstrong
On Fri, 13 Oct 2006, Zach Sadecki wrote:
 Uhh...  It works fine if I use the PIDFILE entry in the defaults file 
 like you had in the last attempt, but if I comment it out (since you 
 removed that line in the latest defaults from the .deb) it gives the 
 Starting Sendmail milter plugin for SpamAssassin: Could not open 
 pidfile: Permission denied error again.

Agh; typo in the init script... can you change /usr/sbin/posfix to
/usr/sbin/postfix and tell me if that works?
 

Don Armstrong

-- 
LEADERSHIP -- A form of self-preservation exhibited by people with
autodestructive imaginations in order to ensure that when it comes to
the crunch it'll be someone else's bones which go crack and not their
own. 
 -- The HipCrime Vocab by Chad C. Mulligan 
(John Brunner _Stand On Zanzibar_ p256-7)

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Zach Sadecki
hmm... now I'm confused.  The latest .deb on your site doesn't have any 
/usr/sbin/posfix (or /usr/sbin/postfix) reference in the init script...


Don Armstrong wrote:

On Fri, 13 Oct 2006, Zach Sadecki wrote:
Uhh...  It works fine if I use the PIDFILE entry in the defaults file 
like you had in the last attempt, but if I comment it out (since you 
removed that line in the latest defaults from the .deb) it gives the 
Starting Sendmail milter plugin for SpamAssassin: Could not open 
pidfile: Permission denied error again.


Agh; typo in the init script... can you change /usr/sbin/posfix to
/usr/sbin/postfix and tell me if that works?
 


Don Armstrong




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Don Armstrong
On Fri, 13 Oct 2006, Zach Sadecki wrote:
 hmm... now I'm confused. The latest .deb on your site doesn't have
 any /usr/sbin/posfix (or /usr/sbin/postfix) reference in the init
 script...

Hrm... well, the version there now should have it. [It's possible that
an old one leaked out.]


Don Armstrong

-- 
Democracy means simply the bludgeoning of the people by the people for
the people.
 -- Oscar Wilde

http://www.donarmstrong.com  http://rzlab.ucr.edu


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-13 Thread Zach Sadecki

Thanks, Don.  It works pretty good now.  But...

restart in the init script doesn't work properly.  it still has the old 
code in it.  Which also leads to a question I had when I first peeked at 
it to debug the socket problem, why not just call $0 stop and $0 start, 
instead of having repeated code?


And one last comment...  All of the stuff in the /var/spool/postfix 
directory is owned by postfix:root or postfix:postdrop, so your setting 
of postfix:postfix for the spamass stuff looks a little odd.  I don't 
think it will hurt anything or have any effect (nor can I say which 
ownership is most proper for spamass pid/socket)... so just an FYI.


Thanks again,
  Zach


Don Armstrong wrote:

On Fri, 13 Oct 2006, Zach Sadecki wrote:

hmm... now I'm confused. The latest .deb on your site doesn't have
any /usr/sbin/posfix (or /usr/sbin/postfix) reference in the init
script...


Hrm... well, the version there now should have it. [It's possible that
an old one leaked out.]


Don Armstrong




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#391789: Spamass-milter socket problems with Postfix

2006-10-08 Thread Zach Sadecki

Package: spamass-milter
Version: 0.3.1-2

There are some basic incompatibility problems between the socket that 
the spamass-milter startup script creates and what is needed for use 
with Postfix.  First of all, Postfix runs chrooted, so the socket must 
be under its queue directory (/var/spool/postfix) to be accessible. 
Second, ownership and permissions prevent Postfix from using the socket, 
as it runs as user 'postfix' and the socket is owned by root with 644 
permissions.


my hack to make this work on my system was to change $SOCKET in 
/etc/init.d/spamass-milter to /var/spool/postfix/var/run/spamass.sock 
and to add 'chown postfix $SOCKET' in the start/restart routine.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]