I have a new VPS with 1 site. Very soon there will be a lot of sites here.
First problem from today:
I noticed that emails that database backups that are being sent to my email are marked as spam. The reason is that they are being send by a fake email @localhost.localdomain
.
I think and I am almost sure that the problem is the following:
root@me:/etc$ hostname --fqdn
localhost.localdomain
I understand I have to put a good domain here domain here.
Example: Let's say that next week in the VPS there will be 4 sites with 4 different domains:
aaa.com on public_html/aaa/
bbb.com on public_html/bbb/
ccc.com on public_html/ccc/
ddd.com on public_html/ddd/
In my opinion I can choose aaa.com as a FQDN. Please correct if I am wrong. But the problem of this choice would be that if ccc.com will send an email, than the receiver will see that this email came from aaa.com.
I want to avoid that. I will have several sites and I want the emails sent by a blog residing in /ccc/ to have ccc.com as the email sender. The scrips that is part of the domain ddd should send emails as ddd.com.
I know that it is possible to create PHP scripts that will allow to customize the mail "from", and it is possible to send emails via SMTP. However I need (must) rely on 3rd party Wordpress plugins and some of them cannot be customized. They just send PHP emails using the FQDN configured in the machine.
How can I configure the VPS in order to allow each site to send emails using their own domain and avoiding for all the sites to have the same domain 'from email'?