1 (edited by haveagoodtime 2022-02-18 09:44:54)

Topic: amavis exits with code 13

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro?no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I upgraded from debian 10 to 11 and iRedMail 1.4.0 to 1.5.2. All services run without error except amavis and dovecot. I cannot send or receive emails. Sorry the title isn't very good but I couldn't fit everything in the character limit.

● amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/lib/systemd/system/amavis.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2022-02-15 03:55:30 UTC; 29s ago
       Docs: *REDACTED BY ME FOR THIS POST*
    Process: 3277 ExecStartPre=/usr/bin/find /var/lib/amavis -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 3278 ExecStartPre=/usr/bin/find /var/lib/amavis/tmp -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 3279 ExecStart=/usr/sbin/amavisd-new foreground (code=exited, status=13)
   Main PID: 3279 (code=exited, status=13)
        CPU: 410ms

Feb 15 03:55:30 mail.la systemd[1]: amavis.service: Main process exited, code=exited, status=13/n/a
Feb 15 03:55:30 mail.la systemd[1]: amavis.service: Failed with result 'exit-code'.
Feb 15 03:55:30 mail.la systemd[1]: amavis.service: Scheduled restart job, restart counter is at 5.
Feb 15 03:55:30 mail.la systemd[1]: Stopped Interface between MTA and virus scanner/content filters.
Feb 15 03:55:30 mail.la systemd[1]: amavis.service: Start request repeated too quickly.
Feb 15 03:55:30 mail.la systemd[1]: amavis.service: Failed with result 'exit-code'.
Feb 15 03:55:30 mail.la systemd[1]: Failed to start Interface between MTA and virus scanner/content filters.

Something else I've noticed is dovecot runs but there's errors

● dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-02-15 04:24:08 UTC; 2min 29s ago
       Docs: man:dovecot(1)
             [url*LINK REMOVED*/url]
   Main PID: 558 (dovecot)
      Tasks: 10 (limit: 1132)
     Memory: 2.1M
        CPU: 132ms
     CGroup: /system.slice/dovecot.service
             ├─558 /usr/sbin/dovecot -F
             ├─663 dovecot/lmtp -L
             ├─664 dovecot/anvil
             ├─665 dovecot/log
             ├─669 dovecot/lmtp -L
             ├─670 dovecot/lmtp -L
             ├─671 dovecot/lmtp -L
             ├─672 dovecot/lmtp -L
             ├─676 dovecot/config
             └─680 dovecot/stats

Feb 15 04:24:08 mail.la systemd[1]: Starting Dovecot IMAP/POP3 email server...
Feb 15 04:24:08 mail.la dovecot[558]: master: Dovecot v2.3.13 (89f716dc2) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Feb 15 04:24:08 mail.la systemd[1]: Started Dovecot IMAP/POP3 email server.
Feb 15 04:24:37 mail.la dovecot[665]: stats: Error: conn stats-reader (127.0.0.1:56034): didn't reply with a valid VERSION line: EXPORT        global
Feb 15 04:24:37 mail.la dovecot[665]: stats: Error: conn stats-reader (127.0.0.1:56036): didn't reply with a valid VERSION line: EXPORT        global

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: amavis exits with code 13

Did you check our tutorial here? https://docs.iredmail.org/upgrade.debian.10-11.html

3

Re: amavis exits with code 13

ZhangHuangbin wrote:

Did you check our tutorial here? https://docs.iredmail.org/upgrade.debian.10-11.html

Yes I did. I rolled the server back to debian 10 and updated to iredmail 1.5.1 which is working perfectly. now i will try upgrading to debian 11. i followed everything in that guide the first time and will follow it again. i have a second debian 10 mail server i can test upgrading on too to see if it's just a weird quirk on this one server or if it happens identically when upgrading to debian 11.

4

Re: amavis exits with code 13

same result

5

Re: amavis exits with code 13

When you restart amavis service, check /var/log/maillog immediately, any related error reported by amavis?

6

Re: amavis exits with code 13

ZhangHuangbin wrote:

When you restart amavis service, check /var/log/maillog immediately, any related error reported by amavis?

Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: 4K28nt1gQHz7hQd: to=<root@.la>, orig_to=<root>, relay=none, delay=225, delays=225/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)

7

Re: amavis exits with code 13

haveagoodtime wrote:

Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: 4K28nt1gQHz7hQd: to=<root@.la>, orig_to=<root>, relay=none, delay=225, delays=225/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)

Do you by chance have SELinux enabled? When I was trying to run iRedMail with SELinux this was one of the problems I was encountering (link). If you have SELinux enabled the you can either disable it or use the following commands to enable port 10026 and 10027 to be used by Amavis.:

#Amavis
semanage port -m -t amavisd_recv_port_t -p tcp 10027
semanage port -m -t amavisd_recv_port_t -p tcp 10026

8

Re: amavis exits with code 13

thedethwalker wrote:
haveagoodtime wrote:

Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
Feb 21 04:43:46 mail postfix/amavis/smtp[2251]: 4K28nt1gQHz7hQd: to=<root@.la>, orig_to=<root>, relay=none, delay=225, delays=225/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)

Do you by chance have SELinux enabled? When I was trying to run iRedMail with SELinux this was one of the problems I was encountering (link). If you have SELinux enabled the you can either disable it or use the following commands to enable port 10026 and 10027 to be used by Amavis.:

#Amavis
semanage port -m -t amavisd_recv_port_t -p tcp 10027
semanage port -m -t amavisd_recv_port_t -p tcp 10026

I do not. Thank you though. smile

9

Re: amavis exits with code 13

Let me repeat myself:

When you restart amavis service, check /var/log/maillog immediately, any related error reported by amavis?

You just pasted 2 lines, but not related to amavisd startup, cannot help much without related log.

10 (edited by haveagoodtime 2022-06-03 14:54:59)

Re: amavis exits with code 13

ZhangHuangbin wrote:

Let me repeat myself:

When you restart amavis service, check /var/log/maillog immediately, any related error reported by amavis?

You just pasted 2 lines, but not related to amavisd startup, cannot help much without related log.

nothing relevant to startup in my maillog file. Tried the upgrade again, dovecot runs but still no luck with amavis. output of systemctl status:

● amavis.service - Interface between MTA and virus scanner/content filters
     Loaded: loaded (/lib/systemd/system/amavis.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2022-06-03 06:48:11 UTC; 42s ago
       Docs: http://www.ijs.si/software/amavisd/#doc
    Process: 4032 ExecStartPre=/usr/bin/find /var/lib/amavis -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 4035 ExecStartPre=/usr/bin/find /var/lib/amavis/tmp -maxdepth 1 -name amavis-* -type d -exec rm -rf {} ; (code=exited, status=0/SUCCESS)
    Process: 4038 ExecStart=/usr/sbin/amavisd-new foreground (code=exited, status=13)
   Main PID: 4038 (code=exited, status=13)
        CPU: 423ms

Jun 03 06:48:10 redacted* systemd[1]: amavis.service: Main process exited, code=exited, status=13/n/a
Jun 03 06:48:10 redacted* systemd[1]: amavis.service: Failed with result 'exit-code'.
Jun 03 06:48:11 redacted* systemd[1]: amavis.service: Scheduled restart job, restart counter is at 5.
Jun 03 06:48:11 redacted* systemd[1]: Stopped Interface between MTA and virus scanner/content filters.
Jun 03 06:48:11 *redacted* systemd[1]: amavis.service: Start request repeated too quickly.
Jun 03 06:48:11 redacted* systemd[1]: amavis.service: Failed with result 'exit-code'.
Jun 03 06:48:11 redacted* systemd[1]: Failed to start Interface between MTA and virus scanner/content filters.

What about this though from the maillog? I know it's not relevant to startup but isn't it relevant? It's starting then the connection is refused.

Jun  3 06:53:11 mail postfix/amavis/smtp[4669]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused

11

Re: amavis exits with code 13

Shouldn't amavis listen on port 10024?

Check your main.cf there should be a

# Amavisd + SpamAssassin + ClamAV
#
content_filter = smtp-amavis:[127.0.0.1]:10024

Greets

12 (edited by haveagoodtime 2022-06-04 09:18:19)

Re: amavis exits with code 13

mike175de wrote:

Shouldn't amavis listen on port 10024?

Check your main.cf there should be a

# Amavisd + SpamAssassin + ClamAV
#
content_filter = smtp-amavis:[127.0.0.1]:10024

Greets

It is already. Thanks.

13

Re: amavis exits with code 13

What's the issue now? You replied to a 4 months old thread.

14 (edited by haveagoodtime 2022-06-21 01:53:15)

Re: amavis exits with code 13

ZhangHuangbin wrote:

What's the issue now? You replied to a 4 months old thread.

It's the same issue. I tested upgrading again and had the same issue so rolled back to the backup I made. Sorry for the confusion.

15

Re: amavis exits with code 13

how much ram does the machine have?