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
gflmartinsAsked:
Who is Participating?
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
Well, it sort of depends on what version of sendmail and Solaris you are using.

If you are using a later version of sendmail, you can make a list of local hostnames in the file /etc/mail/local-host-names

You can check the file /etc/mail/sendmail.cf for a line that begins "Cw". That is the line that defines the class. It might have only local host, in which case the next line probably begins with Fw which defines the file to read the list from.

In general, you are not supposed to edit the sendmail.cf file directly. You are supposed to edit the *.mc files in the directory and then use the Makefile to generate the proper cf files.
0
 
Brian UtterbackPrinciple Software EngineerCommented:
0
 
gflmartinsAuthor Commented:
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
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
Brian UtterbackPrinciple Software EngineerCommented:
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.
0
 
gflmartinsAuthor Commented:
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...
0
 
Brian UtterbackPrinciple Software EngineerCommented:
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.
0
 
gflmartinsAuthor Commented:
Where can I amend the w class?

Thanks,

Terry
0
 
gflmartinsAuthor Commented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.