I am having a few problems setting up email in virtualmin and would greatly appreciate the help of those more experienced. I don't know if I am missing something obvious (likely) or if I am working off something outdated but I keep seeing the following mentioned:
Edit Virtual Server -> Enabled Features - select "SSL Website Enabled"
Server Configuration -> Manage SSL Certificates - click "Copy to Postfix"
I don't know if these have been moved, I am looking in the wrong place, or if my setup has a problem but I can find neither of the above. What I have done instead is:
uncomment the following in the postfix/main.cf
submission inet n - n - - smtpd
-o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
added a self signed SSL in the files below
/etc/postfix/ssl/server.pem
/etc/postfix/ssl/server_pvt.pem
and pointed postfix to the files via webmin -> postfix mail server -> smtp authentication and encryption with /etc/postfix/ssl/server.pem as TLS certificate file and /etc/postfix/ssl/server_pvt.pem as TLS private key file. (I did confirm it was added to postfix/main.cf)
I restarted postfix.
The problem:
When I try to send emails this error shows up in the maillog:
relay=none, delay=1181, delays=1181/0.02/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
When I try to send emails from an outside account to my new one I get this error in the log:
NOQUEUE: reject: RCPT from unknown[209.85.214.50]: 554 5.7.1 <unknown[209.85.214.50]>: Client host rejected: Access denied; from=<me@gmail.com> to=<me@mydomain.com> proto=ESMTP helo=<mail-bk0-f50.google.com>
and this in the failed delivery email from gmail:
554 5.7.1 <unknown[209.85.160.53]>: Client host rejected: Access denied
and the logins in the log have method = PLAIN
So I think I have a tls issue of some sort and likely other problems. I have spent two days running through tutorials and troubleshooting stuff to no avail but I am
painfully new at this and have no doubt it is something simple (or at least simple for those who have done it before). I am most appreciative of any help that anyone can offer.
So i got the DNS stuff squared away so I can send mail but my setup was still refusing to recieve mail.
The error in both the maillog and the delivery status email from gmail became
Client host rejected: Access denied
Which was fixed by commenting out the two instances of (back to default):
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
Which I had uncommented based on a tutorial I read when I was trying to fix different issues (didn't fix them, created new ones)
So I think I've got it figured out.
At this rate I will break and fix everything half a dozen times. Need to come up with a better learning method... Thanks for your patience.