Can't Receive Mail Using ISPConfig 3.1 on Ubuntu 18.04 Server

Discussion in 'ISPConfig 3 Priority Support' started by Patrick Lindsey, Apr 29, 2019.

  1. Patrick Lindsey

    Patrick Lindsey New Member

    Greetings! I recently installed ISPConfig 3.1 onto a Ubuntu 18.04 Server installation. Everything is working except incoming email. I am a Linux novice so I will need a lot of help solving this along the way. Thank you for your assistance in advance.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. Patrick Lindsey

    Patrick Lindsey New Member

    Screenshot_20190429-150217.png Thank you for the reply. I read the article you suggested and feel that is not a good fit since I can send email from [email protected], but not receive email. I am getting an error back from the addresses I used to send to [email protected] saying the server is misconfigured (see attachment). I could be wrong but I do not feel the issue is in the DNS records. Please advise me of the next steps in troubleshooting this issue.
     
    Last edited: Apr 29, 2019
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the conetnt of the file /etc/postfix/master.cf and which errors do you get in the mail.log file when you send an email to your server?
     
  5. Patrick Lindsey

    Patrick Lindsey New Member

    I hate to ask this but I need to or we go no further. How do I get the contents of the master.cf file from a ssh terminal (using Putty) to the windows clipboard so I can paste it to this thread? I tried using nano and less and am not having any luck. The file is rather lengthy, so a screen shot is not going to do.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    use:

    cat /etc/postfix/master.cf

    to display it on the shell and then just mark the content so that it's highlighted in putty, this copies the text to the windows clipboard automatically.
     
  7. Patrick Lindsey

    Patrick Lindsey New Member

    [email protected]:~$ cat /etc/postfix/master.cf
    #
    # 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)
    # ==========================================================================
    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_client_restrictions=permit_sasl_authenticated,reject
    # -o smtpd_tls_auth_only=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_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 - 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
    flush unix n - y 1000? 0 flush
    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
    #
    # ====================================================================
    # 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} ${sender}
    #
    # ====================================================================
    #
    # 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 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 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
     
  8. Patrick Lindsey

    Patrick Lindsey New Member

    No noted errors in the mail logs when trying to send to the [email protected] address. Something that is curious though, when I send from [email protected] to the same address I get no errors anywhere (email client or logs) and no email shows up either.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    remove the # in front of the line

    #submission inet n - y - - smtpd

    and restart postfix.
     
  10. Patrick Lindsey

    Patrick Lindsey New Member

    Done. No errors in the logs and no feedback or errors from the email client; no email showing up either though...
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Are there any messages in the log that show the sender address when you send an email to the server? if not, then the DNS record of your domain might be wrong or your server is hosted at home or in office and port 25 is blocked by the internet access provider.

    What you can do to test your email setup locally is: login to roundcube webmail with your email account details and then send an email to the same address that you used for the roundcube login. The email should show up after a few seconds in the roundcube inbox.
     
  12. Patrick Lindsey

    Patrick Lindsey New Member

    sending to that address in roundcube did not work. Here is the end of the mail log:

    Apr 30 16:29:06 patricktoday postfix/trivial-rewrite[9895]: warning: do not list domain patricktoday.org in BOTH mydestination and virtual_mailbox_domains
    Apr 30 16:29:06 patricktoday postfix/smtpd[9912]: 5B9F32612E1: client=localhost.localdomain[127.0.0.1]
    Apr 30 16:29:06 patricktoday postfix/cleanup[9896]: 5B9F32612E1: message-id=<[email protected]>
    Apr 30 16:29:06 patricktoday postfix/qmgr[9187]: 5B9F32612E1: from=<[email protected]>, size=1729, nrcpt=1 (queue active)
    Apr 30 16:29:06 patricktoday postfix/trivial-rewrite[9895]: warning: do not list domain patricktoday.org in BOTH mydestination and virtual_mailbox_domains
    Apr 30 16:29:06 patricktoday amavis[1901]: (01901-01) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [::1]:42402 <[email protected]> -> <[email protected]>, Queue-ID: 7DA792612C3, Message-ID: <[email protected]>, mail_id: tfs87IiFIbBL, Hits: -1, size: 625, queued_as: 5B9F32612E1, dkim_new=default:patricktoday.org, 1803 ms
    Apr 30 16:29:06 patricktoday postfix/smtp[9897]: 7DA792612C3: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=2, delays=0.13/0.03/0.01/1.8, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 5B9F32612E1)
    Apr 30 16:29:06 patricktoday postfix/qmgr[9187]: 7DA792612C3: removed
    Apr 30 16:29:06 patricktoday postfix/local[9913]: 5B9F32612E1: to=<[email protected]>, relay=local, delay=0.14, delays=0.05/0.02/0/0.07, dsn=5.1.1, status=bounced (unknown user: "info")
    Apr 30 16:29:06 patricktoday postfix/cleanup[9896]: 7DF0C2612C3: message-id=<[email protected]>
    Apr 30 16:29:06 patricktoday postfix/bounce[9914]: 5B9F32612E1: sender non-delivery notification: 7DF0C2612C3
    Apr 30 16:29:06 patricktoday postfix/qmgr[9187]: 7DF0C2612C3: from=<>, size=3613, nrcpt=1 (queue active)
    Apr 30 16:29:06 patricktoday postfix/trivial-rewrite[9895]: warning: do not list domain patricktoday.org in BOTH mydestination and virtual_mailbox_domains
    Apr 30 16:29:06 patricktoday postfix/qmgr[9187]: 5B9F32612E1: removed
    Apr 30 16:29:06 patricktoday postfix/local[9913]: 7DF0C2612C3: to=<[email protected]>, relay=local, delay=0.13, delays=0.06/0.01/0/0.06, dsn=5.1.1, status=bounced (unknown user: "info")
    Apr 30 16:29:06 patricktoday postfix/qmgr[9187]: 7DF0C2612C3: removed
    Apr 30 16:29:17 patricktoday dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=9917, secured, session=<+VQB58GHzsMAAAAAAAAAAAAAAAAAAAAB>
    Apr 30 16:29:17 patricktoday dovecot: imap([email protected]): Logged out in=76 out=546
     
  13. Patrick Lindsey

    Patrick Lindsey New Member

    I see the warning and errors but do not know what they mean.
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I tried sending mail to that address. Looks like it arrives at you mail server, and you run graylisting. I'll wait.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you used patricktoday.org as server hostname and not a subdomain like server1.patricktoday.org. Please run these commands and post the result:

    hostname -f

    cat /etc/mailname

    grep patricktoday.org /etc/postfix/main.cf
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Try Internet Search Engines with
    Code:
    site:howtoforge.com "warning: do not list domain" "BOTH mydestination and virtual_mailbox_domains"
     
  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My mail server log show my test mail was delivered to your mail server.
    And got response:
    Code:
    <[email protected]>: unknown user: "info"
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    When the domain is listed in mydestination in main.cf, then postfix searches for a Linux user 'info' instead of a mailbox [email protected] Removing the domain from mydestination line in postfix main.cf and a restart of postfix should fix the isuue.
     
  19. Patrick Lindsey

    Patrick Lindsey New Member

    hostname -f = patricktoday

    cat /etc/mailname = patricktoday.org

    grep patricktoday.org /etc/postfix/main.cf =
    smtpd_banner = patricktoday.org ESMTP $mail_name (Ubuntu)
    myhostname = patricktoday.org
    mydestination = patricktoday.org, localhost, localhost.localdomain
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Change patricktoday.org to server1.patricktoday.org in these files wherever it occurs:

    /etc/hostname
    /etc/mailname
    /etc/hosts
    /etc/postfix/main.cf

    then restart the server. Then add a dns a-record für server1 pointing to the ip of your server.
     

Share This Page