mail connection refused

Discussion in 'ISPConfig 3 Priority Support' started by NVO Media, Oct 19, 2015.

  1. NVO Media

    NVO Media New Member

    Hi,
    I'm new with using ISPConfig. On a server with Centos i run ISPConfig 3. For some reason the mail has stopped this weekend and I can't see why. I did many searches on the internet for a possible solution but no result has solved my problem.

    Maybe the problems come from a try to install the DKIM patch for ISPConfig. But I have restored the backups made during the install of the plugin. master.cfdkim and main.cf.dkim

    Email queue in ISPConfig:
    Code:
    8C54F184B1C 641 Mon Oct 19 13:18:38 [email protected]
    (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
    [email protected]
    
    85294184B20 26615 Mon Oct 19 19:23:52 [email protected]
    (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
    [email protected]
    amavisd and postfix are running and I have tried to restart them countless, with zero result (restart is successful).

    Code:
    netstat-tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:imaps           0.0.0.0:*               LISTEN      855/dovecot
    tcp        0      0 0.0.0.0:pop3s           0.0.0.0:*               LISTEN      855/dovecot
    tcp        0      0 server1:10024           0.0.0.0:*               LISTEN      1930/amavisd (maste
    tcp        0      0 server1:cslistener      0.0.0.0:*               LISTEN      820/php-fpm: master
    tcp        0      0 server1:10025           0.0.0.0:*               LISTEN      2881/master
    tcp        0      0 0.0.0.0:mysql           0.0.0.0:*               LISTEN      1357/mysqld
    tcp        0      0 server1:10027           0.0.0.0:*               LISTEN      2881/master
    tcp        0      0 0.0.0.0:pop3            0.0.0.0:*               LISTEN      855/dovecot
    tcp        0      0 0.0.0.0:imap            0.0.0.0:*               LISTEN      855/dovecot
    tcp        0      0 server1.kastatho:domain 0.0.0.0:*               LISTEN      853/named
    tcp        0      0 server1:domain          0.0.0.0:*               LISTEN      853/named
    tcp        0      0 0.0.0.0:ftp             0.0.0.0:*               LISTEN      846/pure-ftpd (SERV
    tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      814/sshd
    tcp        0      0 0.0.0.0:smtp            0.0.0.0:*               LISTEN      2881/master
    tcp        0      0 server1:rndc            0.0.0.0:*               LISTEN      853/named
    tcp        0      0 server1.kastathome:imap static.kpn.net:63079    ESTABLISHED 2484/dovecot/imap
    tcp        0      0 server1:45170           server1:mysql           TIME_WAIT   -
    tcp        0     52 server1.kastathome.:ssh dsl-087-195-180-2:54071 ESTABLISHED 2332/sshd: root@pts
    tcp        0      0 server1.kastathome:imap static.kpn.net:63081    ESTABLISHED 2486/dovecot/imap
    tcp        0      0 server1.kastathome:imap cust-5286e0f3.wba:49663 ESTABLISHED 2421/dovecot/imap
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      855/dovecot
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      855/dovecot
    tcp6       0      0 localhost:10024         [::]:*                  LISTEN      1930/amavisd (maste
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      855/dovecot
    tcp6       0      0 [::]:imap               [::]:*                  LISTEN      855/dovecot
    tcp6       0      0 [::]:webcache           [::]:*                  LISTEN      885/httpd
    tcp6       0      0 [::]:http               [::]:*                  LISTEN      885/httpd
    tcp6       0      0 [::]:tproxy             [::]:*                  LISTEN      885/httpd
    tcp6       0      0 [::]:domain             [::]:*                  LISTEN      853/named
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      846/pure-ftpd (SERV
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      814/sshd
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      2881/master
    tcp6       0      0 localhost:rndc          [::]:*                  LISTEN      853/named
    tcp6       0      0 [::]:https              [::]:*                  LISTEN      885/httpd
    tcp6       0      0 server1.kastat:webcache dsl-087-195-180-2:55414 TIME_WAIT   -
    tcp6       0      0 server1.kastathome:http cust-5286e0f3.wba:49708 TIME_WAIT   -
    tcp6       0      0 localhost:imap          localhost:45104         TIME_WAIT   -
    
    What I see is that Amavisd is listening at port 10024, but in the log I see 10026. Is that the problem? How can I fix that? Or is this another problem?
    If you want the content of a file, feel free to ask. As I say, i'm new to ISPConfig (and server/linux) so not to hard please :)

    EDIT: The server is configured via this tut: https://www.howtoforge.com/perfect-...l-php-pureftpd-postfix-dovecot-and-ispconfig3

    EDIT2: content of cf files:
    /etc/postfix/main.cf
    Code:
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_cano$
    smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/pos$
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    smtp_tls_security_level = may
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_protocols = !SSLv2,!SSLv3
    myhostname = server1.kastathome.nl
    mynetworks = 127.0.0.0/8 [::1]/128
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    relayhost =
    mailbox_size_limit = 0
    message_size_limit = 0
    
    /etc/postfix/master.cf
    Code:
    smtp  inet  n  -  n  -  -  smtpd
    pickup  unix  n  -  n  60  1  pickup
    cleanup  unix  n  -  n  -  0  cleanup
    qmgr  unix  n  -  n  300  1  qmgr
    #qmgr  unix  n  -  n  300  1  oqmgr
    tlsmgr  unix  -  -  n  1000?  1  tlsmgr
    rewrite  unix  -  -  n  -  -  trivial-rewrite
    bounce  unix  -  -  n  -  0  bounce
    defer  unix  -  -  n  -  0  bounce
    trace  unix  -  -  n  -  0  bounce
    verify  unix  -  -  n  -  1  verify
    flush  unix  n  -  n  1000?  0  flush
    proxymap  unix  -  -  n  -  -  proxymap
    proxywrite unix -  -  n  -  1  proxymap
    smtp  unix  -  -  n  -  -  smtp
    relay  unix  -  -  n  -  -  smtp
    #  -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq  unix  n  -  n  -  -  showq
    error  unix  -  -  n  -  -  error
    retry  unix  -  -  n  -  -  error
    discard  unix  -  -  n  -  -  discard
    local  unix  -  n  n  -  -  local
    virtual  unix  -  n  n  -  -  virtual
    lmtp  unix  -  -  n  -  -  lmtp
    anvil  unix  -  -  n  -  1  anvil
    scache  unix  -  -  n  -  1  scache
    127.0.0.1:10025 inet n - n - - smtpd
      -o content_filter=
      -o local_recipient_maps=
      -o relay_recipient_maps=
      -o smtpd_restriction_classes=
      -o smtpd_client_restrictions=
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
      -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
      -o smtp_send_xforward_command=yes
    
    127.0.0.1:10027 inet n - n - - smtpd
      -o content_filter=
      -o local_recipient_maps=
      -o relay_recipient_maps=
      -o smtpd_restriction_classes=
      -o smtpd_client_restrictions=
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
      -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
      -o smtp_send_xforward_command=yes
      -o milter_default_action=accept
      -o milter_macro_daemon_name=ORIGINATING
     
    Last edited: Oct 19, 2015
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    The connection 10026 comes from the tag_as_*
    If you rellay uninstall the patch you must also revert the changes to the main.cf
     
  3. NVO Media

    NVO Media New Member

    I have copied the .dkim files back to .cfg files. (master and main).
    Where can I find tag_as_* and edit it?
     
  4. NVO Media

    NVO Media New Member

    Mail via webmail (roundcube) does it job. Only mail via external clients (Outlook, phone) isn't working, so there is a temporary workaround.
     
    Last edited: Oct 19, 2015
  5. florian030

    florian030 Well-Known Member HowtoForge Supporter

    To revert the changes from dkim:
    remove "check_sender_access regexp:/etc/postfix/tag_as_originating.re" and "check_sender_access regexp:/etc/postfix/tag_as_foreign.re" from postfix main.cf and restart postifx
    also remove the new lines in your amavis-config and restart amavis.
    i don´t know your centos-version, but this patch works on (most) centos, too.
     
  6. NVO Media

    NVO Media New Member

    Removed "check_sender_access regexp:/etc/postfix/tag_as_originating.re" and "check_sender_access regexp:/etc/postfix/tag_as_foreign.re" from main.cf and restarted postfix
    Also reverted some changes in the amavis config file and restarted amavisd.

    After a few minutes the server begins to send mail from the queue.

    Thanks for your help, everthing is working again!
     

Share This Page