I know there is plenty of questions similar to do this none of them helped me out at all.
I'd like to add that I have another domain name running on the same server called camspark.com which if I send mails to like webmaster@camspark.com I get them on my gmail account no problem, even though it's using the same sendmail, the problem is I think my box's hostname is set to highgamer.com, if I set it to anything else then sendmail doesn't work at all just freezes up.
I could send emails to any outside domain like test@gmail.com
and they come no problem. But when I try to send email to test@mydomain.com
the same domain where the sendmail server is setup it doesn't get sent, it comes in locally with console mail
command, but I recently disabled that with a few questions here.
to clear some inconsistencies.
My /etc/mail/local-host-names
doesn't contain my domain address.
My sendmail.mc
which I compile using m4
to sendmail.cf
after the changes.
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Then reboot my sendmail service by running
service sendmail restart
To prevent emails coming in locally to my mail
command in ssh
. I added these 3 lines to my sendmail.mc
define(`MAIL_HUB', `highgamer.com.')dnl
define(`LOCAL_RELAY', `highgamer.com.')dnl
define(`confDOMAIN_NAME', `highgamer.com')dnl
just above the MAILER(smtp)dnl
Here is a full sendmail analysis and problem debugging log
As you can see it connects to localhost 127.0.0.1
instead of my MX records for that domain.
EDIT THE TOP PHOTO PROVES NOTHING, HERE IS CAMSPARK.COM PHOTO
Here is my MX settings for the same domain name.
Best Answer
The
sendmail
submission agent uses 127.0.0.1 by default. Do you even need to be running a mail server? If not, configuresendmail
to send the command line mail elsewhere by editing upsubmit.mc
to point to the desired domain:Then rebuild
submit.cf
. (Without a mail server running you may need a cron job or something to clear out temporarily delivery failures to your MX, or a submission agent queue runner, depending on how you want to handle that.)