LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Local Sendmail Changes Domain Name for Local Submission (https://www.linuxquestions.org/questions/linux-server-73/local-sendmail-changes-domain-name-for-local-submission-4175662078/)

rsvp 10-05-2019 03:26 PM

Local Sendmail Changes Domain Name for Local Submission
 
I have sendmail Version 8.14.7 installed on Red Hat Enterprise Linux 7. I have two different domain names associated with my single IP adddress. They are listed in the /etc/hosts file and in the /etc/mail/local-host-names file. Incoming mail from the Internet to different @domain.com names gets delivered properly through the use of the /etc/virtusertable however, mail submitted locally on the server via command line or via PHP scripts is having a problem. Mail submitted this way to domain2.com is always being changed to domain1.com and not getting delivered. I've read that this is controlled by submit.mc, but I just can't seem to configure to accept mail for either domain, just domain1.com. Here's an example from the mail log:

Code:

Oct  3 14:13:28 HOSTNAME sendmail[32212]: x93LDRK0032212: to=user12@domain2.org, ctladdr=rsvp (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30225, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x93LDRlc032213 Message accepted for delivery)
Oct  3 14:13:28 HOSTNAME sendmail[32214]: x93LDRlc032213: to=<user12@domain1.com>, ctladdr=<user@domain1.com> (1003/1003), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30667, dsn=2.0.0, stat=Sent

Below is my submit.mc file (which, I understand, is used for local submission?):

Code:

divert(-1)
#
# Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
#      All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

#
#  This is the prototype file for a set-group-ID sm-msp sendmail that
#  acts as a initial mail submission program.
#

divert(0)dnl
sinclude(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl # If you're operating in a DSCP/RFC-4594 environment with QoS
dnl define(`confINET_QOS', `AF11')dnl
define(`confPID_FILE', `/run/sm-client.pid')dnl
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl
FEATURE(`use_ct_file')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl

I notice my submit.mc says 2001-2003. Did I somehow manage to replace my submit.mc file with an incorrect version? Does anyone have an example of a working submit.mc file?

Would appreciate any help anyone can provide.

Thanks,

-Scott

RandomTroll 10-07-2019 09:22 AM

I'm on 8.15.2. I don't know that an upper version will make a difference. The source includes a default submit.mc, which is what I use. You understand that submit.mc is source for submit.cf, the file that sendmail consults? If you've changed submit.mc but haven't built and installed a new submit.cf with it you haven't done anything.

The source has extensive documentation in cf/README. Probably all answers are there, if not always easy to understand.

sendmail has a forum. I've never gotten a useful answer there but it appears that others have. https://groups.google.com/forum/?fro....mail.sendmail


All times are GMT -5. The time now is 01:29 PM.