I have a server running Sendmail and is able to email to all domains except my company's email (company1.com). I have tested to sending to gmail and other email providers with no issues. Sendmail is configured to use a 3rd party SMTP relay service called MailJet.
When sending to company1.com the SMTP relay does not receive the emails and the error log for sendmail is as follows.
company1 sendmail[676194]: 396L7G6I676194: from= [email protected], size=90, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
company1 sendmail[676196]: 396L7GsW676196: <[email protected]>... User unknown
company1 sendmail[676194]: 396L7G6I676194: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30090, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
When sending an email to gmail this is the logs.
company1 sendmail[668643]: 396KrnqT668643: from= [email protected], size=95, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
company1 sendmail[668645]: 396KrnVI668645: from=<[email protected]>, size=337, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=company1.com [127.0.0.1]
company1 sendmail[668643]: 396KrnqT668643: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30095, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (396KrnVI668645 Message accepted for delivery)
company1 sendmail[668647]: STARTTLS=client, relay=[104.199.96.85]., version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256
company1 sendmail[668647]: 396KrnVI668645: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120337, relay=[104.199.96.85]. [104.199.96.85], dsn=2.0.0, stat=Sent (OK queued as 319dec48-ebc6-4f7d-a470-2c54a4091ac2)
My domain had the following records for DMARC. I have since removed it and it still does not work.
v=DMARC1; p=quarantine; fo=1; pct=100; [email protected]; [email protected]
I have followed steps where people mentioned to modify the /etc/mail/sendmail.mc and add these lines at the end:
define(`MAIL_HUB', `company1.com.')dnl
define(`LOCAL_RELAY', `company1.com.')dnl
This still does not fix it. As far as I can tell sendmail is trying to use itself as a relay when emailing company1.com instead of going through the 3rd party smtp relay server (Mailjet). How can I fix this and get it to work?
dsn=5.1.1, stat=User unknown
and you've not addressed this at all.