# amavisd-new wont start

## mrspam

Hi,

since my last reboot, amavisd-new doesn't start anymore. (I think that) I haven't changed anything. But I'm getting old, so there may be a slightly change in something. But the real problem is, that amavisd-new doesn't log anything but:

 *Quote:*   

> # tail -f /var/log/messages
> 
> Jul  7 21:53:06 ftp2 amavis[13520]: logging initialized, log level 2, syslog: amavis.mail
> 
> Jul  7 21:53:06 ftp2 amavis[13520]: starting.  /usr/sbin/amavisd at ftp2 amavisd-new-2.6.3 (20090422), Unicode aware
> ...

 

Any ideas where to find more information?!

Thanks!

----------

## cach0rr0

strace will be your best friend before long  :Smile: 

usermod -s /bin/bash amavis

sudo su amavis -

and strace the sucker

then of course usermod -s /bin/false amavis once you're done

Have you rebuilt perl recently? I broke amavisd-new myself a while back, because I rebuilt Perl with threading support. 

the logging can indeed be frustrating; though where logging fails, again, strace is your friend

might also post output of perl -v 

as well any USE flags you have for amavisd-new 

```

meat@gentoob0x ~ $ sudo equery uses amavisd-new

[ Searching for packages matching amavisd-new... ]

[ Colour Code : set unset ]

[ Legend : Left column  (U) - USE flags from make.conf              ]

[        : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for mail-filter/amavisd-new-2.6.1-r1 ]

 U I

 - - courier      : Add support for usage with courierfilter

 - - dkim         : Add optional Yahoo! DomainKey support

 + + ldap         : Adds LDAP support (Lightweight Directory Access Protocol)

 - - milter       : Adds sendmail mail filter (milter) support

 + + mysql        : Adds mySQL Database support

 - - postgres     : Adds support for the postgresql database

 - - qmail        : Add support for qmail

 - - razor        : Configure mail-filter/razor, a distributed, collaborative spam detection and filtering network for use with amavisd-new

 - - spamassassin : Enable usage of mail-filter/spamassassin for spam protection
```

----------

## mpagano

I saw some workarounds for this bug but they did not work for me.

But this patch did:

```
--- amavisd.orig    2009-07-16 12:14:16.000000000 -0400

+++ amavisd 2009-07-16 12:14:21.000000000 -0400

@@ -13717,7 +13717,9 @@ if (!$extra_code_antivirus)  # release s

 my(%spam_scanners_used);

 my($bpscm) = ca('bypass_spam_checks_maps');

 if (!@{ca('spam_scanners')}) {

+    undef $extra_code_antispam;

 } elsif (@$bpscm && !ref($bpscm->[0]) && $bpscm->[0]) {  # simple-minded

+   undef $extra_code_antispam;

 } else {

   eval $extra_code_antispam or die "Problem in antispam code: $@";

   $extra_code_antispam = 1;       # release memory occupied by the source code

```

HTH

Mike

----------

## MoonWalker

For anybody running into this, as I just did after emerge updated the db package, it's usually a dependency problem with one of the (perl) packages amavisd depends on. To run strace is one way to find out andother is to simply run

```
#amavisd debug
```

when I did amavisd told me that berkeley db needed a compatible version of dblib and the problem was simply solved by remerging 'dev-perl/BerkeleyDB'. Actually I should say I think that would have been enough but before I actually ran

```
emerge --prune db
```

 and unmerged all old versions of db (4!) that was slagging on my system, after I cecked with equery I had nothing depending on any of them. Some of them actualy had to be unmerged manually as -prune still left them there. Finally I also re-emerged db to be on the sure side, and then BerkeleyDB

It was interesting though that perl-updater didn't catch this but returned with the message nothing needed to re-emerged.

----------

