Subject: USERDB & PINE

From: lfasano@foreigner (Ing. Luis Antonio Fasano B.)
Date: 23 Mar 1996 17:42:58 GMT

Well i have this problem with the userdb database.

I have some declarations as this one

lfasano:mailname	[email-masked]

my problem is that whenever i send a mail using the mail command or with elm, the replacement is done, but when i send a mail using pine it is not.

IS there anyway to modificate the rule or database to make these change even if sending through pine???
Is there any definition in pinerc which may help with this???

I've read the manuals and havent found anything about it. 

Any pointer????

Thanks in advance

Luis

pd.  BTW Im doing the database using the makemap btree command...

---

From: Andrej Borsenkow <[email-masked]>
Date: Tue, 26 Mar 1996 20:48:01 +0300 (MOW)

> I've read the manuals and havent found anything about it.

The following applies to sendmail 8.7.x - I didn't check 8.6.x for it.

sendmail rewrites the From: header using UDB *only* if envelope sender as
determined by sendmail is the same, as header sender.

In case of local mail, the envelope sender from sendmail point of view is
always just user, without domain qualification. It means, that header
sender *must* be just plain user for UDB rewriting to take place.

Basically there are several possibilities:

1. modify Pine to put just plain user in From: header. It seems to be not
impossible but must be done carefully.

2. modify sendmail to uconditionally use UDB for header rewriting. There
is already code for it, but it is under #ifdef MAYBENEXTRELEASE. You could
try to remove #ifdef and look, if it works. In this case you will have to
put user@FQDN in UDB in addition to plain user.

3. modify sendmail.cf: resolve all local mail to user@FQDN, and strip
FQDN in local mailer rules. It seems to be possible, and should work; but
I never did try it. You will need user@FQDN in this case also. Also
in this case you lose UDB for elm :-(

It seems to be basically sendmail problem (for me). Probably, sometimes
#ifdef MAYBENEXTRELEASE will be removed in oficial distribution of
sendmail.

hope it helps

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: [email-masked]
-------------------------------------------------------------------------

---

From: [email-masked] (Jerry Lynch)
Date: 28 Mar 1996 00:34:58 GMT

========= 
Here is my attempt at writing a "FAQ-like" description of how I got
the USERDB to work with pine.  This is now in the Sendmail FAQ (Maybe
this should go in PINE FAQ also?).  I encourage you to post a request
to comp.mail.sendmail for the USERDB to handle FQDNs.
BTW.  I'm using sendmail 8.6.12.

-------------------------------------------------------------------
  * How do I get the user database (userdb) to work with Pine.

        The basic incompatibility with Pine and the user database option
        is in how Pine writes From addresses in the header.  Most MUAs 
        write the From address as "From: user", while Pine, for reasons
        given in its documentation, write the From address as 
        "From: user@FQDN" (FQDN=fully qualified domain name).  Because of
        this difference, the user database does not rewrite pine headers.

        One solution to this problem is to make the following change in
        /etc/sendmail.cf after you have the user database option installed
        and working with other MUAs:

        In the "local info" section, add the following:

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

        After ruleset 0, add the following as ruleset 1:

   ##################################################
   ### 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).

        Now the user database should re-write messages sent with Pine.

        If this still does not work for you, try adding the following
        to either the system wide pine.conf, pine.conf.fixed, or your 
        personal .pinerc:

                user-domain=localhost

        This has been known to help solve the problem for some people.
        ** The drawback of setting the user-domain is Pine 3.92 gives
	   you error messages since localhost is not a FQDN...but if
           you just ignore the warnings, things should work.

-------------------------------------------------------------------
Any thanks for the above should be sent to: Bjart Kvarme
<[email-masked]> who was kind enough to post this solution a
while back.
===========

-- 
Jerry	<[email-masked]>