1

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. pic 1

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 picture pic 2

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.

pic 3

EDIT THE TOP PHOTO PROVES NOTHING, HERE IS CAMSPARK.COM PHOTO
pic 4
pic 5 email pic 6 email packets Here is my MX settings for the same domain name. pic 7

SSpoke
  • 161
  • 2
  • 10

2 Answers2

2

The sendmail submission agent uses 127.0.0.1 by default. Do you even need to be running a mail server? If not, configure sendmail to send the command line mail elsewhere by editing up submit.mc to point to the desired domain:

dnl FEATURE(`msp', `[127.0.0.1]')dnl
FEATURE(`msp', `highgamer.com')dnl

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.)

thrig
  • 1,676
  • 11
  • 9
  • I found out the `127.0.0.1` has no problem for camspark.com domain running the same sendmail, it probably has nothing to do with that anyways. It just has a problem sending to it's own domain that the box uses. – SSpoke Jan 24 '17 at 22:32
  • 1
    @SSpoke and the standard advice there is never to name a system after the domain, instead call it `foo.example.com` so it is not `example.com`. – thrig Jan 24 '17 at 22:35
  • my system is just named highgamer, it's `root@highgamer`, it's the hostname i set to `highgamer.com` if I set it to anything else it just hangs up the sendmail and never sends anything, I just tried setting it to `test.highgamer.com` it still works properly but no emails come in. – SSpoke Jan 24 '17 at 22:37
0

Solved! by removing

define(`confDOMAIN_NAME', `highgamer.com')dnl

you may get User unknown root errors from postmaster delivery after this, but there is a way to fix that quickfix it I mean by adding root@domain.com to get forwarded to your main email in your domain register settings.

SSpoke
  • 161
  • 2
  • 10