How do I set up an MX record to route mail to my CentOS 7 Postfix server?
Did I set up the MX records properly?
As pointed out by @Jacob Evans in the comments, if your root domain name is the same for the MX records, it's not needed.
So to answer your question, yes, the MX record from your supplied information is correct.
If you're not getting email, time to check the logs from everything else that would send email to your server for bounce or reject reasons. As mentioned in my comments, try mxtoolbox.com
You also need to make sure all firewalls are configured to allow port 25 and/or 587 to your server. This means that if you're behind a NAT router, it will need port forwarding, and the local firewall on the CentOS box as well. Additionally, your ISP may actually block port 25 traffic, so keep that in mind.
As a side note, you may also be running into greylisting
Related videos on Youtube
Dave
Updated on September 18, 2022Comments
-
Dave over 1 year
I'm trying to set up mail forwarding from my CentOS Postfix mail server to my gmail account and I want to be sure I'm creating the MX records properly before troubleshooting my PostFix configuration. In the DNS settings section of my hosting company's control panel, I created this record
HostName: @ Record Type: MX Record Address: example.com. Priority: 10
I also have an A-name record with these properties
HostName: example.com Record Type: A (Address) Address: 162.155.38.22 Priority: n/a
However, despite the fact that I see postfix running on my CentOS 7 box
[root@server /]# ps aux | grep postfix root 17979 0.0 0.1 89488 1244 ? Ss Mar05 0:00 /usr/libexec/postfix/master -w postfix 17981 0.0 0.2 89768 2532 ? S Mar05 0:00 qmgr -l -t unix -u postfix 22093 0.0 0.3 89592 4020 ? S 09:40 0:00 pickup -l -t unix -u root 22167 0.0 0.0 9000 924 pts/0 S+ 09:52 0:00 grep --color=auto postfix
I didn't see anything in the logs about an email getting received after I sent one to [email protected]. Did I set up the MX records properly?
-
Admin about 6 yearsMake sure port/25 is open, you don't need an mx record of the destination is the same host as the domain
-
Admin about 6 yearsTry running your domain information through mxtoolbox.com, it might show that you have some other issue (like a blacklist for instance) that's causing it to fail.
-
Admin about 6 yearsthanks for the toolbox link. It came back with the error "No DMARC Record found". I'm not quite sure what that means, but i'll come back here if Google can't help me out on that one.
-