0

Hello I am trying to set up sendmail on a Centos 7 server to relay mails from a local program to our main mail server. I have configured sendmail.mc with the following, mail.[domain].com is our SMTP server:

define('SMART_HOST', 'mail.[domain].com')dnl

And

FEATURE(nullclient',mail.[domain].com') dnl

This is the sendmail log from trying to send this mail:

Aug 24 11:52:18 centos7 sendmail[21975]: w7O8qIUJ021975: Authentication-Warning: centos7.[domain]: openproject set sender to info@[domain].com using -f

Aug 24 11:52:18 centos7 sendmail[21975]: w7O8qIUJ021975: from=info@[domain].com, size=2587, class=-60, nrcpts=1, msgid=<5b7fc7423c037_218b2acdfb6fcf7c2088c@centos7.[domain].mail>, relay=openproject@localhost

Aug 24 11:52:18 centos7 sendmail[21976]: w7O8qIMw021976: from=<info@[domain].com>, size=2854, class=-60, nrcpts=1, msgid=<5b7fc7423c037_218b2acdfb6fcf7c2088c@centos7.[domain].mail>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]

Aug 24 11:52:18 centos7 sendmail[21975]: w7O8qIUJ021975: to=dennis@[domain].com, ctladdr=info@[domain].com (988/982), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=140587, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w7O8qIMw021976 Message accepted for delivery)

Aug 24 11:52:18 centos7 sendmail[21978]: STARTTLS=client, relay=mail.[domain].com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES256-SHA384, bits=256/256

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021976: to=<dennis@[domain].com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=230854, relay=mail.[domain].com. [192.168.111.10], dsn=5.1.1, stat=User unknown

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021976: w7O8qIMw021978: DSN: User unknown

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021978: to=<info@[domain].com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30000, relay=mail.[domain].com. [192.168.111.10], dsn=5.1.1, stat=User unknown

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021978: w7O8qIMx021978: return to sender: User unknown

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMx021978: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30000, relay=mail.[domain].com. [192.168.111.10], dsn=5.1.1, stat=User unknown

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021978: Losing ./qfw7O8qIMw021978: savemail panic

Aug 24 11:52:18 centos7 sendmail[21978]: w7O8qIMw021978: SYSERR(root): savemail: cannot save rejected email anywhere

Now based on what the sendmail log says it seems as if my email dennis@[domain].com does not exist which is strange because it does. But if I look at the log in the mail server it says a slightly different thing:

Fri 2018-08-24 11:52:18.667: Session 471387; child 0001
Fri 2018-08-24 11:52:18.667: Accepting SMTP connection from 192.168.111.15:42300 to 192.168.111.10:25
Fri 2018-08-24 11:52:18.670: --> 220 xxxx ESMTP MDaemon 18.0.2; Fri, 24 Aug 2018 11:52:18 +0300
Fri 2018-08-24 11:52:18.672: <-- EHLO centos7.[domain]
Fri 2018-08-24 11:52:18.673: --> 250-xxxxx Hello centos7.[domain] [192.168.111.15], pleased to meet you
Fri 2018-08-24 11:52:18.673: --> 250-ETRN
Fri 2018-08-24 11:52:18.673: --> 250-AUTH LOGIN CRAM-MD5 PLAIN
Fri 2018-08-24 11:52:18.673: --> 250-8BITMIME
Fri 2018-08-24 11:52:18.674: --> 250-ENHANCEDSTATUSCODES
Fri 2018-08-24 11:52:18.674: --> 250-STARTTLS
Fri 2018-08-24 11:52:18.674: --> 250 SIZE
Fri 2018-08-24 11:52:18.683: <-- STARTTLS
Fri 2018-08-24 11:52:18.683: --> 220 2.7.0 Ready to start TLS
Fri 2018-08-24 11:52:18.705: SSL negotiation successful (TLS 1.2, 256 bit key exchange, 256 bit AES encryption)
Fri 2018-08-24 11:52:18.716: <-- EHLO centos7.[domain]
Fri 2018-08-24 11:52:18.716: --> 250-xxxxx Hello centos7.[domain] [192.168.111.15], pleased to meet you
Fri 2018-08-24 11:52:18.716: --> 250-ETRN
Fri 2018-08-24 11:52:18.716: --> 250-AUTH LOGIN CRAM-MD5 PLAIN
Fri 2018-08-24 11:52:18.716: --> 250-8BITMIME
Fri 2018-08-24 11:52:18.716: --> 250-ENHANCEDSTATUSCODES
Fri 2018-08-24 11:52:18.716: --> 250 SIZE
Fri 2018-08-24 11:52:18.724: <-- MAIL From:<info@mail.[domain].com> SIZE=3046
Fri 2018-08-24 11:52:18.726: --> 250 2.1.0 Sender OK
Fri 2018-08-24 11:52:18.754: <-- RCPT To:<dennis@mail.[domain].com>
Fri 2018-08-24 11:52:18.755: Sender attempted to deliver message to unknown address

So for some reason the domain part in the from and to email addressed have been corrupted. The mail server thinks someone is trying to send to dennis@mail.[domain].com when in reality I want to send to dennis@[domain].com.

I have no idea why it does this.

0

Hmm, almost embarrasing, but I kept going through the sendmail.mc file and found the following bit that I had activated earlier, I recommented the LOCAL_DOMAIN line and things started working.

dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`[domain].com')dnl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.