Issues with Postfix

Discussion in 'Installation/Configuration' started by Anthony Cleaves, Apr 19, 2016.

  1. Hello guys, I thought everything was fine however it would appear my server isn't processing any email since installation.
    I am seeing a warning ref clamav in the logs:

    Code:
    Apr 19 09:39:09 web postfix/qmgr[4597]: warning: connect to transport private/amavis: Connection refused
    Apr 19 09:39:09 web postfix/qmgr[4597]: 0D73920E7F: from=<[email protected], size=545, nrcpt=1 (queue active)
    Apr 19 09:39:09 web postfix/qmgr[4597]: 0C04B22ABB: from=<[email protected]>, size=429, nrcpt=1 (queue active)
    Apr 19 09:39:09 web postfix/qmgr[4597]: 7677F2035F: from=<[email protected]>, size=536, nrcpt=1 (queue active)
    Apr 19 09:39:09 web postfix/error[8021]: EB15620C2D: to=<[email protected]>, relay=none, delay=224328, delays=224328/0.05/0/0.02, dsn=4.3.0, status=deferred (mail transport unavailable)
    
    Clav AV it's self seems to be running ok
    Code:
    Tue Apr 19 07:52:47 2016 -> Algorithmic detection enabled.
    Tue Apr 19 07:52:47 2016 -> Portable Executable support enabled.
    Tue Apr 19 07:52:47 2016 -> ELF support enabled.
    Tue Apr 19 07:52:47 2016 -> Mail files support enabled.
    Tue Apr 19 07:52:47 2016 -> OLE2 support enabled.
    Tue Apr 19 07:52:47 2016 -> PDF support enabled.
    Tue Apr 19 07:52:47 2016 -> SWF support enabled.
    Tue Apr 19 07:52:47 2016 -> HTML support enabled.
    Tue Apr 19 07:52:47 2016 -> Self checking every 3600 seconds.
    Tue Apr 19 08:52:47 2016 -> SelfCheck: Database status OK.
    
    Below is my master conf.

    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master" or
    # on-line: http://www.postfix.org/master.5.html).
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    #smtp      inet  n       -       -       -       1       postscreen
    #smtpd     pass  -       -       -       -       -       smtpd
    #dnsblog   unix  -       -       -       -       0       dnsblog
    #tlsproxy  unix  -       -       -       -       0       tlsproxy
    submission inet n       -       -       -       -       smtpd
      -o syslog_name=postfix/submission
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       -       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_reject_unlisted_recipient=no
    #  -o smtpd_client_restrictions=$mua_client_restrictions
    #  -o smtpd_helo_restrictions=$mua_helo_restrictions
    #  -o smtpd_sender_restrictions=$mua_sender_restrictions
    #  -o smtpd_recipient_restrictions=
    #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       -       -       -       qmqpd
    pickup    unix  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       -       1000?   1       tlsmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    retry     unix  -       -       -       -       -       error
    discard   unix  -       -       -       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       -       -       -       lmtp
    anvil     unix  -       -       -       -       1       anvil
    scache    unix  -       -       -       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    
     
  2. This is my postifx -n

    Code:
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    append_dot_mydomain = no
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = web.v-internet.net, localhost, localhost.localdomain
    myhostname = web.v-internet.net
    mynetworks = 127.0.0.0/8 [::1]/128
    myorigin = /etc/mailname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    owner_request_special = no
    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_canonical_maps $relocated_maps $transport_maps $mynetworks
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = static:5000
    postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1
    
    This is a debian 8 build. any help would be appreciated.
     
  3. jnsc

    jnsc rotaredoM Moderator

    Your master.cf loks like it's missing
    amavis unix - - - - 2 smtp
     
    Last edited: Apr 19, 2016
    Anthony Cleaves likes this.
  4. Thank you for that, that obviously helped. Still failing, but I got some new errors ot look at.

    Code:
    Apr 19 11:37:10 web amavis[1703]: (01703-02) (!)connect to [127.0.0.1]:10025 failed, attempt #1: Can't connect to socket [127.0.0.1]:10025 using module IO::Socket::IP: Connection refused
    Apr 19 11:37:10 web amavis[1703]: (01703-02) (!)9ACVUaVngNGh FWD from <[email protected]> -> <[email protected]>,<[email protected]>,  451 4.5.0 From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:[127.0.0.1]:10025): id=01703-02
    Apr 19 11:37:10 web amavis[1703]: (01703-02) Blocked MTA-BLOCKED {TempFailedOpenRelay}, [127.0.0.1] [195.102.251.18] <[email protected]> -> <[email protected]>,<[email protected]>, Message-ID: <[email protected]>, mail_id: 9ACVUaVngNGh, Hits: -0.998, size: 2495, 793 ms
    Apr 19 11:37:10 web postfix/smtp[12234]: 40921231FF: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.9, delays=0.08/0/0.03/0.78, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01703-02 - Temporary MTA failure on relaying, From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:[127.0.0.1]:10025): id=01703-02 (in reply to end of DATA command))
    Apr 19 11:37:10 web postfix/smtp[12234]: 40921231FF: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.9, delays=0.08/0/0.03/0.78, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01703-02 - Temporary MTA failure on relaying, From MTA() during fwd-connect (All attempts (1) failed connecting to smtp:[127.0.0.1]:10025): id=01703-02 (in reply to end of DATA command))
    
    
    Code:
    ● postfix.service - LSB: Postfix Mail Transport Agent
       Loaded: loaded (/etc/init.d/postfix)
      Drop-In: /run/systemd/generator/postfix.service.d
               └─50-postfix-$mail-transport-agent.conf
       Active: active (running) since Tue 2016-04-19 11:36:25 EDT; 12min ago
      Process: 12069 ExecStop=/etc/init.d/postfix stop (code=exited, status=0/SUCCESS)
      Process: 12095 ExecStart=/etc/init.d/postfix start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/postfix.service
               ├─12205 /usr/lib/postfix/master
               ├─12213 pickup -l -t unix -u -c
               ├─12214 qmgr -l -t unix -u
               └─12225 tlsmgr -l -t unix -u -c
    
    Apr 19 11:44:37 web postfix/smtp[12611]: ABE0123200: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.08/0.04/0.03/1.6, dsn=4.5.0, status=deferred (h...
    Apr 19 11:45:02 web postfix/smtpd[12603]: connect from localhost[127.0.0.1]
    Apr 19 11:45:02 web postfix/smtpd[12603]: lost connection after CONNECT from localhost[127.0.0.1]
    Apr 19 11:45:02 web postfix/smtpd[12603]: disconnect from localhost[127.0.0.1]
    Apr 19 11:46:26 web postfix/qmgr[12214]: 40921231FF: from=<[email protected]>, size=2495, nrcpt=2 (queue active)
    Apr 19 11:46:26 web postfix/qmgr[12214]: BCAE3231DA: from=<[email protected]>, size=1804, nrcpt=2 (queue active)
    Apr 19 11:46:27 web postfix/smtp[12714]: 40921231FF: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=558, delays=558/0.03/0.04/0.66, dsn=4.5.0, status=deferred (ho...
    Apr 19 11:46:27 web postfix/smtp[12714]: 40921231FF: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=558, delays=558/0.03/0.04/0.66, dsn=4.5.0, status=deferred (h...
    Apr 19 11:46:27 web postfix/smtp[12715]: BCAE3231DA: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=13019, delays=13018/0.07/0.02/0.98, dsn=4.5.0, status=deferred...
    Apr 19 11:46:27 web postfix/smtp[12715]: BCAE3231DA: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=13019, delays=13018/0.07/0.02/0.98, dsn=4.5.0, status=deferre...
    Hint: Some lines were ellipsized, use -l to show in full.
    
    Code:
    netstat -npl | grep post
    unix  2      [ ACC ]     STREAM     LISTENING     13124    662/dovecot         /var/spool/postfix/private/auth
    Inbound also fails
    Code:
    Apr 19 12:07:04 web amavis[1703]: (01703-08) Blocked MTA-BLOCKED {TempFailedInbound}, [127.0.0.1] [209.85.213.46] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]m>, mail_id: dWE_FBA2qs5e, Hits: -0.02, size: 2476, 566 ms
    Apr 19 12:07:04 web postfix/smtp[14989]: 8A736231AD: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.81, delays=0.23/0/0.02/0.56, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01
     
    Last edited: Apr 19, 2016
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if ispconfig is not installed yet. Or at least the config lines that the ispconfig installer adds in postfix master.cf are missing or have been removed. Thats why the mail system fails now as amavis cant connect back to postfix.

    If you haven not installed ispconfig yet, then install it. If you have already installed it, then download it again, unpack the tar.gz, run update.php script in the install folder and let the updater reconfigure the services when it asks.
     
    Anthony Cleaves likes this.
  6. Strange, I now can't get into the GUI. You could be onto something, I had the puppet in config once I finished installation. Perhaps I added it prior to ISPconfig doing it's thing.

    Never mind, it was MYSQL failing to start
     
  7. That has resolved my issue, thank you very much!
     

Share This Page