Create a single A record for the base domain - i.e. domain.com.au
Create the subdomains as CNAME’s - www & mail.
MX record - the control panels I’ve used just want a hostname, a value & a TTL. So that would be mail.domain.com.au 10 3600 (or whatevr you want to set).
I would suggest you look a little closely at the Control Panel you are using a& see if there is any documentation on formats required. I’ve been caught out recently where the provider wanted it a totally different way to others I’d used.
Your main.cf looks ok. My smtp_recipient_restrictions are a little different but that’s to be expected. The only real difference is mine has
myorigin = /etc/mailname
and yours has myorigin = $mydomain but that may well be down to your OS is Debian and mine is Ubuntu. Out of the box (Virtualmin) you shouldn’t be having these issues. My money is on your DNS records not being correct\propogated.
EDIT: Also mine is inet_protocols = ipv4 as I’me not using IP6. But that’s neither here nor there.
SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)
LookupServer 5453ms
We were able to connect to your email server on port 25. Your server either disconnected before we sent our final QUIT command or did not respond to one of our other diagnostic commands within 15 seconds.
Additional Information
This may be due to a network problem, or could be an anti-spam feature of your email system. On it’s own this warning does not point to any specific problem, but can be helpful in diagnosis when combined with other errors.
Hmmm, i wonder…this wouldnt be fail2ban causing this would it???
SMTP Error: The following recipients failed: user@domain.com.au: : Recipient address rejected: User unknown in virtual alias table
I am sure that i need to fix the Virtual Alias table issue, however, I am not sure how to do this. When i check the Webmin Docs, its says that Virtualmin is supposed to automatically sort the Virtual Alias functionality. How to fix?
Before yesterday, i wasnt using user@domain.com in Virtualmin. trouble was, for some reason the new email account i created for the virtualserver/domain in question refused to work.
It was only accepting emails for the new user on the virtual server in the following format
I’ve just looked back to your 1st post & perhaps I should read more carefully:
I note that in my default configuration, I have a number of Virtual Servers that all host different domains. in one virtual server, i have 2 users (aaasq) which is the ftp user created when i setup the virtual server?
Now i need to create another email account…this example uses a president, so i have created an email address president@domain.com. However, Virtualmin appears to do the following:
You appear to have created an FTP user (I take that to be FTP only) otherwise I would have expected something in your post to say it’s an “FTP, Email, etc” type user. Which is why earlier on, I was saying that you should create a totally new user in Virtualmin as in Post #7.
But in your last post - you are trying to send emails to aasq, which according to your 1st email is an FTP (I assume only FTP) user. I was expecting that you had created a new user as in post #7 and were trying to send to\from that.
In which case - you aren’t going to receive emails sent to it and the server is responding correcting with a 550 message.
I would say ignore aaasq for the moment & focus on one of the other 2. According to Post #10 - when you send as one of those 2 - they receive correctly. Try the wormly tool again and send a test message to one of those 2. Post up the dialog & the lines from the /var/log/mail.log relevant to the time sent. 2 browser windows might be useful - one for each - when you use the wormly tool.
Connecting…
Connection: opening to 104.156.233.188:25, timeout=300, options=array (
)
Connection: opened
SERVER -> CLIENT: 220 host.fqdn.com.au ESMTP Postfix (Debian/GNU)
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.fqdn.com.au
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.fqdn.com.au
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8
CLIENT -> SERVER: MAIL FROM:
SERVER -> CLIENT: 250 2.1.0 Ok
CLIENT -> SERVER: RCPT TO:
SERVER -> CLIENT: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
SMTP ERROR: RCPT TO command failed: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 421 4.7.0 host.fqdn.com.au Error: too many errors
SMTP ERROR: QUIT command failed: 421 4.7.0 host.fqdn.com.au Error: too many errors
Connection: closed
2019-10-15 22:33:43 SMTP Error: The following recipients failed: president@domain.com.au: : Recipient address rejected: User unknown in virtual alias table
Message sending failed.
system log at 9.34am when email was sent via wornly Oct 16 09:34:05 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.242]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:05 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.242]
Oct 16 09:34:05 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.242] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:10 server1 postfix/smtpd[19110]: warning: unknown[46.38.144.57]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19110]: too many errors after AUTH from unknown[46.38.144.57]
Oct 16 09:34:10 server1 postfix/smtpd[19110]: disconnect from unknown[46.38.144.57] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:10 server1 postfix/smtpd[19623]: warning: unknown[46.38.144.179]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19623]: too many errors after AUTH from unknown[46.38.144.179]
Oct 16 09:34:10 server1 postfix/smtpd[19623]: disconnect from unknown[46.38.144.179] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:15 server1 postfix/smtpd[22594]: connect from unknown[46.38.144.17]
Oct 16 09:34:16 server1 named[546]: network unreachable resolving ‘s.lz6.zl.sampa.br/A/IN’: 2001:12f8:6::10#53
Oct 16 09:34:16 server1 postfix/smtpd[22674]: warning: hostname s.lz6.zl.sampa.br does not resolve to address 185.36.81.245: Name or service not known
Oct 16 09:34:16 server1 postfix/smtpd[22674]: connect from unknown[185.36.81.245]
Oct 16 09:34:19 server1 named[546]: network unreachable resolving ‘0.pool.ntp.org/A/IN’: 2a01:4f8:121:43cd::3:1#53
Oct 16 09:34:19 server1 named[546]: network unreachable resolving ‘0.pool.ntp.org/A/IN’: 2400:6180:0:d1::695:5001#53
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.245]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:20 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.245] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: hostname ip-38-37.ZervDNS does not resolve to address 92.118.38.37: Name or service not known
Oct 16 09:34:20 server1 postfix/smtpd[22674]: connect from unknown[92.118.38.37]
I am sure this is a problem with Virtual Alias Table...I am not sure what to do to fix virtual alias functionality in virtualmin?
Last time you posted /var/log/system/syslog or something similar. Post up the relevant entries from /var/log/mail.log ?
EDIT: and when you did the wormly test smtp thing - which email address were you sending to? President or secretary? IGNORE this question - It’s on the wormly dialog.
/var/log/mail.log
Oct 16 09:34:05 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.242]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:05 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.242]
Oct 16 09:34:05 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.242] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:10 server1 postfix/smtpd[19110]: warning: unknown[46.38.144.57]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19110]: too many errors after AUTH from unknown[46.38.144.57]
Oct 16 09:34:10 server1 postfix/smtpd[19110]: disconnect from unknown[46.38.144.57] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:10 server1 postfix/smtpd[19623]: warning: unknown[46.38.144.179]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19623]: too many errors after AUTH from unknown[46.38.144.179]
Oct 16 09:34:10 server1 postfix/smtpd[19623]: disconnect from unknown[46.38.144.179] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:15 server1 postfix/smtpd[22594]: connect from unknown[46.38.144.17]
Oct 16 09:34:16 server1 postfix/smtpd[22674]: warning: hostname s.lz6.zl.sampa.br does not resolve to address 185.36.81.245: Name or service not known
Oct 16 09:34:16 server1 postfix/smtpd[22674]: connect from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.245]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:20 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.245] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: hostname ip-38-37.ZervDNS does not resolve to address 92.118.38.37: Name or service not known
Oct 16 09:34:20 server1 postfix/smtpd[22674]: connect from unknown[92.118.38.37]
here it is… # See /usr/share/postfix/main.cf.dist for a commented, more complete version #Define the domain list as hash file or as list in the config file. #virtual_alias_domains = hash:/etc/postfix/virtual_domains
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 (Debian/GNU)
biff = no
appending .domain is the MUA’s job.
append_dot_mydomain = no
Uncomment the next line to generate “delayed mail” warnings