You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jon Dossey <JD...@deltahealthgroup.com> on 2004/11/23 18:25:28 UTC

Problems with UNIX socket

Setup: Redhat FC2, sendmail 8.13.1, spamassassin 3.0.1, and
spamass-milter 0.2.0

Error: Nov 23 11:21:45 hostname spamd[3966]: Can't unlink
/var/run/spamd.socket: Permission denied

Here's the info on the socket:
srw-rw-rw-  1 spamd   root        0 Nov 23 11:21 spamd.socket

And worth noting:
spamd     4029  0.0  2.5 27796 23052 ?       S    11:40   0:00
/usr/bin/spamd -d -m5 --username=spamd --pidfile=/home/spamd/spamd.pid
--socketpath=/var/run/spamd.socket

Is it because the socket is still in use, possibly by spamass-milter?


__________________________________________________________________________

"The information transmitted is intended only for the person or entity to 
which it is addressed and may contain confidential, proprietary, and/or 
privileged material.  Any review, retransmission, dissemination or other 
use of, or taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited.  
If you received this in error, please contact the sender and delete 
the material from all computers."

Re: Problems with UNIX socket

Posted by Kris Deugau <kd...@vianet.ca>.
Michael Barnes wrote:
> Also, it seems easier and more flexable to just use the default TCP
> socket instead of a UNIX socket.  I'm not familiar with any
> advantages of using a UNIX socket over a TCP one.

Speed.  If you're at the limits of your hardware, and you need to
squeeze a bit of extra performance, a Unix socket will provide a slight
decrease in overhead for spamc->spamd communication.

It's not enough for most people to ever worry about, but I found it
actually made a fairly significant difference on a PII/450/512M system
at one point.  (Converting 300 accounts - each calling spamc via
.procmailrc - was an *interesting* task.)

-kgd
-- 
Get your mouse off of there!  You don't know where that email has been!

Re: Problems with UNIX socket

Posted by Michael Barnes <mb...@compsci.wm.edu>.
On Tue, Nov 23, 2004 at 11:25:28AM -0600, Jon Dossey wrote:
> 
> Setup: Redhat FC2, sendmail 8.13.1, spamassassin 3.0.1, and
> spamass-milter 0.2.0
> 
> Error: Nov 23 11:21:45 hostname spamd[3966]: Can't unlink
> /var/run/spamd.socket: Permission denied
> 
> Here's the info on the socket:
> srw-rw-rw-  1 spamd   root        0 Nov 23 11:21 spamd.socket
> 
> And worth noting:
> spamd     4029  0.0  2.5 27796 23052 ?       S    11:40   0:00
> /usr/bin/spamd -d -m5 --username=spamd --pidfile=/home/spamd/spamd.pid
> --socketpath=/var/run/spamd.socket
> 
> Is it because the socket is still in use, possibly by spamass-milter?

No.  UNIX-like systems are multi-user and robust to things like people
wanting to do things like remove files.  From the unlink(2) manpage:

   If the name referred to a socket, fifo or device the name for
   it is removed but processes which have the object open may continue
   to use it.

Also, by convention, things like pid files usually go in /var/run.

FWIW, the error message is a warning, and not a fatal error.

Also, it seems easier and more flexable to just use the default TCP
socket instead of a UNIX socket.  I'm not familiar with any advantages
of using a UNIX socket over a TCP one.

Mike

-- 
/-----------------------------------------\
| Michael Barnes <mb...@compsci.wm.edu> |
| UNIX Systems Administrator              |
| College of William and Mary             |
| Phone: (757) 879-3930                   |
\-----------------------------------------/