Avatar of gflmartins
gflmartins
 asked on

Sendmail mail loops back to me (MX problem?)

I am setting up Sendmail on a server that has never been used for mail before.  If I send a mail from the server, I get a message on another server's /var/adm/messages file with the following output:

Nov  7 11:09:30 pony sendmail[1831]: [ID 801593 mail.crit] mA7B9UrV001829: SYSERR(root): pony.gower-furniture.co.uk. config error: mail loops back to me (MX problem?)


pony being my new server and stallion being our production server that is being "looped back to".  Where can I find the config to ensure that this error does not occur on stallion.   Either:
1) Stop using stallion in this process
2) Have stallion process the mail properly

Thanks
Unix OSEmail Servers

Avatar of undefined
Last Comment
gflmartins

8/22/2022 - Mon
Brian Utterback

gflmartins

ASKER
blu - thanks for the link:

When relay.domain.net is a secondary (etc.) MX, and the MX mistakenly points to a CNAME or other "non-canonical" name [this gives "config error: mail loops back to me (MX problem?)"]. The proper fix is to point the MX at the actual name, a "work-around" to add the MX target to class w.

This is exactly the issue I have - how do I point MX to the correct place? Should I amend this on pony or satllion?

Thanks,

Terry
Brian Utterback

You fix this on the DNS server. The key  point here is that the MX record should point to something that is an A record and not a CNAME record.

You can use dig or nslookup to look up the kind of records used. First find the MX record and see where it points. Then look up that record. If it is CNAME record, follow that. Keep following until you get an A record. Then go back to the MX record and change it to point to the A record.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
gflmartins

ASKER
Hi blu,

Our MX records are hosted externally and there is no record for any of our unix servers within, having queried the site provided by BT.  I have gone to our internal DNS server and found that there are records for our unix servers under "Forward Lookup Zones".  The record is as follows Name: Pony, Type: Host (A), Data: 192.168.1.11

This is all correct and the same as our other servers which work fine.  I understand the reasoning behind following a CNAME record to an A record but finding it difficult to do so with the setup as it is.

Thanks so far...
Brian Utterback

Okay, looking again, it appears that the system pony is receiving email that it does not recognize as local, but the destination host is resolving to itself. My guess is that pony is not set up to recognize that "pony.gower-furniture.co.uk" is itself. This suggests that there is a problem with the "w" class set up on pony.
gflmartins

ASKER
Where can I amend the w class?

Thanks,

Terry
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Brian Utterback

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
gflmartins

ASKER
Hi,

I have amended the /etc/mail/local-host-names file to include "pony.gower-furniture.co.uk" and this has solved the issue of the "mail loops back to me (MX problem?)"

Thank you very much blu - I've certainly enjoyed learning a little more about mail and sendmail.

Cheers,

Terry