How to setup multiple domains to send certified mail ?

4 posts / 0 new
Last post
#1 Sat, 07/27/2019 - 17:49
NadimD
NadimD's picture

How to setup multiple domains to send certified mail ?

Greetings,

I have a one-ip server with multiple virtual servers running. I added a MX record to each domain so I can receive mails on the server and I receive them in Webmin (mail UI).

Now I need to send emails through each website with PHP, without using an external SMTP.

I copied the postfix configuration on domain1.com, then domain2.com and the button disappeared from domain1.com.

I receive the email as spam when sent from a domain that had postfix deactivated like I said above. How can I setup emails to be sent by the server and not worry about clients receiving SPAM ?

I thought about using Mailgun, which I tried with a postfix-relayhost but this will work for one domain only, since Mailgun works per domain.

Edit : I have to add that I don't use BIND, it's disabled. I use my hoster's DNS, which makes simplier to manage each domain on it and less routing/config ! I might have a solution but I need someone to confirm. By adding each domain to the DKIM page into the 'additional domains', I receive emails signed and sent from said domain and then adding the key as a TXT record. But I can't know if this is considered SPAM or not to many email receivers. How can I learn about securing emails ?

Thank you !

Sun, 07/28/2019 - 03:48
calport

When installed with broadly default options, Virtualmin can be used to send 'certified mail' out of the box: no special configuration is required. After installing Webmin + Virtualmin with default options, you need to just enable and configure DKIM (via Virtualmin | Email Settings | DomainKeys Identified Mail) and then create virtual servers, then add users under their respective virtual servers that you have just created.

If Virtualmin is installed correctly, when a user that you have added sends email it is sent out via Postfix with complete DKIM signature. You can use a free service like https://www.mail-tester.com/ to verify that outgoing email are kosher, including a check to see if DKIM is working.

I can confirm that a Virtualmin powered server with single IP address hosting multiple domains can send out email without it being flagged as spam. In order to properly configure the server, you need to manually set up DKIM; SPF is configured by default in Virtualmin. I will assume that you have correctly configured reverse DNS - this is essential for email to reach the inbox but RDNS falls outside the scope of configuring Virtualmin.

When you say 'I copied the postfix configuration on domain1.com, then domain2.com and the button disappeared from domain1.com' I have to hazard a guess that this is in context of SSL certificates. If so, this has nothing to do with sending out email, so we should ignore this for now.

Note that if you choose not to use BIND, even though it is enabled by default in a Virtualmin install, then you might not be able to configure DKIM via the Virtualmin control panel. It is perfectly fine to use your hoster's DNS servers provided you keep an (albeit redundant) install of BIND running on your virtualmin server... yeah, I know, it eats up precious RAM but it is necessary to enable it for Virtualmin to function with all the features that it offers, particularly DKIM.

Finally you do not need to specifically "add each domain to the DKIM page into the 'additional domains'" if you have installed Virtualmin with broadly default options, for those domains which are linked to virtual servers which you have created.

If you want to have a quick peek at my one IP multi domain Virtualmin install, contact me for a screen sharing session via AnyDesk or Chrome Remote Desktop.

Mon, 12/09/2019 - 12:28
ramimohep

@calport give me your email to contact, please. I have the same issue in my server.

Mon, 12/09/2019 - 22:37 (Reply to #3)
calport

Hi - it is niel@calport.com or visit www.calport.com.

Topic locked