Need help configuring email on new ISPC server

Discussion in 'Installation/Configuration' started by schwim, Jan 5, 2021.

  1. schwim

    schwim Member HowtoForge Supporter

    Hello everyone!
    Perfect server installed on Debian 10 running ISPC version 3.2.1 with Dovecot

    FQDN: adolf.schwimserver3.com
    RDNS: adolf.schwimserver3.com
    Email domain: adolf.schwimserver3.com
    Email address: [email protected]3.com set up domain and address via ISPC.
    ISPC / System / Firewall shows following TCP ports open: 20,21,22,25,53,80,110,143,443,465,587,993,995,3306,8080,8081,10000

    SPF, dmarc and mx records:
    [​IMG]

    Sending mail to address from outside mail(GMail) results in no mail in mailbox, mail.log only shows:
    Sending mail from the roundcube install to GMail account results in stalled page load in roundcube and the mail never arriving to the gmail account then shows the following in mail.log:
    mail.info:
    Everything just times out, both when trying to make it's way out and in. What am I dealing with? What am I missing in setting up usable email on my server?

    ISPC test script results:
     
    Last edited: Jan 5, 2021
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. schwim

    schwim Member HowtoForge Supporter

  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you change the master.cf according to the perfect server guide? It seems like you didn't.

    By the way, ISPConfig 3.2.1 and older have a security issue, you should update to 3.2.2.
     
  5. schwim

    schwim Member HowtoForge Supporter

    I did try to follow that properly. Here's my master.cf as modified:
    Looking at the how-to, it seems mine matches, no?

     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Please put it in code tags instead of quote so we can see the indentation better :)
     
  7. schwim

    schwim Member HowtoForge Supporter

    Ahh, I see that I missed two uncomments. I fixed that and restarted postfix. I can now send mail successfully from local roundcube install to GMail but still receive no mail from GMail to the local email address. I'm running the test script again and posting the tail of mail.log:
    ISPC test script:
    Code:
    ##### 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.2.1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.3.19-1~deb10u1
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 796)
    [INFO] I found the following mail server(s):
            Postfix (PID 13878)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 422)
    [INFO] I found the following imap server(s):
            Dovecot (PID 422)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1042)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:993          (422/dovecot)
    [anywhere]:995          (422/dovecot)
    [localhost]:10023               (603/postgrey)
    [localhost]:10024               (1317/amavisd-new)
    [localhost]:10025               (13878/master)
    [localhost]:10026               (1317/amavisd-new)
    [localhost]:10027               (13878/master)
    [anywhere]:587          (13878/master)
    [localhost]:11211               (412/memcached)
    [anywhere]:110          (422/dovecot)
    [anywhere]:143          (422/dovecot)
    [anywhere]:465          (13878/master)
    [anywhere]:8082         (486/monit)
    [anywhere]:21           (1042/pure-ftpd)
    ***.***.***.***:53              (451/named)
    [localhost]:53          (451/named)
    [anywhere]:22           (461/sshd)
    [anywhere]:25           (13878/master)
    [localhost]:953         (451/named)
    *:*:*:*::*:993          (422/dovecot)
    *:*:*:*::*:995          (422/dovecot)
    *:*:*:*::*:10023                (603/postgrey)
    *:*:*:*::*:10024                (1317/amavisd-new)
    *:*:*:*::*:10026                (1317/amavisd-new)
    *:*:*:*::*:3306         (537/mysqld)
    *:*:*:*::*:587          (13878/master)
    [localhost]10           (422/dovecot)
    [localhost]43           (422/dovecot)
    *:*:*:*::*:8080         (796/apache2)
    *:*:*:*::*:80           (796/apache2)
    *:*:*:*::*:465          (13878/master)
    *:*:*:*::*:8081         (796/apache2)
    *:*:*:*::*:21           (1042/pure-ftpd)
    *:*:*:*::*:4949         (577/perl)
    *:*:*:*::*:53           (451/named)
    *:*:*:*::*:22           (461/sshd)
    *:*:*:*::*:25           (13878/master)
    *:*:*:*::*:953          (451/named)
    *:*:*:*::*:443          (796/apache2)
    
    ##### 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
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    mail.log tail:
    Code:
    root@adolf:/tmp# tail /var/log/mail.log
    Jan  5 09:50:30 adolf postfix/smtpd[15037]: NOQUEUE: filter: RCPT from mail-ej1-f53.google.com[209.85.218.53]: <[email protected]>: Sender address triggers FILTER lmtp:[127.0.0.1]:10024; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-ej1-f53.google.com>
    Jan  5 09:50:30 adolf postfix/cleanup[15704]: 8787D5EA1A: message-id=<[email protected]>
    Jan  5 09:50:30 adolf postfix/smtpd[15037]: NOQUEUE: reject: RCPT from mail-ej1-f53.google.com[209.85.218.53]: 450 4.1.1 <[email protected]>: Recipient address rejected: unverified address: unknown user: "server"; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-ej1-f53.google.com>
    Jan  5 09:50:30 adolf postfix/smtpd[15037]: disconnect from mail-ej1-f53.google.com[209.85.218.53] ehlo=2 starttls=1 mail=1 rcpt=0/1 bdat=0/1 quit=1 commands=5/7
    Jan  5 09:50:30 adolf postfix/qmgr[13880]: 8787D5EA1A: from=<[email protected]>, size=262, nrcpt=1 (queue active)
    Jan  5 09:50:30 adolf postfix/trivial-rewrite[15702]: warning: do not list domain adolf.schwimserver3.com in BOTH mydestination and virtual_mailbox_domains
    Jan  5 09:50:30 adolf postfix/local[15706]: 8787D5EA1A: to=<[email protected]>, relay=local, delay=0.18, delays=0.17/0.01/0/0, dsn=5.1.1, status=undeliverable (unknown user: "server")
    Jan  5 09:50:30 adolf postfix/qmgr[13880]: 8787D5EA1A: removed
    Jan  5 09:50:35 adolf dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=15708, secured, session=<CSrcKim4HIIAAAAAAAAAAAAAAAAAAAAB>
    Jan  5 09:50:35 adolf dovecot: imap([email protected])<15708><CSrcKim4HIIAAAAAAAAAAAAAAAAAAAAB>: Logged out in=50 out=564 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    root@adolf:/tmp# 
    
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you create the user server for the domain adolf.schwimserver3.com?
     
  9. schwim

    schwim Member HowtoForge Supporter

    Yes, and I can send mail to GMail when logged into that account on the Roundcube install:
    [​IMG]

    ISPC config:
    [​IMG]

    [​IMG]
     
  10. schwim

    schwim Member HowtoForge Supporter

    Was I supposed to do something other than set up mail domain and mailbox in ISPC perhaps? Although I created the email address, I notice this in mail.log:
    Code:
    Jan  5 09:50:30 adolf postfix/smtpd[15037]: NOQUEUE: reject: RCPT from mail-ej1-f53.google.com[209.85.218.53]: 450 4.1.1 <[email protected]>: Recipient address rejected: unverified address: unknown user: "server"; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-ej1-f53.google.com
    
     
    Last edited: Jan 5, 2021
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you try updating to 3.2.2 and reconfiguring services? If it doesn't work after, use a email test service like mxtoolbox.com
     
  12. schwim

    schwim Member HowtoForge Supporter

    Ran the update, choosing to reconfigure services and now at 3.2.2. Issue perisists. Mail from roundcube to gmail works, while mail from gmail to server never arrives. tail of mail.log shows the following:
    Code:
    Jan  5 12:16:35 adolf postfix/smtpd[12108]: NOQUEUE: reject: RCPT from mail-wr1-f54.google.com[209.85.221.54]: 450 4.1.1 <[email protected]>: Recipient address rejected: unverified address: unknown user: "server"; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-wr1-f54.google.com>
    Jan  5 12:16:35 adolf postfix/local[12838]: 5749060049: to=<[email protected]>, relay=local, delay=0.03, delays=0.01/0.02/0/0, dsn=5.1.1, status=undeliverable (unknown user: "server")
    Jan  5 12:16:35 adolf postfix/qmgr[11687]: 5749060049: removed
    Jan  5 12:16:35 adolf postfix/smtpd[12108]: disconnect from mail-wr1-f54.google.com[209.85.221.54] ehlo=2 starttls=1 mail=1 rcpt=0/1 bdat=0/1 quit=1 commands=5/7
    Jan  5 12:17:00 adolf postfix/smtpd[12768]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 commands=4
    Jan  5 12:17:00 adolf dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS, session=<NiJyNiu4VNkAAAAAAAAAAAAAAAAAAAAB>
    Jan  5 12:17:18 adolf dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=12881, secured, session=<xYuDNyu4To8AAAAAAAAAAAAAAAAAAAAB>
    Jan  5 12:17:18 adolf dovecot: imap([email protected])<12881><xYuDNyu4To8AAAAAAAAAAAAAAAAAAAAB>: Logged out in=50 out=564 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    Jan  5 12:17:20 adolf dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=12883, secured, session=<kACiNyu4UI8AAAAAAAAAAAAAAAAAAAAB>
    Jan  5 12:17:20 adolf dovecot: imap([email protected])<12883><kACiNyu4UI8AAAAAAAAAAAAAAAAAAAAB>: Logged out in=76 out=597 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
    root@adolf:/tmp# 
    
    Toolbox shows everything as it should be.
    MX lookup: Network Tools: DNS,IP,Email (mxtoolbox.com)
    SMTP: Network Tools: DNS,IP,Email (mxtoolbox.com)

    All green checkmarks.

    One thing I've been wondering. When gmail mail fails because of status=undeliverable (unknown user: "server"), shouldn't that be user "[email protected]3.com"? since there could be a "[email protected]3.com", "[email protected]" and more, is that perhaps why this is failing? If so, what could be causing that issue?
     
  13. schwim

    schwim Member HowtoForge Supporter

    I just can't figure it out. I've tried making new email addresses and all behave the same. The address obviously exists because it let's me log into roundcube and I can send mail, but the error on incoming mail is always the same, unknown user. Why is my inbound server not seeing the accounts?
     
  14. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    If you want to manage email to addresses at adolf.schwinserver3.com, set the server's hostname to something different.
     
    ahrasis likes this.
  15. schwim

    schwim Member HowtoForge Supporter

    That was it. It should have clicked with me when the user was missing the domain that it was equating the FQDN to be the same as localhost. Using an email address @schwimserver3.com results in mail moving back and forth without issue.

    Thank you all so much for your help, I can't tell you how much I appreciate it!
     
    ahrasis likes this.

Share This Page