[336] in RedHat Linux List
Re: applix mail
daemon@ATHENA.MIT.EDU (Peter Antman)
Tue Oct 22 03:56:18 1996
To: redhat-list@redhat.com
In-reply-to: Your message of "Tue, 22 Oct 1996 00:12:35 EDT."
<199610220412.AAA01387@altair.ioa.com>
Date: Tue, 22 Oct 1996 09:59:14 +0200
From: Peter Antman <peter.antman@abc.se>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
> >Reply-To, is probably not the best solution. Some mailers outright
> >ignore the Reply-To field.. and unfortunately, some is enough to
> >destroy a useful feature. :-/
> >
> >And what hack is there with sendmail.cf? All I had to do is change
> >the 'DM' line to read:
> >
> ># who I masquerade as (null for no masquerading) (see also $=M)
> >DM cu-online.com
> >
> >and all 'From' adresses get translated from
> >ohammers@ts1-123.cu-online.com to ohammers@cu-online.com. The only
> >tricky part is that the logins on your local machine must correspond
> >to the remote POP server's logins. Not difficult to achieve.. and you
> >can use aliases, if need be.
> >--
> > -Otto
>
> This was my solution to that problem. The hangup I have now is that
> I host users from other domains, and when they send their mail it goes out
> as the masquaraded domain name instead of keeping their domain name. Anyone
> know a quick way around this before I start hacking my .mc files?
>
> Incidently, in the sendmail RPM, I assume that redhat.mc is the file
> used to create the sendmail.cf in the distribution. Is that a safe assumption?
>
>
This seems like a perfect soloution for the User Data Base. If defined with
O UserDatabaseSpec=/etc/userdb.db
you can build a database with maildropbames (the same as aliasing) and
mailname (the name that get stamped ass sender). In the later case you can do
the masquerading as well. For example:
eric:mailname eric.sendman@masq.domain.
This meens that no one note stated in the UDB is masqueraded. You could even
do a defaultmasquerade with ":default:mailname" according to the Sendmail
Installation and Operation Guide. Wich meens that if maildropp is found for
the user but no mailname, the dafault mailame is glued to the right hand of @,
that is masqueradeing.
A database i build with the command
makemap btree /etc/userdb.db < /etc/userdb
Unfortunutly this is still experimental and works bad with for example Pine
and exmh, bacause thees mailers like to put in the domainname in the sender by
them selves.
But there exist a hack to solve this.
Define the userdatabase i a K-macro as well, like this:
# Define our usrdb file for Pine (and hopefully exmh) rewrites
Kuserdb btree -o /etc/userdb.db
And the, a am sorry, you have to write I set of S1 rewriting rules:
###########################################################################
### Ruleset 1, rewrite sender header & envelope ###
###########################################################################
#Thanks to Bjart Kvarme <bjart.kvarme@usit.uio.no>. From FAQ
S1
R$- < @ $=w . > $* $: $1 < @ $2 . > $3 ?? $1 username@localhost ?
R$+ ?? $+ $: $1 ?? $(userdb $2 : mailname $: @ $)
R$+ ?? @ $@ $1 Not found
R$+ ?? $+ $>3 $2 Found, rewrite
#NOTE ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
# Use Tab Characters Use Tab Characters in these regions
# to make three columns (the line with "mailname" only has 2 columns).
Greetings
Peter
--
-----------------------------------------------------
Peter Antman Journalist, Writer and Linux-user.
peter.antman@abc.se www.abc.se/~m9339/ Fax: ++46-8-845085
-----------------------------------------------------
--
PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-HOWTO
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null