Date: Wed, 6 Jul 2005 04:55:56 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Julian Elischer <julian@vicor.com> Cc: gshapiro@freebsd.org, freebsd-questions@freebsd.org Subject: Re: aaaargghh.. sendmail again Message-ID: <20050706015555.GA3301@gothmog.gr> In-Reply-To: <42CB29E4.8090203@vicor.com> References: <42CB29E4.8090203@vicor.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-07-05 17:46, Julian Elischer <julian@vicor.com> wrote: > > N machines on a "ficticious net "fred.com" (not the real name). > > neet to get email out to the real world. via connected server > mailgate.real.domain. (ficticious name) > > They pass it forward to a server on their net "server.ficticious.net" > which uses the "Smarthost" option in Sendmail to > forward them on to mailgate.real.domain, > however mailgaet will not accept the mail unless the "sender" > resolves to something real. I have no control over that machine. > > I am trying to alter the sendmail config on server.ficticious.net > so that it rewrites the sender (both envelope and header) > to be from mumble@registered.domain. > > the sendmail m4 config file now has: > divert(0) > VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.17 2002/11/14 03:21:18 keramida Exp $') > OSTYPE(freebsd4) > DOMAIN(generic) > > FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access') > FEATURE(blacklist_recipients) > FEATURE(local_lmtp) > FEATURE(mailertable, `hash -o /etc/mail/mailertable') > FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') > FEATURE(genericstable, `hash -o /etc/mail/senders.db') > > FEATURE(masquerade_entire_domain) > FEATURE(local_no_masquerade) > FEATURE(masquerade_envelope) > > define(`SMART_HOST', `mailgate.vicor-nb.com') > > MASQUERADE_AS(`registered.domain') > MASQUERADE_DOMAIN(`ficticious.net') > MASQUERADE_DOMAIN(`server.ficticious.net') > where /etc/mail/senders.db > contains: the 'has' version of: > > root jre@registered.domain > root@server.ficticious.net jre2@registered.domain > So, by 2 different methods I'm trying to get the mail to say its > coming from registered.domain but it isn't doing it, leaving it as > comig from server.ficticious.net Hi Julian, Have you also tried sending email from a non-root account? The root user is "exposed" by default in Sendmail. This means that the root user will *NOT* be masqueraded or remapped through genericstable. You can see that the root user is exposed by looking at the {E} class: gothmog:/etc/mail# grep '{E}' sendmail.cf C{E}root Try sending email from a different local user or remove the root user from the {E} class (by manually editing sendmail.cf and restarting Sendmail).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050706015555.GA3301>