# dspam keeps dying



## cbrace (Sep 26, 2012)

Hi all, 

Some time ago I configured mail/dspam to work in conjunction with mail/postfix. Just now I am migrating my mail server to a new host. Something seems to have broken in my new configuration, which is basically the same as the old one. Every time postfix attempts to submit a mail to dspam the latter dies. A typical maillog entry looks like this: 


```
Sep 25 15:58:20 venus postfix/lmtp[80453]: 8D42B2E75A: to=<cb@xxx,xx>, relay=venus[/var/run/dspam.sock], delay=0.43, delays=0.16/0.01/0/0.26, dsn=4.4.2, status=deferred (lost connection with venus[/var/run/dspam.sock] while sending end of data -- message may be sent more than once)
```

Any subsequent attempt to connect (until dspam is restarted) looks like this:

```
Sep 26 08:57:47 venus postfix/error[18378]: F333E2E7F0: to=<####@#####.nl>, orig_to=<######@xxxxxxx.xx>, relay=none, delay=224748, delays=224747/0.37/0/0.25, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to venus[/var/run/dspam.sock]: Connection refused)
```

FYI, here is the relevant entry in postfix's master.cf:

```
smtp      inet  n       -       n       -       -       smtpd
   -o content_filter=lmtp:unix:/var/run/dspam.sock
```
I switched on debugging in dspam, but that doesn't tell me anything useful. 

Any ideas what might be going wrong here? I realize there are other ways of calling dspam from postfix and I'm open to any and all suggestions. 

Thanks 



```
$ dspam --version 

DSPAM Anti-Spam Suite 3.9.0 (agent/library) 

Copyright (c) 2002-2009 DSPAM Project 
[url]http://dspam.sourceforge.net[/url]. 

DSPAM may be copied only under the terms of the GNU General Public License, 
a copy of which can be found with the DSPAM distribution kit. 

Configuration parameters:  '--sysconfdir=/usr/local/etc' '--with-logdir=/var/log/dspam' '--with-dspam-home=/var/db/dspam' '--with-dspam-home-owner=root' '--with-dspam-home-group=mail' '--with-dspam-home-mode=0770' '--with-dspam-owner=root' '--with-dspam-group=mail' '--enable-syslog' '--enable-debug' '--enable-daemon' '--with-mysql-includes=/usr/local/include/mysql' '--with-mysql-libraries=/usr/local/lib/mysql' '--with-storage-driver=hash_drv,mysql_drv' '--with-dspam-mode=4510' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd9.0' 'build_alias=i386-portbld-freebsd9.0' 'CC=cc' 'CFLAGS=-pipe  -g' 'LDFLAGS= -L/usr/local/lib' 'LIBS=-L/usr/local/lib -pthread' 'CPPFLAGS=-I/usr/local/include' 'CPP=cpp' 'CXX=c++' 'CXXFLAGS=-pipe -g'
```


----------



## chatwizrd (Sep 26, 2012)

Try upgrading to the latest version. I see 3.10.2 on their website.


----------



## cbrace (Sep 26, 2012)

Thanks for the tip, but I'd rather avoid having to compile outside the ports tree if possible.


----------



## cbrace (Oct 6, 2012)

I narrowed the cause down to the following: moving a user's dspam .css file (tokens and stuff) from one server to another breaks dspam, and the reason appears to be because of machine architecture; I am moving it from a 64-bit to a 32-bit system. See this reply to my query to the dspam-list: http://dspam-users.2290790.n4.nabble.com/dspam-dying-after-connection-tp4641107p4641121.html

I tried importing a .css file into mysql using the tools which are supplied with dspam, but it didn't work, so I will probably end up reinstalling a 64-bit version of FreeBSD on my VPS. It only has 512M memory, so a 64-bit OS is kinda superfluous, but I don't suppose there are any major downsides to doing this, are there?


----------

