Hello everybody,
I have a domain where I set the DNS to point to the A record for the IP of my VPS and the record MX point to another server. What happens is that I installed postfix to send mail through PHP, but when I send a message to an email from this domain it will not for the server that is configured in the DNS MX record. If I place the domain in the settings of mydestination in the postfix config file, email is going to /var/mail, if I take away the domain of settings file it just does not do anything.
Someone can help me?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Try to use “relayhost” directive in main.cf. If the IP of the mail server configured in MX is 1.2.3.4, then then it should look like this
relayhost = 1.2.3.4
On the mail server you have to allow relay from the source server, this is done through “mynetworks” directive Just find the configuration directive and add your source IP, so if the source IP is 5.6.7.8, then
mynetworks = 127.0.0.0/8
change to
mynetworks = 127.0.0.0/8 5.6.7.8
There might be more entries on that line already, so just add it at the end of line Restart postfix on both servers and it should work
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.