sendmail delivers to local host instead of target host
by mfoley from LinuxQuestions.org on (#52BPS)
What I thought was a simple description of the problem (below) turned out to be more lengthy that I realized. Here's the very simple version: I have 4 hosts, A,B,C,D. there is a local user u on each host.
sending mail from u@A -> u@B works.
sending mail from u@A -> u@C works.
sending mail from u@A -> u@D does not deliver to u@D. It delivers locally to u@A. No idea why.
Read on for more info ...
--------------------------
I've posted this before, but I've eliminated enough variables that this is a more distinct question. I'll be explicit with most names here.
I have 4 hosts: novatec-inc.com, horeb-wright3.org (real names), webserver.mydom.com and mail.thatdom.com. I have configured horeb-wright3.org as a mail server using sendmail. config is below.
All 4 hosts have a local user: mfoley.
If I send to mfoley@novatec-inc.com from horeb-wright3.org it does not get delivered to novatec-inc.com. It get delivered to local user mfoley.
If I send to mfoley@webserver.mydom.com from horeb-wright3.org it gets delivered to mfoley@webserver.mydom.com.
If I send to mfoley@novatec-inc.com from webserver.mydom.com it gets delivered to mfoley@novatec-inc.com.
If I send to mfoley@novatec-inc.com from mail.thatdom.com it gets delivered to mfoley@novatec-inc.com.
In short, I can send to mfoley@novatec-inc.com from several other hosts with an mfoley local account, but I cannot send to mfoley@novatec-inc.com from horeb-wright3.org. On that host, it always delivers locally. I'm tearing my hair out trying to figure out why. I've searched the entire horeb-wright3.org root drive for any mention of novatec-inc.com and cannot find anything.
Why is horeb-wright3.org delivering mail for mfoley@novatec-inc.com only locally, but will deliver messages to mfoley@webserver.mydom.com and mfoley@mail.thatdom.com to the correct user on the designated host?
horeb-wright3.org sendmail.mc:
Code:include(`../m4/cf.m4')
VERSIONID(`$Id: hiram.mc,v 1.0 2019/03/01 01:52:00 root Exp root $')dnl
OSTYPE(`linux')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confTO_IDENT', `0')dnl
define(`confDOMAIN_NAME', `hiram.horeb-wright3.org')dnl
define(`confBAD_RCPT_THROTTLE',`1')dnl
define(`confCONNECTION_RATE_THROTTLE',`3')dnl
define(`confDEAD_LETTER_DROP',`/dev/null')dnl
define(`confDOUBLE_BOUNCE_ADDRESS',`nobody')dnl
define(`confDF_BUFFER_SIZE',`16384')dnl
define(`confXF_BUFFER_SIZE',`16384')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`lookupdotdomain')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`dnsbl', `dul.dnsbl.sorbs.net')dnl
FEATURE(`delay_checks',`friend',`n')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
FEATURE(`relay_entire_domain')dnl
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnlI've compared the horeb-wright3.org sendmail.mc and the thatdom.com sendmail.mc and there are not differences except for confDOMAIN_NAME.


sending mail from u@A -> u@B works.
sending mail from u@A -> u@C works.
sending mail from u@A -> u@D does not deliver to u@D. It delivers locally to u@A. No idea why.
Read on for more info ...
--------------------------
I've posted this before, but I've eliminated enough variables that this is a more distinct question. I'll be explicit with most names here.
I have 4 hosts: novatec-inc.com, horeb-wright3.org (real names), webserver.mydom.com and mail.thatdom.com. I have configured horeb-wright3.org as a mail server using sendmail. config is below.
All 4 hosts have a local user: mfoley.
If I send to mfoley@novatec-inc.com from horeb-wright3.org it does not get delivered to novatec-inc.com. It get delivered to local user mfoley.
If I send to mfoley@webserver.mydom.com from horeb-wright3.org it gets delivered to mfoley@webserver.mydom.com.
If I send to mfoley@novatec-inc.com from webserver.mydom.com it gets delivered to mfoley@novatec-inc.com.
If I send to mfoley@novatec-inc.com from mail.thatdom.com it gets delivered to mfoley@novatec-inc.com.
In short, I can send to mfoley@novatec-inc.com from several other hosts with an mfoley local account, but I cannot send to mfoley@novatec-inc.com from horeb-wright3.org. On that host, it always delivers locally. I'm tearing my hair out trying to figure out why. I've searched the entire horeb-wright3.org root drive for any mention of novatec-inc.com and cannot find anything.
Why is horeb-wright3.org delivering mail for mfoley@novatec-inc.com only locally, but will deliver messages to mfoley@webserver.mydom.com and mfoley@mail.thatdom.com to the correct user on the designated host?
horeb-wright3.org sendmail.mc:
Code:include(`../m4/cf.m4')
VERSIONID(`$Id: hiram.mc,v 1.0 2019/03/01 01:52:00 root Exp root $')dnl
OSTYPE(`linux')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confTO_IDENT', `0')dnl
define(`confDOMAIN_NAME', `hiram.horeb-wright3.org')dnl
define(`confBAD_RCPT_THROTTLE',`1')dnl
define(`confCONNECTION_RATE_THROTTLE',`3')dnl
define(`confDEAD_LETTER_DROP',`/dev/null')dnl
define(`confDOUBLE_BOUNCE_ADDRESS',`nobody')dnl
define(`confDF_BUFFER_SIZE',`16384')dnl
define(`confXF_BUFFER_SIZE',`16384')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`lookupdotdomain')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`dnsbl', `dul.dnsbl.sorbs.net')dnl
FEATURE(`delay_checks',`friend',`n')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
FEATURE(`relay_entire_domain')dnl
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnlI've compared the horeb-wright3.org sendmail.mc and the thatdom.com sendmail.mc and there are not differences except for confDOMAIN_NAME.