I have managed to set up my web server on debian with various virtual servers in virtualmin, but I cannot get my mailserver to work. I am sending mail using mailgun and followed the tutorial at https://www.digitalocean.com/community/tutorials/how-to-set-up-a-mail-relay-with-postfix-and-mailgun-on-ubuntu-16-04 as well as the Mailgun-documentation at https://documentation.mailgun.com/user_manual.html#smtp-relay. I am using Lets Encrypt Certificates and want to setup the mailserver for various domains/virtual servers. Two domains (domain1.com, domain2.com) have already been transferred to the server, my main domain (domain3.com) that I use for all my email is already set up in Virtualmin but the DNS records currently still point to my old shared webhosting provider.
I have the following issues:
- I cannot receive any mails sent from outside the server (e.g. gmail), they do not even appear in the mail.log
- I can receive internal mails in ReadUserMail, but they do not appear in my Thunderbird Inbox or Roundcube Inbox
- I can send mails from Roundcube and ReadUserMail, but I cannot connect Thunderbird to the SMTP-Server. Telnet-Result on all SMTP-Ports (25, 465, 587) is "telnet: Unable to connect to remote host: Connection refused", ufw status is currently set to disabled.
- The emails sent from roundcube/ReadUserMail are always signed by domain1.com (the one I used as Lets encrypt certificate for Dovecot+Postfix), even if they are sent from email@example.com
- From my normal email-adress (on my old webhosting @domain3.com) in Thunderbird I can send mails to firstname.lastname@example.org (no bounce, but they never arrive on my mail server), but when trying to send mails to domain2.com, I get the error "User unknown in virtual alias table". Domain 2 contains special characters.