By Clément B
Hello,
I set-up my VPS with exim4 to send emails from my server. I also tried with Postfix, and the result is the same.
I use Google Apps for addresses email on my domain. My MX DNS are correctly set-up. I can send and receive emails on my Google Apps Webmail.
With my VPS, i can send emails, there is no problem here, but when I send emails on adresses on my domain (for example, a contact form), I receive the emails on my VPS, and not on the webmail of Google Apps.
For example, if I send an email at contact@mydomain.com with a contact form in PHP, it will be send, but I will find it in a folder of my VPS (mbox or /var/mail/root for example), but i won’t find it on the Google App webmail of contact@mydomain.com.
In fact, I want to know how to redirect emails sent on my domain to the Google App webmail and not in a local folder/file on my VPS.
Someone knows how to do that and can help me ?
Thank you for your help !
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!
I found myself the solution.
Here it is :
I used this tutorial to configure emails on my VPS with Postfix.
If you don’t want to “catch” the adresses email of your domain, you just have to configure Postfix without your domain.
For example, in your Postfix configuration file (sudo nano /etc/postfix/main.cf), don’t add your domain name.
Use
myhostname = example mydestination = example, localhost.localdomain, localhost
Instead
myhostname = example.com mydestination = example.com, example, localhost.localdomain, localhost
I hope it can help someone.
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.