[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pine-info
Subject:    Re: re-writing From: header with pine/sendmail/userdb
From:       lynch.94 () osu ! edu (Jerry Lynch)
Date:       1996-04-30 12:26:44
[Download RAW message or body]

========= 
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 <bjart.kvarme@usit.uio.no>
   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
<bjart.kvarme@usit.uio.no> who was kind enough to post this solution
to comp.mail.sendmail a while back.  
===========

On 25 Apr 1996 16:29:43 GMT, Simon Greaves <censjg@torduff.hw.ac.uk> wrote:
>I 'm running sendmail 8.7.5 with userdb compiled in,
>with pine 3.9[12] and mh-6.8.4.
>
>We have a campus mailname policy of the form:
>
>  Initials.Surname@hw.ac.uk
>
>I configured sendmail to masquerade as the mail
>domain (hw.ac.uk) and created a userdb file with
>mappings to and from my login id and my mailname.
>
>Using 'Mail' things looked good, but got messier
>when I tried other MUA's.
>
>Looks like as long as I don't have a from field,
>or the from field only has my local login id
>(ie no '@' or '@domain') then the userdb stuff
>works. If I use an MUA that tries to be clever
>about the from header I'm stuffed.
>
>Is this correct behaviour from sendmail, or am I
>missing something fundamental here?
>
>Can I work around it easily? Do I need extra rules
>in my sendmail.cf file?
>
>Any help welcome, email preferred:
>
>Thanks, 
>
>Simon
>S.J.Greaves@hw.ac.uk		(one day...)


-- 
Jerry	<lynch.94@osu.edu>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic