delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Discussion in 'Installation/Configuration' started by jonathannet, Oct 11, 2018.

  1. jonathannet

    jonathannet Member

    Hi

    Then I try to send email I get this error in the log:

    delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

    I also tried to restart postfix:

    Code:
    [email protected]:/etc/postfix# postfix reload
    postfix: Postfix is running with backwards-compatible default settings
    postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
    postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
    postfix/postfix-script: refreshing the Postfix mail system
    And I tried to start amavis, but i failed:

    Code:
    [email protected]:/etc/postfix# /etc/init.d/amavis start
    [....] Starting amavis (via systemctl): amavis.serviceJob for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.
     failed!
    How do I fix that, so I can send mails and recive emails?

    Also what ports do I have to open if I use LE cert ?

    Regards
    Jonathan
     
    Last edited: Oct 11, 2018
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the mail.log file to see why amavis fails. the most likely reason is a wrong hostname configuration. LE does not require additional ports.
     
  3. jonathannet

    jonathannet Member

    I cannot see anything in the mail.log besides this:

    Code:
    Oct 10 09:21:56 jonathannet postfix/error[6296]: 034D158228C: to=<[email protected]>, orig_to=<amavis>, relay=none, delay=162223, delays=162223/0.42/0/0.07, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    Yeah but I have port 110 and port 25 open for tls is that right?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Restart amavisd and then take a look into the mail.log file again.

    In regard to ports, you should open port 587 as well.
     
  5. jonathannet

    jonathannet Member

    I get this error, with both start/restart amavisd:

    Code:
    [email protected]:/etc/postfix# /etc/init.d/amavis start
    [....] Starting amavis (via systemctl): amavis.serviceJob for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.
     failed!
    
    And I mail.err I get this error:

    Code:
    Oct 11 12:22:06 jonathannet dovecot: auth: Fatal: Error reading configuration: Timeout reading config from /var/run/dovecot/config
    Oct 11 12:22:06 jonathannet dovecot: master: Error: service(auth): command startup failed, throttling for 60 secs
    Oct 11 12:22:06 jonathannet postfix/smtpd[10436]: fatal: no SASL authentication mechanisms
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please look inti mail.log, not mail.err, and post the errors that you get in mail.log file when you restart amavis.
     
  7. jonathannet

    jonathannet Member

    Yes I look in the mail.log, but It dosnt show anything then I run commend: /etc/init.d/amavis restart

    But if I run: systemctl status

    I get this:
    Code:
    [email protected]:/etc/postfix# systemctl status amavis.service
    ● amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis; bad; vendor preset: enabled)
       Active: failed (Result: exit-code) since Thu 2018-10-11 13:42:31 CEST; 1min 40s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 14784 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
    
    Oct 11 13:42:31 jonathannet.dk amavis[14784]:   The value of variable $myhostname is "jnet", but should have been
    Oct 11 13:42:31 jonathannet.dk amavis[14784]:   a fully qualified domain name; perhaps uname(3) did not provide such.
    Oct 11 13:42:31 jonathannet.dk amavis[14784]:   You must explicitly assign a FQDN of this host to variable $myhostname
    Oct 11 13:42:31 jonathannet.dk amavis[14784]:   in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
    Oct 11 13:42:31 jonathannet.dk amavis[14784]:   network name!
    Oct 11 13:42:31 jonathannet.dk amavis[14784]: (failed).
    Oct 11 13:42:31 jonathannet.dk systemd[1]: amavis.service: Control process exited, code=exited status=1
    Oct 11 13:42:31 jonathannet.dk systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
    Oct 11 13:42:31 jonathannet.dk systemd[1]: amavis.service: Unit entered failed state.
    Oct 11 13:42:31 jonathannet.dk systemd[1]: amavis.service: Failed with result 'exit-code'.
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Which tutorial did you use to install ISPConfig?
    And please run these two commands:

    hostname
    hostname -f

    and post the result.
     
  9. jonathannet

    jonathannet Member

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The hostname should be a subdomain as described in the official documentation (perfect server guide), otherwise you won't be able to use that domain for emails and amavis will fail.

    Change the hostname in /etc/hostname, /etc/mailname, /etc/postfix/main.cf and /etc/hosts from jonathannet.dk to e.g. server1.jonathannet.dk. Then restart the server. And finally ensure that you have a dns a-record in the zone of the domain jonathannet.dk for server1 which points to the Ip of your server.
     
  11. jonathannet

    jonathannet Member

    Okay I got it to work now :) I found out of that there was 2 lines with $myhostname in : /etc/amavis/conf.d/05-node_id

    But is there a way to get rid off spam mails?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The file /etc/amavis/conf.d/05-node_id does not need to be changed when you followed my instructions on changing the hostname.

    That's what amavis is doing. Just enaböle it for the mail account and configure the policy if you like to set a lower score for marking mails as spam.
     
  13. jonathannet

    jonathannet Member

    Okay where do I set this? I have it as showing on this images here:

    [​IMG]
     

Share This Page