# amavisd-new problems

## nochiefs

I'm running a postfix server and recentlly installed amavisd-new/spamassasin, everything was working wonderfuly untill about 2 weeks ago when I did an emerge -DUvu world and something broke amavisd-new.

When I start the amavisd service and everything seems to run fine, postfix will process a couple messages and then amavisd freaks out, system slows to a crawl and I have to kill the amavisd processes (if they don't die on their own) to get the system useable again.  Here's what I get in my mail log:

```
log-2004-09-05-03:44:50:Sep  4 19:59:53 [postfix/smtp] 1196627116: to=<****@*****.***>, relay=127.0.0.1[127.0.0.1], delay=119915, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=18462-04, mime_decode-1 FAILED: run_command (open pipe): Can't fork at /usr/lib/perl5/5.8.3/i686-linux/IO/File.pm line 176, <GEN34> line 66. at /usr/sbin/amavisd line 1520, <GEN34> line 66. (in reply to end of DATA command))

log-2004-09-05-03:44:50:Sep  4 20:00:19 [amavis] (18465-08) TROUBLE in check_mail: mime_decode-1 FAILED: run_command (open pipe): Can't fork at /usr/lib/perl5/5.8.3/i686-linux/IO/File.pm line 176. at /usr/sbin/amavisd line 1520.

log-2004-09-05-03:44:50:Sep  4 19:59:56 [amavis] (18464-06) TROUBLE in check_mail: mime_decode-1 FAILED: run_command (open pipe): Can't fork at /usr/lib/perl5/5.8.3/i686-linux/IO/File.pm line 176, <GEN32> line 30. at /usr/sbin/amavisd line 1520, <GEN32> line 30.
```

I'm too much of a noob to figure out what I've done.  Here's what I have tried to fix the problem:  FIrst, I tried re-emerging both amavisd-new and spamassassin.  I thought that possibliy during the emerge -DUu world that a perl upgrade was to blame so I tried switching back to perl-5.8.3 (I was at 5.8.5 when I noticed the problem), I ran the /usr/portage/dev-lang/perl/files/libperl_rebuilder (does this rebuild all your perl modules?) after unmerging perl-5.8.5 and emerging perl-5.8.3, I've also tried using CPAN to install the IO::File manually but that didn't work either.

Any ideas?  I've searched here, google, and I can't seem to find anyone with a similar problem.  Please help, my inbox is getting overrrun with spam and I'm afraid that I'm going to hose my system up even worse by doing anything else  :Wink: 

----------

## Rav70

 *nochiefs wrote:*   

> I'm running a postfix server and recentlly installed amavisd-new/spamassasin, everything was working wonderfuly untill about 2 weeks ago when I did an emerge -DUvu world and something broke amavisd-new.
> 
> 

 

Don't use the 'U' option. Ever. It is evil. It won't let portage downgrade a package which have later been found broken beyond repair and hard-masked. If you really need latest versions of some packages use package.keywords instead. I'd start with

```

emerge -uDv world

```

and see if the problem is gone after portage downgraded what it needed to do so.

Regards,

Rav

----------

## nochiefs

 *Rav70 wrote:*   

> Don't use the 'U' option. Ever. It is evil. It won't let portage downgrade a package which have later been found broken beyond repair and hard-masked. If you really need latest versions of some packages use package.keywords instead. I'd start with

 

```

emerge -uDv world

```

Thanks for the tip, I'll use that in the future.

 *Rav70 wrote:*   

> and see if the problem is gone after portage downgraded what it needed to do so.
> 
> Regards,
> 
> Rav

 

Ok, tried the emerge -uDv world to see if it fixed the problem and I'm still getting the same errors in the log.

At this point I would like to try and start from scratch, I have my config files backed up so what's the best way to unemerge everything?  I'm guessing I will want to unemerge all the perl modules, perl, amavisd-new and spamassasin, is this a good plan?  Thanks for you help

----------

## BlinkEye

it's not sure that it will solve your problem. the thing about an 

```
emerge -C ***
```

is that it uninstalls your *** but it keeps the config files. i'd really suggest to uninstall everything related to a mail system (smtpd, authdaemon etc) and DELETING the config files. i had a similar problem once and its sometimes better to start from the beginning. don't forget 

```
etc-update
```

as this is the only way you'll notice that a config file may need to be updated. as for postfix - i had and am still having some issues with the current version - postfix-2.1.3. you have to stop the old postfix system before updating. i'm really considering of downgrading ...

----------

## nochiefs

 *BlinkEye wrote:*   

> is that it uninstalls your *** but it keeps the config files. i'd really suggest to uninstall everything related to a mail system (smtpd, authdaemon etc) and DELETING the config files. i had a similar problem once and its sometimes better to start from the beginning. don't forget 
> 
> ```
> etc-update
> ```
> ...

 

I was afraid I would have to do that.  I was using the ~x86 stuff from portage, looks like that was my first mistake.  I was hoping that I wouldn't have to completly start from scratch as i have Postfix setup to auth with MySQL and it's been a while since I set that up.   Anyway, thanks for the advice.  I'm sure this will fix the problem, just a pain.   :Confused: 

-Dave

----------

## BlinkEye

yeah, as i said, i run into the same thing. and one forgets so fast ...

but your ~x86 thing isn't really problem. do a 

```
emerge -Du world
```

and your back again on the stable branch.

----------

## big_pig

Would something like emerge -v `grep 'dev-perl' /var/cache/edb/world` work? It should just re-emerge your perl packages.

bp

EDIT

Long day  :Smile: , try emerge -v `qpkg -I -nc  dev-perl`.

----------

## mariourk

I tried:

```

emerge -v `qpkg -I -nc dev-perl`

```

but I still have the same problem.

Also

```

perl-cleaner reallyall

```

didn't fix it.  :Confused: 

Any suggestion would be very welcome. I'm breaking my head over

this problem for a few days now and I'm not an inch closer to the solution   :Crying or Very sad: 

----------

## BlinkEye

ok, I'm running a similar setup. could you post your versions so I can compare with my setup (amavisd-new, postfix, spamassassin, clamd etc).

did you try a 

```
# revdep-rebuild
```

----------

## mariourk

 *Quote:*   

> 
> 
> did you try a
> 
> Code:
> ...

 

I tried that too but forgot to mention it, sorry. Didn't help me though  :Confused: 

Here's What I'm running:

```

mail-filter/amavisd-new-2.3.3-r2

mail-mta/postfix-2.2.5

mail-filter/spamassassin-3.1.0

```

----------

## mariourk

Did anyone manage to fix this yet?

----------

## mariourk

I think I fixed it. It turned out I had no swap enabled.   :Razz: 

After creating some swap-space and activating it, amavisd-new keeps running and scanning emails.

apparently  perl doesn't like a system without swap. Even when the 2.6-kernel is supposed to be

able to run without any.   :Confused:  (however, it wasn't the kernel that caused the trouble...  :Wink: 

I'm so glad it seems I finally tackeled this one   :Very Happy: 

this gave me the idea to enable the swap.

----------

