can't send email, smtp error

Discussion in 'General' started by lindu, Oct 5, 2019.

Tags:
  1. lindu

    lindu Member

    hi
    i install ispconfi 3.1.15 , and i create a email, email can receive from outside, but for send email, smtp. error .

    ~# telnet 127.0.0.1 25
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
     
  2. lindu

    lindu Member

    tail -f /var/log/mail.log
    Oct 5 18:53:56 cloud postfix/smtps/smtpd[15574]: SSL_accept error from localhost[127.0.0.1]: lost connection
    Oct 5 18:53:56 cloud postfix/smtps/smtpd[15574]: lost connection after CONNECT from localhost[127.0.0.1]
    Oct 5 18:53:56 cloud postfix/smtps/smtpd[15574]: disconnect from localhost[127.0.0.1] commands=0/0
    Oct 5 18:55:03 cloud postfix/smtps/smtpd[15574]: connect from localhost[127.0.0.1]
    Oct 5 18:55:03 cloud postfix/smtps/smtpd[15574]: SSL_accept error from localhost[127.0.0.1]: lost connection
    Oct 5 18:55:03 cloud postfix/smtps/smtpd[15574]: lost connection after CONNECT from localhost[127.0.0.1]
    Oct 5 18:55:03 cloud postfix/smtps/smtpd[15574]: disconnect from localhost[127.0.0.1] commands=0/0
    Oct 5 18:55:03 cloud dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<E/aWpieUuoF/AAAB>
    Oct 5 18:55:03 cloud dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<AxeXpieU1pp/AAAB>
    Oct 5 18:56:07 cloud postfix/smtps/smtpd[15574]: connect from unknown[142.93.233.72]
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  4. lindu

    lindu Member

    [email protected]:~# hostname
    Code:
    cloud.ayotaaruf.com
    [email protected]:~# hostname -f
    cloud.ayotaaruf.com
    [email protected]:~# 
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 18.04.3 LTS
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.1.15
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.2.19-0ubuntu***.***.***.***
    
    ##### PORT CHECK #####
    
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enab
    le this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to
     enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 661)
    [INFO] I found the following mail server(s):
            Postfix (PID 1063)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 874)
    [INFO] I found the following imap server(s):
            Dovecot (PID 874)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 765)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:993          (874/dovecot)
    [anywhere]:995          (874/dovecot)
    [localhost]:10024               (1072/amavisd-new)
    [localhost]:10025               (1063/master)
    [localhost]:10026               (1072/amavisd-new)
    [localhost]:3306                (644/mysqld)
    [localhost]:10027               (1063/master)
    [localhost]:11211               (498/memcached)
    [anywhere]:110          (874/dovecot)
    [anywhere]:143          (874/dovecot)
    [anywhere]:8080         (661/apache2)
    [anywhere]:80           (661/apache2)
    [anywhere]:8081         (661/apache2)
    [anywhere]:21           (765/pure-ftpd)
    ***.***.***.***:53              (528/named)
    [localhost]:53          (528/named)
    ***.***.***.***:53              (432/systemd-resolve)
    [anywhere]:22           (777/sshd)
    [anywhere]:25           (1063/master)
    [localhost]:953         (528/named)
    [anywhere]:443          (661/apache2)
    *:*:*:*::*:993          (874/dovecot)
    *:*:*:*::*:995          (874/dovecot)
    [localhost]10           (874/dovecot)
    [localhost]43           (874/dovecot)
    *:*:*:*::*:21           (765/pure-ftpd)
    *:*:*:*::*:53           (528/named)
    *:*:*:*::*:25           (1063/master)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachabl
    e
    REJECT     all  --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0 
     
  5. lindu

    lindu Member

    cat /etc/postfix/main.cf
    Code:
     
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    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
    
    readme_directory = /usr/share/doc/postfix
    
    # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
    # fresh installs.
    compatibility_level = 2
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    myhostname = cloud.ayotaaruf.com
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = cloud.ayotaaruf.com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    html_directory = /usr/share/doc/postfix/html
    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_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 = mysql:/etc/postfix/mysql-virtual_uids.cf
    virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
    sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_restriction_classes = greylisting
    greylisting = check_policy_service inet:127.0.0.1:10023
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
    smtpd_tls_security_level = may
    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
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $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_login_maps
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
    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/postfix/tag_as_foreign.re
    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
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_exclude_ciphers = RC4, aNULL
    smtp_tls_exclude_ciphers = RC4, aNULL
    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 
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Compare output of hostname command to the ISPConfig Perfect Server Guide. Fix that.
    See that
    Read again the Perfect Server Guide, the part about Postfix Configuration. Fix the configuration.
     
  7. lindu

    lindu Member

    tail -f /var/log/mail.log
    Code:
    Oct  6 00:45:02 cloud postfix/smtps/smtpd[17639]: lost connection after CONNECT from localhost[127.0.0.1]
    Oct  6 00:45:02 cloud postfix/smtps/smtpd[17639]: disconnect from localhost[127.0.0.1] commands=0/0
    Oct  6 00:45:02 cloud dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<gixDiiyU+K9/AAAB>
    Oct  6 00:45:02 cloud dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<ZjhDiiyU5K9/AAAB>
    Oct  6 00:45:03 cloud postfix/smtps/smtpd[17717]: SSL_accept error from mail-wm1-f43.google.com[209.85.128.43]: lost connection
    Oct  6 00:45:03 cloud postfix/smtps/smtpd[17717]: lost connection after CONNECT from mail-wm1-f43.google.com[209.85.128.43]
    Oct  6 00:45:03 cloud postfix/smtps/smtpd[17717]: disconnect from mail-wm1-f43.google.com[209.85.128.43] commands=0/0
    Oct  6 00:48:20 cloud postfix/smtps/smtpd[17465]: SSL_accept error from mail-wm1-f44.google.com[209.85.128.44]: lost connection
    Oct  6 00:48:20 cloud postfix/smtps/smtpd[17465]: lost connection after CONNECT from mail-wm1-f44.google.com[209.85.128.44]
    Oct  6 00:48:20 cloud postfix/smtps/smtpd[17465]: disconnect from mail-wm1-f44.google.com[209.85.128.44] commands=0/0
    
     
  8. lindu

    lindu Member

    can send email but
    Code:
    (connect to aspmx.l.google.com[108.177.97.27]:25: Connection timed out)
     
  9. lindu

    lindu Member

    tail -f /var/log/mail.log

    Code:
     
    tail -f /var/log/mail.log
    Oct  6 01:42:51 cloud dovecot: imap([email protected]): Connection closed (UID FETCH finished 0.008 secs ago) in=151 out=1439
    Oct  6 01:42:54 cloud postfix/smtpd[21554]: timeout after END-OF-MESSAGE from localhost[127.0.0.1]
    Oct  6 01:42:54 cloud postfix/smtpd[21554]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=2 data=1 commands=5
    Oct  6 01:42:54 cloud postfix/smtpd[21553]: timeout after END-OF-MESSAGE from localhost[127.0.0.1]
    Oct  6 01:42:54 cloud postfix/smtpd[21553]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 commands=4
    Oct  6 01:45:03 cloud dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<7KfcYC2UiLN/AAAB>
    Oct  6 01:45:03 cloud postfix/smtpd[22071]: connect from localhost[127.0.0.1]
    Oct  6 01:45:03 cloud postfix/smtpd[22071]: lost connection after CONNECT from localhost[127.0.0.1]
    Oct  6 01:45:03 cloud postfix/smtpd[22071]: disconnect from localhost[127.0.0.1] commands=0/0
    Oct  6 01:45:03 cloud dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<WcfcYC2UnLN/AAAB>
    Oct  6 01:45:57 cloud dovecot: imap-login: Login: user=<[email protected]m>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22082, secured, session=<xDsfZC2UoLN/AAAB>
    Oct  6 01:45:57 cloud dovecot: imap([email protected]): Logged out in=29 out=502
    Oct  6 01:45:57 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22084, secured, session=<CfkgZC2UorN/AAAB>
    Oct  6 01:45:57 cloud dovecot: imap([email protected]): Logged out in=70 out=633
    Oct  6 01:45:58 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22086, secured, session=<uO0vZC2UpLN/AAAB>
    Oct  6 01:45:58 cloud dovecot: imap([email protected]): Logged out in=318 out=1862
    Oct  6 01:45:58 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22088, secured, session=<A+QwZC2UprN/AAAB>
    Oct  6 01:45:58 cloud dovecot: imap([email protected]): Logged out in=233 out=1026
    Oct  6 01:46:11 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22115, secured, session=<c3/1ZC2UqrN/AAAB>
    Oct  6 01:46:11 cloud dovecot: imap([email protected]): Logged out in=32 out=485
    Oct  6 01:46:11 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22117, secured, session=<x/H2ZC2UrLN/AAAB>
    Oct  6 01:46:11 cloud dovecot: imap([email protected]): Logged out in=44 out=592
    Oct  6 01:46:42 cloud postfix/smtpd[22071]: connect from localhost[127.0.0.1]
    Oct  6 01:46:42 cloud postfix/smtpd[22071]: NOQUEUE: filter: RCPT from localhost[127.0.0.1]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<putihsari.com>
    Oct  6 01:46:42 cloud postfix/smtpd[22071]: 4E931220A65: client=localhost[127.0.0.1], sasl_method=LOGIN, [email protected]
    Oct  6 01:46:42 cloud postfix/smtpd[22071]: 4E931220A65: filter: RCPT from localhost[127.0.0.1]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<putihsari.com>
    Oct  6 01:46:42 cloud postfix/cleanup[22121]: 4E931220A65: message-id=<[email protected]>
    Oct  6 01:46:42 cloud postfix/qmgr[21504]: 4E931220A65: from=<[email protected]>, size=594, nrcpt=2 (queue active)
    Oct  6 01:46:42 cloud postfix/smtpd[22071]: disconnect from localhost[127.0.0.1] ehlo=1 auth=1 mail=1 rcpt=2 data=1 quit=1 commands=7
    Oct  6 01:46:42 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22125, secured, session=<wx7IZi2UvLN/AAAB>
    Oct  6 01:46:42 cloud dovecot: imap([email protected]): Logged out in=477 out=648
    Oct  6 01:46:43 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22129, secured, session=<U5HUZi2UwrN/AAAB>
    Oct  6 01:46:43 cloud dovecot: imap([email protected]): Logged out in=70 out=633
    Oct  6 01:46:43 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22131, secured, session=<U6/cZi2UxrN/AAAB>
    Oct  6 01:46:43 cloud dovecot: imap([email protected]): Logged out in=318 out=1862
    Oct  6 01:46:43 cloud dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=22134, secured, session=<rvjcZi2UyLN/AAAB>
    Oct  6 01:46:43 cloud dovecot: imap([email protected]): Logged out in=120 out=766
    Oct  6 01:46:46 cloud postfix/qmgr[21504]: BC848220A74: from=<[email protected]>, size=2362, nrcpt=1 (queue active)
    Oct  6 01:46:46 cloud postfix/qmgr[21504]: BE311220A7B: from=<[email protected]>, size=3218, nrcpt=2 (queue active)
    Oct  6 01:46:46 cloud postfix/qmgr[21504]: 55F102209AA: from=<[email protected]>, size=3000, nrcpt=1 
    
     
  10. lindu

    lindu Member

    telnet alt2.gmail-smtp-in.l.google.com 25
    Code:
    Trying 209.85.200.27...
    Trying 2607:f8b0:4001:c16::1a...
    telnet: Unable to connect to remote host: Cannot assign requested address 
     
  11. lindu

    lindu Member

    done, alibabacloud block my port 25.
     

Share This Page