Can send but not receive email

Operating system Ubuntu Linux 16.04.7
Webmin version 1.991 Usermin version 1.840
Virtualmin version 7.0-4

I just set up a new account which is an “alias of…with own email”

I then set up a user / email account.

I can login with usermin, or connect via a client. I can send emails which are received with no problem, but I cannot receive replies.

Here is the error in the bounce:

Final-Recipient: rfc822; autobot@jshypertext.com
Action: failed
Status: 5.1.1
Remote-MTA: dns; jshypertext.com. (168.235.86.202, the server for the domain jshypertext.com.)
Diagnostic-Code: smtp; 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table
Last-Attempt-Date: Tue, 17 May 2022 14:08:54 -0700 (PDT)

The mailboxes exist:

/home/john/domains/jshypertext.com/homes/autobot/Maildir etc.

I added this to /etc/postfix/virtual

autobot@jshypertext.com autobot-jshypertext.com

I have this in the namecheap domain reg:

TXT Record @ v=spf1 a mx a:jshypertext.com ip4:168.235.86.202 ip6:2604:180:3:344::5e28 ?all

MX Record @ jshypertext.com. 1 Automatic

Where can I find the problem?

You should use virtualmin to create the alias, not edit files.

Steve

Yes I undid that - I still don’t know how to solve my problem.

Then the line you added /etc/postfix/virtual should have already be in there. Thats what VM does when you create alias. If its not there then something went wrong.

Steve

Check /etc/alias, you may now have a duplicate entry.

Steve

We need to see the relevant maillog entries.

Also your Ubuntu version has been EOL for quite some time. You need to plan to update to a supported OS.

I’m trying to figure out the easiest way to upgrade.

Here are the relevant lines from Mail.log:

May 17 11:45:45 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=26281, TLS, session=<2x5sjDnfjKJJ5+iw>
May 17 13:14:58 host3 postfix/smtpd[30289]: 4F960412F4: client=c-73-231-232-176.hsd1.ca.comcast.net[73.231.232.176], sasl_method=PLAIN, sasl_username=autobot@jshypertext.com
May 17 13:14:58 host3 postfix/qmgr[1291]: 4F960412F4: from=autobot@jshypertext.com, size=756, nrcpt=1 (queue active)
May 17 13:14:59 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=31487, TLS, session=<HNGCyzrfNqRJ5+iw>
May 17 13:15:08 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=31670, TLS, session=<vQ8SzDrfOqRJ5+iw>
May 17 13:18:02 host3 postfix/smtpd[29979]: B96AF41396: client=c-73-231-232-176.hsd1.ca.comcast.net[73.231.232.176], sasl_method=PLAIN, sasl_username=autobot@jshypertext.com
May 17 13:18:02 host3 postfix/qmgr[1291]: B96AF41396: from=autobot@jshypertext.com, size=747, nrcpt=1 (queue active)
May 17 13:18:03 host3 dovecot: imap(autobot@jshypertext.com): Connection closed (IDLE running for 0.001 + waiting input for 174.615 secs, 2 B in + 10+0 B out, state=wait-input) in=946 out=2302
May 17 13:18:32 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=31855, TLS, session=<jto32DrfYqRJ5+iw>
May 17 13:18:36 host3 postfix/smtpd[31406]: NOQUEUE: reject: RCPT from mail-pg1-f177.google.com[209.85.215.177]: 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table; from=jsimmons@johnsimmonshypertext.com to=autobot@jshypertext.com proto=ESMTP helo=<mail-pg1-f177.google.com>
May 17 13:26:27 host3 dovecot: imap(autobot@jshypertext.com): Logged out in=594 out=572
May 17 13:26:27 host3 dovecot: imap(autobot@jshypertext.com): Logged out in=1808 out=5620
May 17 13:26:27 host3 dovecot: imap(autobot@jshypertext.com): Logged out in=532 out=2122
May 17 13:52:27 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=1927, TLS, session=<E0OBUTvf9JVJ5+iw>
May 17 13:52:27 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=1928, TLS, session=<PEOBUTvf8pVJ5+iw>
May 17 14:08:54 host3 postfix/smtpd[6173]: NOQUEUE: reject: RCPT from mail-pj1-f49.google.com[209.85.216.49]: 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table; from=jsimmons@johnsimmonshypertext.com to=autobot@jshypertext.com proto=ESMTP helo=<mail-pj1-f49.google.com>
May 17 14:22:45 host3 postfix/smtpd[6710]: NOQUEUE: reject: RCPT from mail-pj1-f54.google.com[209.85.216.54]: 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table; from=jsimmons@johnsimmonshypertext.com to=autobot@jshypertext.com proto=ESMTP helo=<mail-pj1-f54.google.com>
May 17 14:33:19 host3 postfix/smtpd[6173]: NOQUEUE: reject: RCPT from mail-pj1-f46.google.com[209.85.216.46]: 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table; from=jsimmons@johnsimmonshypertext.com to=autobot@jshypertext.com proto=ESMTP helo=<mail-pj1-f46.google.com>
May 17 15:51:44 host3 dovecot: imap(autobot@jshypertext.com): Disconnected for inactivity in=507 out=1459
May 18 13:37:54 host3 dovecot: imap-login: Login: user=autobot@jshypertext.com, method=PLAIN, rip=73.231.232.176, lip=168.235.86.202, mpid=30343, TLS, session=<jKxRO0/f9MtJ5+iw>

There is NO entry at all for the domain or email address.

If there is no entry at all in the maillog when you try to send mail to a given domain/address, then it can only be one of two things: DNS is wrong (check your MX record and the A record that it points to), or port 25 is blocked at some point between your server and the sending server.

There is no configuration in the mail server that will correct either of those problems.

I think my replies got mixed. I meant that there is no entry for the email address in /etc/alias.

I posted the relevant lines of the mail log, and there are entries for that.

e.g.

May 17 14:22:45 host3 postfix/smtpd[6710]: NOQUEUE: reject: RCPT from mail-pj1-f54.google.com[209.85.216.54]: 550 5.1.1 autobot@jshypertext.com: Recipient address rejected: User unknown in virtual alias table; from=jsimmons@johnsimmonshypertext.com

Are there entries in the virtual map for this address? (/etc/postfix/virtual)

There is an entry for the host, but not the email address. All of the others have entries for the host and every email address.

It would seem that for whatever reason, creating an e-mail account for alias with no email is not completing everything it needs. But I need to fix this, at least temporarily, to survive. Can you tell me what email account creation should be doing (file entries, etc.)? If I can can do it manually, I can fix it for now.

I obviously need to upgrade the OS as well. Is there a guide to doing this (as painlessly as possible!) somewhere?

So, when you created the alias domain with own email, were you expecting that to mean mail to users in the parent domain would automatically get email from the new alias domain? That’s the opposite of what that option means. If you want every user in the existing domain to get mail from the new domain (e.g. joe@virtualmin.com would receive mail for joe@newalias.tld) you want an alias without its own mail.

If you do want it to be separate, but in this case want mail to forward to an existing user, you create a new mail alias in the new domain and direct it to deliver to, e.g. joe@virtualmin.com

I’m kinda trying to discourage you from doing a bunch of stuff manually because it can be difficult to sort out who’s doing what. Virtualmin won’t generally break manually added stuff, and generally won’t be confused by it, but you probably will be in the future.

My sleep deprived brain is missing something here.

I have a domain with a website:

johnsimmonshypertext dot com

Email for that goes to google workspace.

I want my secondary domain:

jshypertext.com to be an alias so that all web traffic goes to the primary domain, but email can be used by user@jshypertext for sending and receiving. What am I missing?

You’re trying to send mail for jshypertext.com to a Google hosted domain mailbox? That can’t be an alias in Virtualmin. An alias puts mail into a local mailbox. This is not a local mailbox.

You need to setup an alias in Google Workspaces for your domain, and setup the MX records to point to Google just like you did with the other domain.

It’s possible to forward, as well, but you don’t want local mail service involved in this at all (dealing with spam and Google’s spam filters in this case is messy, to put it mildly). Google is handling your mail, so let Google handle your mail.

No! The Google mail is for the primary domain ONLY. I want a completely separate set of email accounts such as user@jshypertext.com that can send and receive email from that secondary domain with no reference to the primary domain. Only web hits should go to the primary domain. The user@jshypertext.con account was able to send, but not receive

So you have 2 virtual servers? One for johnsimmonshypertext dot com and One for jshypertext.com?

Steve

johnsimmonshypertext dot com is the primary domain for the website.

jshypertext.com was created as a “alias domain of johnsimmonshypertext dot com with own email”.

The “with own email” is the part I can’t get to work.