SMTP-service offline, Debian buster

Discussion in 'Installation/Configuration' started by Ralph W Trynor, Aug 8, 2020.

  1. Ralph W Trynor

    Ralph W Trynor New Member

    I have tried many of the threads here but none seem to work. This is a fresh install of Debian and ispconfig 3 following the howto instructions. Any ideas why this would be happening on a fresh install.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    There are a lot of reasons that the SMTP service is online, did you take a look at your syslog and mail.log in /var/log? Are there any errors?
     
  3. Ralph W Trynor

    Ralph W Trynor New Member

    Just looks like a bunch of errors from outside the site but I see nothing that I can use as a guide.
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: connect from unknown[98.0.42.20]
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: lost connection after CONNECT from unknown[98.0.42.20]
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: disconnect from unknown[98.0.42.20] commands=0/0
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: warning: hostname mta-98-0-42-20.mass.rr.com does not resolve to address 98.0.42.20: Name or service not known
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: connect from unknown[98.0.42.20]
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: SSL_accept error from unknown[98.0.42.20]: lost connection
    Aug 8 17:59:00 server1 postfix/smtps/smtpd[12817]: lost connection after CONNECT from unknown[98.0.42.20]
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That log shows misconfigured e-mail servers trying to send (probably SPAM) to your host. Your host very correctly refuses to deal with them.
    There is link to e-mail setup tutorial in my signature.
    Why does your topic say SMTP is offline? Postfix seem to be running on your host since it writes error messages. Try using this:
    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
     
    Th0m likes this.
  5. Ralph W Trynor

    Ralph W Trynor New Member

    Web-Server: Online
    FTP-Server: Online
    SMTP-Server: Offline
    POP3-Server: Online
    IMAP-Server: Online
    DNS-Server: Online
    mySQL-Server: Online



    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 10 (buster)

    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.1dev


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 7.3.19-1~deb10u1

    ##### PORT CHECK #####

    [WARN] Port 25 (SMTP server) seems NOT to be listening
    [WARN] Port 25 (SMTP server) seems NOT to be listening

    ##### MAIL SERVER CHECK #####

    [WARN] I found no "smtp" entry in your postfix master.cf

    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Apache 2 (PID 20944)
    [WARN] I could not determine which mail server is running.
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 428)
    [INFO] I found the following imap server(s):
    Dovecot (PID 428)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 731)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [anywhere]:110 (428/dovecot)
    [anywhere]:143 (428/dovecot)
    [anywhere]:465 (24705/master)
    [anywhere]:21 (731/pure-ftpd)
    ***.***.***.***:53 (455/named)
    [localhost]:53 (455/named)
    [anywhere]:22 (483/sshd)
    [localhost]:953 (455/named)
    [anywhere]:993 (428/dovecot)
    [anywhere]:995 (428/dovecot)
    [localhost]:10023 (553/postgrey)
    [localhost]:10024 (895/amavisd-new)
    [localhost]:10025 (24705/master)
    [localhost]:10026 (895/amavisd-new)
    [localhost]:10027 (24705/master)
    [anywhere]:587 (24705/master)
    [localhost]:11211 (433/memcached)
    [localhost]10 (428/dovecot)
    [localhost]43 (428/dovecot)
    *:*:*:*::*:8080 (20944/apache2)
    *:*:*:*::*:80 (20944/apache2)
    *:*:*:*::*:465 (24705/master)
    *:*:*:*::*:8081 (20944/apache2)
    *:*:*:*::*:21 (731/pure-ftpd)
    *:*:*:*::*:53 (455/named)
    *:*:*:*::*:22 (483/sshd)
    *:*:*:*::*:953 (455/named)
    *:*:*:*::*:443 (20944/apache2)
    *:*:*:*::*:993 (428/dovecot)
    *:*:*:*::*:995 (428/dovecot)
    *:*:*:*::*:10023 (553/postgrey)
    *:*:*:*::*:10024 (895/amavisd-new)
    *:*:*:*::*:3306 (1937/mysqld)
    *:*:*:*::*:10026 (895/amavisd-new)
    *:*:*:*::*:587 (24705/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
    RETURN all -- [anywhere]/0 [anywhere]/0
     
  6. Ralph W Trynor

    Ralph W Trynor New Member

    Hmm looks like Something is pointing wrong maybe from outside my server,
    root@server1:~# host the-computerguy.biz
    the-computerguy.biz has address 50.75.49.117
    the-computerguy.biz mail is handled by 10 mail.the-computerguy.biz.
    root@server1:~# host 50.75.49.117
    117.49.75.50.in-addr.arpa domain name pointer woodardcurran.com.
    root@server1:~#
     
  7. Ralph W Trynor

    Ralph W Trynor New Member

    OK I tried some tests and I am seeing this returned even though I do not have a PTR setup in my DNS


    Reverse MX A records (PTR) Your reverse (PTR) record:
    117.49.75.50.in-addr.arpa -> woodardcurran.com
    You have reverse (PTR) records for all your IPs, that is a good thing.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Compare what you have in /etc/postfix/master.cf to what the installation guide shows should be there.
    Most likely your name server is not authoritative for 117.49.75.50.in-addr.arpa so it can not be there. It is probably at your Internet Service Providers name service.
    Links in my signature to DNS and e-mail setup tutorials.
     
  9. Ralph W Trynor

    Ralph W Trynor New Member

    My Master.cf looks the same unless I missed it,
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (no) (never) (100)
    # ==========================================================================
    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
    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
    #
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is that the complete master.cf? If it is, it really is missing the
    Code:
    smtp      inet  n       -       y       -       -       smtpd
    
    line.
    Did ypu perhaps remove other lines from master.cf?
     
    Ralph W Trynor likes this.
  11. Ralph W Trynor

    Ralph W Trynor New Member

    Looks like that was commented out by default in the install. Just removed the # but still no go. Here is my compleate file.

    #
    # 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) (no) (never) (100)
    # ==========================================================================
    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
    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
    smtp inet n - y - - smtpd
    #smtp inet n - y - 1 postscreen
    #smtpd pass - - y - - smtpd
    #dnsblog unix - - y - 0 dnsblog
    #tlsproxy unix - - y - 0 tlsproxy
    #submission inet n - y - - smtpd
    # -o syslog_name=postfix/submission
    # -o smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -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 - y - - smtpd
    # -o syslog_name=postfix/smtps
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -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 - y - - qmqpd
    pickup unix n - y 60 1 pickup
    cleanup unix n - y - 0 cleanup
    qmgr unix n - n 300 1 qmgr
    #qmgr unix n - n 300 1 oqmgr
    tlsmgr unix - - y 1000? 1 tlsmgr
    rewrite unix - - y - - trivial-rewrite
    bounce unix - - y - 0 bounce
    defer unix - - y - 0 bounce
    trace unix - - y - 0 bounce
    verify unix - - y - 1 verify
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - y - - smtp
    relay unix - - y - - smtp
    -o syslog_name=postfix/$service_name
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - y - - showq
    error unix - - y - - error
    retry unix - - y - - error
    discard unix - - y - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - y - - lmtp
    anvil unix - - y - 1 anvil
    scache unix - - y - 1 scache
    postlog unix-dgram n - n - 1 postlogd
    #
    # ====================================================================
    # 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 vmail ${extension} ${recipient} ${user} ${nexthop$
    #
    # ====================================================================
    #
    # 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}

    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
    -o smtp_bind_address=


    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 smtpd_end_of_data_restrictions=
    -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 disable_dns_lookups=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 smtpd_end_of_data_restrictions=
    -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
    -o disable_dns_lookups=yes

    ^
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you restart postfix after you changed the config file?
     
    Ralph W Trynor likes this.
  13. Ralph W Trynor

    Ralph W Trynor New Member

    I restarted everything and it looks like it finds the smtp now. mail works but other servers are rejecting emails from my server and I still have one error showing up. Any ideas on these?
    Error:
    Error Stats not generated. The GoAccess binary couldn't be found. Make sure that GoAccess is installed and that it is in $PATH

    emails rejected
    This is the mail system at host server1.the-computerguy.biz.

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    < [email protected]>: host
    gmail-smtp-in.l.google.com[2607:f8b0:4004:c0b::1a] said: 550-5.7.1
    [2604:6000:1514:85b5:3a60:77ff:fe83:480] Our system has detected that
    550-5.7.1 this message does not meet IPv6 sending guidelines regarding PTR
    550-5.7.1 records and authentication. Please review 550-5.7.1
    https://support.google.com/mail/?p=IPv6AuthError for more information 550
    5.7.1 . o11si10198067qti.318 - gsmtp (in reply to end of DATA command)
    Reporting-MTA: dns; server1.the-computerguy.biz
    X-Postfix-Queue-ID: 215BC12E19E8
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Mon, 10 Aug 2020 07:29:11 -0400 (EDT)

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.7.1
    Remote-MTA: dns; gmail-smtp-in.l.google.com
    Diagnostic-Code: smtp; 550-5.7.1 [2604:6000:1514:85b5:3a60:77ff:fe83:480] Our
    system has detected that 550-5.7.1 this message does not meet IPv6 sending
    guidelines regarding PTR 550-5.7.1 records and authentication. Please
    review 550-5.7.1 https://support.google.com/mail/?p=IPv6AuthError for more
    information 550 5.7.1 . o11si10198067qti.318 - gsmtp
     
  14. Ralph W Trynor

    Ralph W Trynor New Member

    That worked now running but no one accepting emails from my server.
     
  15. Ralph W Trynor

    Ralph W Trynor New Member

    Yes and was not running so reset the system and now works, just one error now and other servers are not accepting emails from my servers.
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The reason given is
    You seem to be using IPv6 address for e-mail and PTR record is missing from name service. And it must match the FQDN of that e-mail server.
    Some explanations in the Tutorials linked to in my signature.
     
  17. Ralph W Trynor

    Ralph W Trynor New Member

    So far you have been very helpful. I have tried to set the ptr up but with no luck. Seems it is only two lines but no matter what I do Gmail keep kicking the mail back to me. Is there something that explains how to setup the ptr record. I have the ispconfig manual but it is real unclear as to what is being done or i am just getting lost with it's 1.2.3.4 explanation.
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

     

Share This Page