I have
sendmail.mc set to masquerade
newsguy.com. So my mail goes out
with envelope from set to
ha...@newsguy.com (harry being my uid on
host).
However I want to make that outgoing mail have
rea...@newsguy.com in
both the regular From: line, and envelope from.
It appear that `genericstable' and `genericsdomain' can do that as
presented in
http://www.tldp.org/HOWTO/Sendmail-Address-Rewrite-3.html
Documentation.
I've created genericstable and makemap hash'ed it
created genericdomain as directed by above cited url.
(hostname -f d0.local.lan)
hostname -f > genericsdomain
But then seeing as how the problem is my mail From: and envelope from
are appearing as `ha...@newsguy.com... I also put:
newsguy.com into
genericsdomain.
However the mail still leaves my host with
ha...@newsguy.com in both
`From:' and envelope from.
It seems the generics files are being ignored.
Pertinent file contens below (genericstable, genericsdomain,
sendmail.mc)
cat genericsdomain:
d0.local.lan
newsguy.com
cat gemericstable:
harry
rea...@newsguy.com
root
rea...@newsguy.com
ha...@newsguy.com rea...@newsguy.com
(makemap -r hash genericstable.db <genericstable)
/etc/init.d/sendmail reload
created
sendmail.cf with
cd sendmail-8.16.0.19/cf/cf
make install-cf
using the
sendmail.mc below (stripped for mail)
------- ------- ---=--- ------- -------
root # grep -v '^\(dnl\|#\)'
sendmail.mc
------- ------- ---=--- ------- -------
divert(-1)dnl
divert(0)dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id:
sendmail.mc, v 8.14.4-8+deb8u1 2016-06-30 18:08:19 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
undefine(`confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`access_db', , `skip')dnl
FEATURE(`greet_pause', `1000')dnl 1 seconds
FEATURE(`delay_checks', `friend', `n')dnl
define(`confBAD_RCPT_THROTTLE',`3')dnl
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`
newsguy.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable') dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')dnl
MAILER_DEFINITIONS
define(`SMART_HOST',`[
smtp.newsguy.com]')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
MAILER(`local')dnl
MAILER(procmail)
MAILER(`smtp')dnl