Subject: Re: pine and "userdb" in sendmail 8.6.12

From: [email-masked] (Jerry Lynch)
Date: 3 Aug 1995 23:15:54 -0400

One option you have for this problem is to have sendmail take care of 
this quirk of pine.  (I got the following info on comp.mail.sendmail from 
Bjart Kvarme).

In your /etc/sendmail.cf file, add the following line before the 
rulesets.  (I put mine right after the line saying "Kdequote dequote" and 
before the "Special Macros" section"):

# Define our userdb file for pine rewrites
Kuserdb btree -o /etc/userdb.db

Then, add the following ruleset #1.  (I put mine right after Ruleset 0):

##################################################
### Ruleset 1, rewrite sender header & envelope ##
##################################################
#Thanks to Bjart Kvarme <[email-masked]>
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).

This is how mine is set up and it works great without having to alter 
pine's code.

Also, if you have a "SLIP" or "PPP" connection, another good thing to do 
in the /etc/sendmail.cf file is to move the line for the nameserver 
lookup in ruleset 96 to the bottom of the ruleset so that your local mail 
can be delivered even when you don't have a connection to a nameserver.  
The key two lines to move to the bottom of the ruleset are:

# pass to name server to make hostname canonical
R$* < @ $* $~P > $*             $: $1 < @ $[ $2 $3 $] > $4

Hope this helps.

	Jerry

On 5 Jun 1995, Phillip Vandry wrote:

> Otmar Stahl <[email-masked]> writes:
> 
> >I recently set up sendmail 8.6.12 on HP-UX. My idea was to use the
> >"userdb" feature to replace my unix login name with first_name.last_name
> >for outgoing mail using the "mailname" entry in the sendmail user data
> >base. This in fact works with mailx and elm, but unfortunately not with
> >pine, my favourite mailer. In outgoing mail, the unix login name takes
> >preference over the entry in the user data base, although pine is set up
> >to use sendmail. Since elm uses the sendmail user data base, it looks like
> >a set-up problem with pine. 
> 
> It's because PINE generates a From: header while the other MUA's don't.
> This is exactly why I think it shouldn't. That's why I used the following
> patches to prevent it from doing so. It's not a perfect solution, but
> it suited our needs very well.
> 
> Users can still change the from address if ALLOW_CHANGING_FROM is defined,
> but it cannot be done through the personal-name field.
>  [SNIP]