Hello guys, I have a doubt that I have a headache.
I have my droplet A and my droplet B in my droplet A I have a web server and in droplet B I want to put the mail server.
In my droplet B I will use postfix to handle the mails but I want them to leave with the next user edinson@viajando.com and do not leave edinson@mail.viajando.com I have read that you have to modify the mx and txt of droplet B but I still do not know how they 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!
*Droplet A host name should be: www
*Droplet B host name should be: mail
in your Registrar DNS under MX you need to add the hostname.domainname.tld of your webserver.
DNS should be corrected on the Mail host (Droplet Server itself) under /etc/resolv.conf
Here you need to add the DNS of your Provider… but also easy to use Public Name servers as google. It should look like this:
search domainname.tld nameserver 8.8.8.8 nameserver 8.8.4.4
*Also your Host name doesn’t need to be specific to what that host will provide as I have a droplet running both Mail and WWW services… But the Host names must be correct in the hosts file.
It looks like all is working…
Here is an example of some of my main.cf:
myhostname = mail.DOMAIN.TDL alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = DOMAIN.TDL <---------------------------------//// ?? I think this is problem ?? mydestination = mail.DOMAIN.TDL #relay_domains = relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = ipv4
You should comment out the first myorgin = /etc/mailname
I comment out my mailname because my #myorigin = /etc/mailname
My emails sent out as aliase@domain.tld
For the purpose of setting up a proper e-mail server, I would highly recommend using something that will auto-configure everything for you. It’ll be far less of a headache and easier to manage.
https://github.com/andryyy/mailcow#before-you-begin-prerequisites
This will simplify things quite a bit and it’s what I recommend to others looking to do the same.
As far as DNS records for the mail server, what you specifically need to be concerned with is SPF and DKIM, though DMARC may also be required in the not too distance future.
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.