no recieving email ispconfig3

Discussion in 'Installation/Configuration' started by activpanel, Jun 12, 2014.

  1. activpanel

    activpanel New Member

    Hi, I recently install the lastest ispconfig3 on a VM. But, installation, after installation, I never receive the emails sent from outside

    I can send emails but not receive.

    Here, you can see my /etc/postfix/main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    mydestination = localhost, localhost.localdomain
    relayhost = 
    mynetworks = 127.0.0.0/8 [::1]/128
    inet_interfaces = loopback-only
    recipient_delimiter = +
    
    readme_directory = /usr/share/doc/postfix
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    inet_protocols = all
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    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_canonical_maps $relocated_maps $transport_maps $mynetworks
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    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
    owner_request_special = no
    smtp_tls_security_level = may
    myhostname = activpanel.net
    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
    
    
    and my master.cf
    Code:
    
    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 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 milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  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
    
    
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    
    
    
    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}
    
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    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
    

    Tanks you for your help.
     
    Last edited: Jun 12, 2014
  2. frprim

    frprim New Member

    Check if dovecot is running
    /etc/init.d/dovecot status
     
  3. activpanel

    activpanel New Member

    Hi, yes

    Code:
    [ ok ] dovecot is running.
    
     
  4. frprim

    frprim New Member

    can you check if there is any errors in
    /var/log/mail.log , /var/log/mail.err and /var/log/syslog

    Also check if you didnt block pop and imap ports with firewall
     
  5. activpanel

    activpanel New Member

    in my /var/log/syslog I have this:

    Code:
    Jun 13 07:05:01 mail dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<8jLQS7L7EgAAAAAAAAAAAAAAAA$
    Jun 13 07:05:01 mail dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<kl3QS7L7SAAAAAAAAAAAAAAAAAAAAAAB>
    Jun 13 07:05:01 mail postfix/smtpd[23897]: warning: hostname localhost.localdomain does not resolve to address ::1: No address associated with hostname
    Jun 13 07:05:01 mail postfix/smtpd[23897]: connect from unknown[::1]
    Jun 13 07:05:01 mail postfix/smtpd[23897]: lost connection after CONNECT from unknown[::1]
    Jun 13 07:05:01 mail postfix/smtpd[23897]: disconnect from unknown[::1]
    Jun 13 07:06:01 mail /USR/SBIN/CRON[23935]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/isp$
    Jun 13 07:07:01 mail /USR/SBIN/CRON[23957]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/isp$
    Jun 13 07:08:01 mail /USR/SBIN/CRON[23979]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/isp$
    Jun 13 07:09:01 mail /USR/SBIN/CRON[24004]: (root) CMD (cd / && run-parts --report /etc/cron.hourly)
    Jun 13 07:09:01 mail /USR/SBIN/CRON[24003]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/isp$
    Jun 13 07:09:01 mail /USR/SBIN/CRON[24006]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sess$
    Jun 13 07:10:01 mail /USR/SBIN/CRON[24042]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Jun 13 07:10:01 mail /USR/SBIN/CRON[24043]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/isp$
    Jun 13 07:10:01 mail pure-ftpd: (?@::1) [INFO] New connection from ::1
    Jun 13 07:10:01 mail pure-ftpd: (?@::1) [INFO] Logout.
    
    He is looping.

    And in my /var/log/mail.log

    Code:
    Jun 13 07:25:01 mail postfix/smtpd[24561]: warning: hostname localhost.localdomain does not resolve to address ::1: No address associated with hostname
    Jun 13 07:25:01 mail postfix/smtpd[24561]: connect from unknown[::1]
    Jun 13 07:25:01 mail dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<6mNck7L7dwAAAAAAAAAAAAAAAA$
    Jun 13 07:25:01 mail dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<s5Nck7L7rQAAAAAAAAAAAAAAAAAAAAAB>
    Jun 13 07:25:01 mail postfix/smtpd[24561]: lost connection after CONNECT from unknown[::1]
    Jun 13 07:25:01 mail postfix/smtpd[24561]: disconnect from unknown[::1]
    
     
  6. frprim

    frprim New Member

    can you ping your mail server?
    ie. ping mail.yourdomain.com
     
  7. activpanel

    activpanel New Member

    My domain is activpanel.net


    The ping is ok.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please psot the output of:

    iptables -L

    and

    netstat -tap | grep smtp
     
  9. activpanel

    activpanel New Member

    this is my iptables -L
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    fail2ban-dovecot-pop3imap  tcp  --  anywhere             anywhere             multiport dports pop3,pop3s,imap2,imaps
    fail2ban-pureftpd  tcp  --  anywhere             anywhere             multiport dports ftp
    fail2ban-sasl  tcp  --  anywhere             anywhere             multiport dports smtp
    fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports ssh
    
    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             anywhere
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-sasl (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination
    RETURN     all  --  anywhere             anywhere
    
    and
    Code:
    tcp        0      0 127.0.0.2:smtp          *:*                     LISTEN      5594/master
    tcp        0      0 localhost.localdom:smtp *:*                     LISTEN      5594/master
    tcp        0      0 127.0.0.2:ssmtp         *:*                     LISTEN      5594/master
    tcp        0      0 localhost.localdo:ssmtp *:*                     LISTEN      5594/master
    tcp6       0      0 localhost.localdom:smtp [::]:*                  LISTEN      5594/master
    tcp6       0      0 localhost.localdo:ssmtp [::]:*                  LISTEN      5594/master
    
     
  10. frprim

    frprim New Member

    ok netstat should not output localhost

    cat /etc/hosts
     
  11. activpanel

    activpanel New Member

    /etc/hosts

    Code:
    
    127.0.0.1 localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    5.39.97.49 activpanel.net activpanel.net
    ::1 localhost.localdomain localhost
    
     
  12. frprim

    frprim New Member

    also give us the output of : hostname -f and hostname
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add:

    inet_interfaces = all

    in postfix main.cf, restart postfix and post the netstat again.
     
  14. activpanel

    activpanel New Member

    my hostname -f
    Code:
    activpanel.net
    
    my hostname
    Code:
    activpanel.net
    

    and after restart postfix
    Code:
    
    tcp        0      0 *:smtp                  *:*                     LISTEN      31805/master
    tcp        0      0 *:ssmtp                 *:*                     LISTEN      31805/master
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      31805/master
    tcp6       0      0 [::]:ssmtp              [::]:*                  LISTEN      31805/master
    

    edit: Thank's u a lot. Now it's working.

    Have a good day,
     
    Last edited: Jun 13, 2014

Share This Page