[SOLVED] Postfix can't send and recieve mails

Discussion in 'Installation/Configuration' started by Andres Hocevar, Aug 12, 2015.

  1. Andres Hocevar

    Andres Hocevar New Member

    Hi there.
    I can't send or receive mail using postfix
    I'm on:

    openSUSE 13.1 x64
    ISPConfig-3.0.5.4p8.
    postfix- 2.9.6-7.4.1
    dovecot-2.1.17-2.1.2

    Postfix log when recieve an email:
    Code:
    ago 12 11:28:44 vmi45933 postfix/smtpd[18978]: connect from mail-yk0-f176.google.com[209.85.160.176]
    ago 12 11:28:45 vmi45933 postfix/smtpd[18978]: 4853642E036D: client=mail-yk0-f176.google.com[209.85.160.176]
    ago 12 11:28:45 vmi45933 postfix/cleanup[18997]: 4853642E036D: message-id=<CAAHD+nyWzTjsZAcY8-ky4-=+bHEHqQ4y20ROo8M0wzutq0VjQQ@mail.gmail.com>
    ago 12 11:28:45 vmi45933 postfix/qmgr[4885]: 4853642E036D: from=<[email protected]>, size=1741, nrcpt=1 (queue active)
    ago 12 11:28:45 vmi45933 postfix/smtpd[18978]: disconnect from mail-yk0-f176.google.com[209.85.160.176]
    ago 12 11:28:46 vmi45933 postfix/smtpd[19001]: connect from unknown[127.0.0.1]
    ago 12 11:28:46 vmi45933 postfix/master[4869]: warning: process /usr/lib/postfix/smtpd pid 19001 killed by signal 6
    ago 12 11:28:46 vmi45933 postfix/master[4869]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    ago 12 11:28:46 vmi45933 postfix/smtp[18998]: 4853642E036D: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.5, delays=0.41/0.01/0.01/1.1, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=31175-1...
    ago 12 11:30:02 vmi45933 postfix/smtpd[18978]: connect from localhost[::1]
    ago 12 11:30:02 vmi45933 postfix/smtpd[18978]: lost connection after CONNECT from localhost[::1]
    ago 12 11:30:02 vmi45933 postfix/smtpd[18978]: disconnect from localhost[::1]
    
    Amavis log for receive:
    Code:
    ago 12 11:28:46 vmi45933 amavis[31175]: (31175-15) (!)mail_via_smtp: NOTICE: aborting SMTP session, No response to MAIL (pip), dt: 0.007 s
    ago 12 11:28:46 vmi45933 amavis[31175]: (31175-15) (!)FWD from <[email protected]> -> <[email protected]>,BODY=7BIT 451 4.5.0 From MTA(smtp:[127.0.0.1]:10025) during f...: id=31175-15
    ago 12 11:28:46 vmi45933 amavis[31175]: (31175-15) Blocked MTA-BLOCKED {TempFailedInbound}, [209.85.160.176]:34195 [209.85.160.176] <[email protected]> -> <[email protected]>, Queu...
    
    Postfix log when send a email:
    Code:
    ago 12 11:33:21 vmi45933 postfix/smtpd[19290]: connect from localhost[::1]
    ago 12 11:33:21 vmi45933 postfix/smtpd[19290]: warning: table "mysql:/etc/postfix/mysql-virtual_client.cf": empty query string -- ignored
    ago 12 11:33:21 vmi45933 postfix/smtpd[19290]: AB93542E0F0D: client=localhost[::1]
    ago 12 11:33:21 vmi45933 postfix/cleanup[19303]: AB93542E0F0D: message-id=<[email protected]>
    ago 12 11:33:21 vmi45933 postfix/smtpd[19290]: disconnect from localhost[::1]
    ago 12 11:33:21 vmi45933 postfix/qmgr[4885]: AB93542E0F0D: from=<[email protected]>, size=730, nrcpt=1 (queue active)
    ago 12 11:33:22 vmi45933 postfix/anvil[18980]: statistics: max connection rate 1/60s for (smtp:209.85.160.176) at Aug 12 11:28:44
    ago 12 11:33:22 vmi45933 postfix/smtpd[19311]: connect from unknown[127.0.0.1]
    ago 12 11:33:22 vmi45933 postfix/master[4869]: warning: process /usr/lib/postfix/smtpd pid 19311 killed by signal 6
    ago 12 11:33:22 vmi45933 postfix/master[4869]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    ago 12 11:33:22 vmi45933 postfix/smtp[19304]: AB93542E0F0D: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.1, delays=0.07/0.01/0.01/0.98, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=02498-...
    
    Amavis log when send:
    Code:
    ago 12 11:33:22 vmi45933 amavis[2498]: (02498-11) (!)mail_via_smtp: NOTICE: aborting SMTP session, No response to MAIL (pip), dt: 0.007 s
    ago 12 11:33:22 vmi45933 amavis[2498]: (02498-11) (!)FWD from <[email protected]> -> <[email protected]>,BODY=7BIT 451 4.5.0 From MTA(smtp:[127.0.0.1]:10025) during fwd-mail-pip...): id=02498-11
    ago 12 11:33:22 vmi45933 amavis[2498]: (02498-11) Blocked MTA-BLOCKED {TempFailedOutbound}, MYNETS LOCAL [::1]:48691 [190.206.149.30] <[email protected]> -> <[email protected]>,...e: 730, 983 ms
    
    master.cf
    Code:
    smtp  inet  n  -  n  -  -  smtpd
    submission inet n  -  n  -  -  smtpd
    pickup  fifo  n  -  n  60  1  pickup
    cleanup  unix  n  -  n  -  0  cleanup
    qmgr  fifo  n  -  n  300  1  qmgr
    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
    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
    dovecot  unix  -  n  n  -  -  pipe
      flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    amavis  unix  -  -  n  -  4  smtp
      -o smtp_data_done_timeout=1200
      -o smtp_send_xforward_command=yes
    127.0.0.1:10025 inet n - - - - smtpd
      -o smtpd_client_restrictions=
      -o strict_rfc821_envelopes=yes
    
    postconf -n
    Code:
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    canonical_maps = hash:/etc/postfix/canonical
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    defer_transports =
    delay_warning_time = 1h
    disable_dns_lookups = no
    disable_mime_output_conversion = no
    disable_vrfy_command = yes
    dovecot_destination_recipient_limit = 1
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/packages/postfix-doc/html
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mail_spool_directory = /var/mail
    mailbox_command =
    mailbox_size_limit = 0
    mailbox_transport =
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, header_sender, header_recipient
    masquerade_domains =
    masquerade_exceptions = root
    message_size_limit = 0
    message_strip_characters = \0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = $myhostname, localhost.$mydomain
    myhostname = vmi45933.contabo.net
    mynetworks = 127.0.0.0/8 [::1]/128
    mynetworks_style = subnet
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases
    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
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
    receive_override_options = no_address_mappings
    relay_clientcerts =
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    relocated_maps = hash:/etc/postfix/relocated
    sample_directory = /usr/share/doc/packages/postfix-doc/samples
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtp_enforce_tls = no
    smtp_sasl_auth_enable = no
    smtp_sasl_password_maps =
    smtp_sasl_security_options =
    smtp_tls_CAfile =
    smtp_tls_CApath =
    smtp_tls_cert_file =
    smtp_tls_key_file =
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    smtp_tls_session_cache_database =
    smtp_use_tls = no
    smtpd_banner = $myhostname ESMTP
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_delay_reject = yes
    smtpd_helo_required = no
    smtpd_helo_restrictions =
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_
    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_CAfile =
    smtpd_tls_CApath =
    smtpd_tls_ask_ccert = no
    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_received_header = no
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    strict_8bitmime = no
    strict_rfc821_envelopes = no
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mys
    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: maildrop_destination_concurrency_limit=1
    postconf: warning: /etc/postfix/main.cf: unused parameter: maildrop_destination_recipient_limit=1
    Any idea?

    Thank's in advance.
     
    Last edited: Aug 12, 2015
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    check /etc/postfix/mysql-virtual_client.cf
    if this won´t fix all problems, you should look into your amavis-config.
     
  3. Andres Hocevar

    Andres Hocevar New Member

    Thank's for your reply

    cat /etc/postfix/mysql-virtual_client.cf
    Code:
    user = ispconfig
    password = b25d7acdcf4ed14c2d6f8e754eb623cc
    dbname = dbispconfig
    table        = mail_access
    select_field = access
    where_field  = source
    additional_conditions = and type = 'client' and active = 'y'
    hosts = 127.0.0.1
    "mysql -h127.0.0.1 -u ispconfig -p" it's working
    but mail_access table is empty.
     
    Last edited: Aug 12, 2015
  4. Andres Hocevar

    Andres Hocevar New Member

    It's working now!
    Just adding this lines in master.cf
    Code:
    127.0.0.1:10025 inet 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
    
     

Share This Page