Amavis don't start. Can't receive/send mails

Discussion in 'Installation/Configuration' started by Vinzenzo, Aug 23, 2017.

  1. Vinzenzo

    Vinzenzo New Member

    Hi,
    before all, the config of my server:

    Linux version: Debian GNU/Linux 8.9 (jessie)
    ISPconfig version: 3.1.6

    All is up to date.

    The htf_report.txt
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.1.6
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.6.30-0+deb8u1
    [INFO] php-cgi (used for cgi php in default vhost!) is version 5.6.30-0+deb8u1
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 1300)
    [INFO] I found the following mail server(s):
            Postfix (PID 1603)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 737)
    [INFO] I found the following imap server(s):
            Unknown process (init) (PID 1)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1568)
    
    ##### LISTENING PORTS #####
    (seulement              ()
    Adresse         (distante)
    [anywhere]:110          (737/dovecot)
    [anywhere]:143          (1/init)
    [anywhere]:465          (1603/master)
    [anywhere]:21           (1568/pure-ftpd)
    ***.***.***.***:53              (719/named)
    [localhost]:53          (719/named)
    [anywhere]:22           (720/sshd)
    [anywhere]:25           (1603/master)
    [localhost]:953         (719/named)
    [anywhere]:993          (1/init)
    [anywhere]:995          (737/dovecot)
    [localhost]:10025               (1603/master)
    [localhost]:3306                (1188/mysqld)
    [localhost]:10027               (1603/master)
    [anywhere]:587          (1603/master)
    [localhost]:11211               (717/memcached)
    [localhost]10           (737/dovecot)
    [localhost]43           (1/init)
    *:*:*:*::*:8080         (1300/apache2)
    *:*:*:*::*:80           (1300/apache2)
    *:*:*:*::*:465          (1603/master)
    *:*:*:*::*:8081         (1300/apache2)
    *:*:*:*::*:21           (1568/pure-ftpd)
    *:*:*:*::*:53           (719/named)
    *:*:*:*::*:22           (720/sshd)
    *:*:*:*::*:25           (1603/master)
    *:*:*:*::*:953          (719/named)
    *:*:*:*::*:443          (1300/apache2)
    *:*:*:*::*:993          (1/init)
    *:*:*:*::*:995          (737/dovecot)
    *:*:*:*::*:587          (1603/master)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban-pureftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    fail2ban-dovecot-pop3imap  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993
    fail2ban-ssh  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    The problem I have is that Amavis refuse to start.
    And without Amavis, I can't receive/send mails.

    I saw this problem yesterday, but last mails was sent/received in last May (yeah, this is a long time ago^^).
    I think I have reboot my server at this date, maybe after a server upgrade (not a simple update) (can't remember for the upgrade of the server).

    Below, what I get when I try to (re)start Amavis and his status.

    $service amavis restart (same wiht start)
    Code:
    Job for amavis.service failed. See 'systemctl status amavis.service' and 'journalctl -xn' for details.
    
    $service amavis status (replaced my fqdn by my.server.com)
    Code:
    ● amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis)
       Active: failed (Result: exit-code) since mer. 2017-08-23 13:07:35 CEST; 35min ago
      Process: 4086 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
    
    août 23 13:07:35 my.server.com amavis[4092]: starting. /usr/sbin/amavisd-new at my.server.com amavisd-new-2.10.1 (20141025), Unicode aware, LC_ALL="C", LANG="fr_FR.UTF-8"
    août 23 13:07:35 my.server.com amavis[4086]: Starting amavisd: ERROR: MISSING REQUIRED ADDITIONAL MODULES:
    août 23 13:07:35 my.server.com amavis[4086]: DBD::mysql
    août 23 13:07:35 my.server.com amavis[4086]: (failed).
    août 23 13:07:35 my.server.com systemd[1]: amavis.service: control process exited, code=exited status=1
    août 23 13:07:35 my.server.com systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
    août 23 13:07:35 my.server.com systemd[1]: Unit amavis.service entered failed state.
    
    I tried differents things, like manually put my fqdn in /etc/amavis/conf.d/05-node_id and/or in /etc/amavis/conf.d/05-domain_id
    But this not helped.

    EDIT: I have also checked between Amavis and Mysql (who seem to be the problem), but can't find what to do (and I don't want to break all my server^^).

    Any help will be appreciated.
    Thanks in advance ;)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    seems as if you missed installing the perl dbd mysql module. Did you follow the perfect server tutorial to prepare your server fr the ISPConfig installation?
     
  3. Vinzenzo

    Vinzenzo New Member

    Thanks for your help.

    I didn't follow the perfect server tutorial because it was a pre-installed server (with Debian 7 and ISPconfig); purchased in november 2015. All was well working for months. It's only last May that I lost mail service.

    Maybe after an upgrade (to Debian 8 ? I'm not sure), I lost mail service but figured it only yesterday.

    I will check for perl dbd mysql module. I will keep you informed.
     
  4. Vinzenzo

    Vinzenzo New Member

    Nice.
    I have just do a
    $ apt install libdbd-mysql-perl
    Package is now installed.
    $ service amavis start
    Amavis started well
    $ service amavis status
    All seem OK. Status "Active".

    I can now receive and send mail except to/from Gmail.
    When I send a mail from my server to a Gmail address, I have a "Undelivered Mail Returned to Sender"
    Code:
    <******@gmail.com>: host gmail-smtp-in.l.google.com[2a00:1450:400c:c02::1b]
        said: 550-5.7.1 [2001:41d0:e:de0::1] Our system has detected that this
        message does 550-5.7.1 not meet IPv6 sending guidelines regarding PTR
        records and 550-5.7.1 authentication. Please review 550-5.7.1
        https://support.google.com/mail/?p=IPv6AuthError for more information 550
        5.7.1 . t142si1504005wmd.68 - gsmtp (in reply to end of DATA command)
    When I send a mail from google to my server. The mail never come and Gmail don't give me a "Undelivered Mail Returned to Sender".

    It seems there is a problem with IPv6 (and/or DKIM ?).

    I have to investigate that; but if someone have an idea... ;)

    EDIT: I receive mails from Gmail to my server. They just take 20 minutes to arrive^^
    But still have problem to send mail from my server to Gmail
     
    Last edited: Aug 23, 2017
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Set a PTR record for your IPv6 IP. This is most likely done at your ISP and not in ISPConfig.
     
  6. Vinzenzo

    Vinzenzo New Member

    Thanks.

    I was re-editing my previous message with:
    So, after your new message, does the "IPv4" solution is good or I will better to set a PTR record ?
     
  7. florian030

    florian030 ISPConfig Developer ISPConfig Developer

  8. Vinzenzo

    Vinzenzo New Member

    Ok. Thanks for the advices.
    I will check that tomorrow. Thanks again.
     

Share This Page