1

Topic: Amavisd stopped

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
==== iRedMail 0.8.2
backend MySQL
CentOS 6 32bit

from last 2 days i haven't received any mail to my mailbox box,i also tried to compose mail to another email address but that also not going..incoming outgoing both not worked..so i checked  mail queue by issuing command mailq


here is the output

10C551242604     1617 Thu Oct 11 08:48:33  hebrew878@xxxxx.xxx
(delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
                                         postmaster@xxxxx.xxx

-- 50 Kbytes in 18 Requests.


hence i understood amavisd is not running..
i tried to restart the amavisd but again i got error 

/var/lib/dkim/xxxxxx.xxx.pem failed to open file not found..

so i disabled the domain key in amavisd.conf
# Add dkim_key here.
#dkim_key("xxxxx.xxx", "dkim", "/var/lib/dkim/xxxxxxx.xxx.pem");


then again i tried to start amavisd

this  time i got  this msg

[root@mail ~]# service amavisd start
Starting amavisd:                                          [  OK  ]
[root@mail ~]# service amavisd status
amavisd dead but subsys locked

please help me?

2

Re: Amavisd stopped

I have exact the same problem, after 4 days iredmail v0.8.2 on a centos 6.3 64bit stop working with the same above errors,

I temporary disable amavisd in postfix so that we can receive or emails back

It is not so easy for debugging there is not mush error logging for amavisd

please help me too!!

3 (edited by kislik 2012-10-11 18:12:15)

Re: Amavisd stopped

Hi,

I have the same problem with amavis. It was cause wrong amavis configuration in crontab.
~# sudo crontab -e -u amavis

There were a wrong line, trying clear whole file system under amavis user.

The right line for SL6/CENTOS6/RHEL6 probably is:

1   5   *   *   *   find /var/spool/amavisd/quarantine/ -ctime +15 2>/dev/null | xargs rm -rf {}


Pavel

4

Re: Amavisd stopped

Hi Kislik,

Did you test it with the new cron line?
before I change it on our production server
What about the missed key files is there a possibility to generate them again?

Thanks!
Mangaan

5

Re: Amavisd stopped

kislik wrote:

The right line for SL6/CENTOS6/RHEL6 probably is:

1   5   *   *   *   find /var/spool/amavisd/quarantine/ -ctime +15 2>/dev/null | xargs rm -rf {}

No, not /var/spool/amavisd/quarantine/.
Does /var/virusmails/ exist? If yes, please use it instead.

So sorry about this issue, it's a bug in iRedMail-0.8.2, i will release a bugfix release soon.

6

Re: Amavisd stopped

ZhangHuangbin wrote:
kislik wrote:

The right line for SL6/CENTOS6/RHEL6 probably is:

1   5   *   *   *   find /var/spool/amavisd/quarantine/ -ctime +15 2>/dev/null | xargs rm -rf {}

No, not /var/spool/amavisd/quarantine/.
Does /var/virusmails/ exist? If yes, please use it instead.

So sorry about this issue, it's a bug in iRedMail-0.8.2, i will release a bugfix release soon.

Hi ZhangHuangbin,

none existent directory?? any other quick fix suggestions
our mailserver is unprotected now

Regards,
Mangaan

7

Re: Amavisd stopped

mangaan wrote:

none existent directory?

Not exist? Could you show me output of below commands:

# ls /var/
# ls /var/spool/amavisd/

8

Re: Amavisd stopped

ZhangHuangbin wrote:
mangaan wrote:

none existent directory?

Not exist? Could you show me output of below commands:

# ls /var/
# ls /var/spool/amavisd/

Sure!

[root@nxtmail2 var]# ls /var/
cache  clamav  db  empty  games  lib  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  vmail  www  yp
[root@nxtmail2 var]# ls /var/spool/amavisd
[root@nxtmail2 var]#

9

Re: Amavisd stopped

someone answer me plz

10

Re: Amavisd stopped

how can i make amavisd run again?

11

Re: Amavisd stopped

hebrew878 wrote:

how can i make amavisd run again?

- Re-generate a DKIM pem file first, then update your DNS record:
http://code.google.com/p/iredmail/wiki/DNS_DKIM

- Disable amavisd cron job.

12

Re: Amavisd stopped

ZhangHuangbin wrote:
hebrew878 wrote:

how can i make amavisd run again?

- Re-generate a DKIM pem file first, then update your DNS record:
http://code.google.com/p/iredmail/wiki/DNS_DKIM

- Disable amavisd cron job.

No DKIM private keys declared in a config file.

13

Re: Amavisd stopped

Try:

# amavisd genrsa /var/lib/dkim/domain.com.pem

14

Re: Amavisd stopped

ZhangHuangbin wrote:

Try:

# amavisd genrsa /var/lib/dkim/domain.com.pem

You must also re-create some directorys

mkdir /var/spool/amavisd/tmp
mkdir /var/spool/amavisd/db

chown amavis:amavis /var/spool/amavisd/tmp
chown amavis:amavis /var/spool/amavisd/db

re enable postfix amavis content filter comment out in postfix main.cf "content-filter = amavis:[127.0.0.1]:10024"

service start amavisd
service restart postfix

check if amavisd is listening:

netstat -tap |grep amavisd

check you maillog

tail -f /var/log/maillog

For me everything is working again!

Thanks!

15

Re: Amavisd stopped

mangaan wrote:
ZhangHuangbin wrote:

Try:

# amavisd genrsa /var/lib/dkim/domain.com.pem

You must also re-create some directorys

mkdir /var/spool/amavisd/tmp
mkdir /var/spool/amavisd/db

chown amavis:amavis /var/spool/amavisd/tmp
chown amavis:amavis /var/spool/amavisd/db

re enable postfix amavis content filter comment out in postfix main.cf "content-filter = amavis:[127.0.0.1]:10024"

service start amavisd
service restart postfix

check if amavisd is listening:

netstat -tap |grep amavisd

check you maillog

tail -f /var/log/maillog

For me everything is working again!

Thanks!

thank you very much.

16

Re: Amavisd stopped

hebrew878 wrote:
mangaan wrote:
ZhangHuangbin wrote:

Try:

# amavisd genrsa /var/lib/dkim/domain.com.pem

You must also re-create some directorys

mkdir /var/spool/amavisd/tmp
mkdir /var/spool/amavisd/db

chown amavis:amavis /var/spool/amavisd/tmp
chown amavis:amavis /var/spool/amavisd/db

re enable postfix amavis content filter comment out in postfix main.cf "content-filter = amavis:[127.0.0.1]:10024"

service start amavisd
service restart postfix

check if amavisd is listening:

netstat -tap |grep amavisd

check you maillog

tail -f /var/log/maillog

For me everything is working again!

Thanks!

thank you very much.


Hi,

Unfortunately after further examine the maillog file there where still errors in my mallog :-((

postfix/qmgr[1219]: warning: connect to transport private/smtp-amavis: No such file or directory

postfix/error[1236]: 3C877BACD: to=<root@xxx.domain.xx>, relay=none, delay=77704, delays=77703/1.4/0/0.17, dsn=4.3.0, status=deferred (mail transport unavailable)

So after some googling I found also a solution for this error

Check these files and change them if you're dealing with the above error

Change this additional lines:

etc/postfix/main.cf

content_filter = amavis:[127.0.0.1]:10024

to this:

content_filter = smtp-amavis:[127.0.0.1]:10024



/etc/postfix/master.cf

-o content_filter=smtp-amavis:[127.0.0.1]:10026

to this:

-o content_filter=smtp-amavis:[127.0.0.1]:10024



/etc/amavisd/amavisd.conf

$inet_socket_port = [10024, 9998];

to this:

$inet_socket_port = [10024];



So far no more errors in the maillog

Thanks!

17

Re: Amavisd stopped

mangaan wrote:
hebrew878 wrote:
mangaan wrote:

You must also re-create some directorys

mkdir /var/spool/amavisd/tmp
mkdir /var/spool/amavisd/db

chown amavis:amavis /var/spool/amavisd/tmp
chown amavis:amavis /var/spool/amavisd/db

re enable postfix amavis content filter comment out in postfix main.cf "content-filter = amavis:[127.0.0.1]:10024"

service start amavisd
service restart postfix

check if amavisd is listening:

netstat -tap |grep amavisd

check you maillog

tail -f /var/log/maillog

For me everything is working again!

Thanks!

thank you very much.


Hi,

Unfortunately after further examine the maillog file there where still errors in my mallog :-((

postfix/qmgr[1219]: warning: connect to transport private/smtp-amavis: No such file or directory

postfix/error[1236]: 3C877BACD: to=<root@xxx.domain.xx>, relay=none, delay=77704, delays=77703/1.4/0/0.17, dsn=4.3.0, status=deferred (mail transport unavailable)

So after some googling I found also a solution for this error

Check these files and change them if you're dealing with the above error

Change this additional lines:

etc/postfix/main.cf

content_filter = amavis:[127.0.0.1]:10024

to this:

content_filter = smtp-amavis:[127.0.0.1]:10024



/etc/postfix/master.cf

-o content_filter=smtp-amavis:[127.0.0.1]:10026

to this:

-o content_filter=smtp-amavis:[127.0.0.1]:10024



/etc/amavisd/amavisd.conf

$inet_socket_port = [10024, 9998];

to this:

$inet_socket_port = [10024];



So far no more errors in the maillog

Thanks!

there is no such problem with my configuration..and amavisd working again as i followed your instruction

18

Re: Amavisd stopped

Good for you :-)

if you are not dealing with the above error you can ignore these additional instructions

Thanks!