[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How-To: Masquerade the Envelope with Sendmail



On Sat, 31 Jul 1999, Wellington Terumi Uemura spewed into the bitstream:
> # /usr/lib/sendmail-cf/cf/redhat.mc plus the masquerade options
> divert(-1)dnl
> include(`../m4/cf.m4')dnl
> define(`confDEF_USER_ID',``8:12'')dnl
> define(`SMART_HOST', `your.isps.mta')dnl #added
> OSTYPE(`linux')dnl
> undefine(`UUCP_RELAY')dnl
> undefine(`BITNET_RELAY')dnl
> FEATURE(redirect)dnl
> FEATURE(always_add_domain)dnl
> FEATURE(use_cw_file)dnl
> FEATURE(local_procmail)dnl
> FEATURE(nouucp)dnl
> MAILER(procmail)dnl
> MAILER(smtp)dnl
> MASQUERADE_AS(yourdomain.dom)dnl #added - use your domain name here!
> FEATURE(allmasquerade)dnl  #added
> FEATURE(masquerade_envelope)dnl #added
> HACK(check_mail3,`hash -a JUNK /etc/mail/deny')dnl
> HACK(use_ip,`/etc/mail/ip_allow')dnl
> HACK(use_names,`/etc/mail/name_allow')dnl
> HACK(use_relayto,`/etc/mail/relay_allow')dnl
> HACK(check_rcpt4)dnl
> HACK(check_relay3)dnl
> 
> If you're using Red Hat all of this is in the original redhat.mc with a 
> couple

It depends on the version of Red Hat whether this is accurate!

> I just having problem with HACK section,the error is :
> ../HACK/check_relay3.m4:No such file or diretory
> ../HACK/check_rcpt4.m4:No such file or diretory
> ../HACK/etc/mail/rellay_allow.m4:No such file or diretory
> And others in Hack section!
> Using RedHat6.0,sendmail 8.9.3 thanks~!

This is under review right now because redhat has changed some of their hacks...
it'll all coming together... you might just want to remove those anyway because
check_rcpt is built into 8.9.3 and you don't have to use these hacks anymore...

........workin'!

Try this one and see if it doesn't work better... it's in the new rpm I'm doing 
right now:

dnl filename: dialup.mc
divert(-1)dnl
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file for dial-up users. If you modify this file you will have to regenerate
dnl the /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl        m4 ../m4/cf.m4 dialup.mc > nuconfig.cf 
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work. See http://www.moongroup.com/how-to.phtml#envelope and 
dnl http://www.moongroup.com/sendmail-offline.html for further details.
dnl
include(`../m4/cf.m4')dnl
define(`confDEF_USER_ID',``8:12'')dnl
OSTYPE(`linux')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
dnl
dnl instruct sendmail to disable warnings emitted when it cannot flush the local
dnl mail queue (next two lines)
dnl
undefine(`confTO_QUEUERETURN')dnl
undefine(`confTO_QUEUEWARN')dnl
dnl
dnl IMPORTANT: change `your.isps.mta' in the following line to the
dnl canonical name (FQDN) of your ISP's SMTP server or MTA.
dnl
define(`SMART_HOST', `your.isps.mta')dnl
define(`confCW_FILE', ` /etc/mail/sendmail.cw')dnl
define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
dnl
dnl IMPORTANT: change yourdomain.dom in the following line to your domain name
dnl things will not work correctly if you don't!
dnl
MASQUERADE_AS(yourdomain.dom)dnl
dnl
dnl The generics table, usually /etc/mail/genericstable, tells sendmail how to
dnl translate local usernames to valid global e-mail addresses. Every row of
dnl this file is composed by two items: the local username and the global e-mail
dnl address which should be used for messages sent outside.
dnl Example: ralph   chuck moongroup com
dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl
dnl
dnl The rules defined in genericstable must be applied only to local e-mail 
dnl addresses. An e-mail address is considered local if it "belongs" to the
dnl local host. The fully qualified host name of the latter can be displayed 
dnl by typing "hostname -f" at the shell prompt. By putting the output of
dnl hostname -f in the /etc/mail/genericsdomain file, we give sendmail enough
dnl information to identify local addresses. The next line tells sendmail where
dnl the genericsdomain file is located.
dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')dnl
dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(local_procmail)dnl
MAILER(procmail)dnl
MAILER(smtp)dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
dnl end dialup.mc

Have fun!

-- 
Chuck Mead, CTO, MoonGroup Consulting, Inc. <http://moongroup.com> 
Mail problems? Send "s-u-b-s-c-r-i-b-e mailhelp" (no quotes and no
hyphens) in the body of a message to mailhelp-request moongroup com 
                              



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]