Subject: Bug with "domain" part

From: Derek Simkowiak <[email-masked]>
Date: Thu, 27 Feb 2003 17:36:19 -0500 (EST)

I have an ISP-level system that hosts multiple domains for email,
filesharing, and personal websites.

	In order to support multiple domains, the local usernames on this
system are complete email addresses (which are stored in LDAP, which are
found with PAM using nss-ldap, not that it matters).  For example, here is
an ssh sesssion for the local user [email-masked]:

login as: [email-masked]
Sent username "[email-masked]"
[email-masked]@intranet.realloc.net's password:
[[email-masked] at intranet:../[email-masked]]$ touch afile.txt
[[email-masked] at intranet:../[email-masked]]$ ls -la afile.txt
-rw-rw-r--    1 [email-masked] [email-masked]        0 Feb 27 13:32 afile.txt
[[email-masked] at intranet:../[email-masked]]$

	This server offers up email via IMAP.  So I have configured
/etc/pine.conf with the following:

inbox-path={intranet.realloc.net/ssl/novalidate-cert}INBOX
(and similar entries for fcc, etc.)

	My problem is that Pine is Fubaring the From: address.  I am
unable to get a valid "From:" address to appear in emails that come from
Pine.  (Mozilla, Outlook, webmail, etc. work fine.) In my opinion, it is
not behaving according to the documentation.  First, note that I have this
entry in my /etc/hosts:

63.251.164.134          intranet intranet.realloc.net

	Here is a summary of what I have tried, along with the broken
results.
------------------------------------
/etc/pine.conf:
user-domain=
use-only-domain-name=

Broken result:
From: Test Account <"\"[email-masked]\""@intranet.realloc.net>

Note: This seems to be expected behaviour.
------------------------------------
/etc/pine.conf:
user-domain=
use-only-domain-name=yes

Broken result:
From: Test Account <"\"[email-masked]\""@realloc.net>

Note: Why did it add "realloc.net" when use-only-domain-name has been
set?  I think this is a bug.
------------------------------------
/etc/pine.conf:
user-domain=""
use-only-domain-name=

Broken result:
From: Test Account <"\"[email-masked]\""@intranet.realloc.net>

Note: The appended domain "intranet.realloc.net" is not equal to the empty
string specified in my user-domain setting.  I think this is a bug.
------------------------------------
/etc/pine.conf:
user-domain=""
use-only-domain-name=yes

Broken result:
From: Test Account <"\"[email-masked]\""@realloc.net>

Note: First, I have specified a user-domain setting (albeit of empty
string), so the use-only-domain-name setting should not even be considered
at all.  And yet changing it to "yes" from the last test changes the
resulting behaviour.  And the resulting behaviour does in fact add a
domain anyway.  I think this is a bug.
------------------------------------

	I have also tried all four combinations of empty user-domain and
"yes" for use-only-domain-name in the user's personal .pinerc, with the
same results.

	Finally, here's an interesting tidbit:

	If I change this line in /etc/hosts:

63.251.164.134          intranet intranet.realloc.net

	to read this:

63.251.164.134          intranet

	...then I get some funky behaviour:

------------------------------------
/etc/pine.conf:
user-domain=
use-only-domain-name=

Broken result:
From: Test Account <"\"[email-masked]\""@realloc.net>
------------------------------------
/etc/pine.conf:
user-domain=""
use-only-domain-name=

Broken result:
From: Test Account <"\"[email-masked]\""@realloc.net>
------------------------------------
/etc/pine.conf:
user-domain=
use-only-domain-name=yes

Broken result:
From: Test Account <"\"[email-masked]\""@net>

Note: Error Message upon launch:  "Incomplete mail domain .net"
------------------------------------
/etc/pine.conf:
user-domain=""
use-only-domain-name=yes

Broken result:
From: Test Account <"\"[email-masked]\""@net>

Note: Error Message upon launch:  "Incomplete mail domain .net"
------------------------------------

	Where is it getting "net" for the domain?

	Besides the contrary-to-documentation domain behaviour, there is
also the problem that Pine demands on putting quotes around the local
part, presumably because of the '@' character.  I know that my system is
not the only IMAP-based setup that uses the email address as the login
name, so I think this needs to be fixed.

	Hopefully I have misunderstood the Pine docs, and somebody can
recommend a config that will work for my users.  But if not, then some
options would be:

1. New setting called "from-address", which lets the user specify whatever
they want in the From: field.  Example:

from-address="Test Account <[email-masked]>"

2. New setting called "user-local-part", which is a complement to the
"user-domain".  Example:

user-domain="realloc.net"
user-local-part="test"

3. Change the existing behaviour to:

(a) Honour an empty "user-domain" setting, like it's supposed to
(b) Not add a domain when "use-only-domain-name=yes"
(c) Not quote the local part when "use-only-domain-name=yes"

	I am happy to give core Pine developers temporary access to my
system for the purposes of troubleshooting.  Please email me privately if
that is necessary.

	This is on a Mandrake 9.0-based system running this Mandrake RPM
pine-4.50-1.1mdk.  I know that's not the latest but the Changelog on the
website didn't show any domain-related changes, so I have not upgraded.

	So, in summary:

1. Can anyone recommend a setting to try?
2. If not, will any of the above fixes be considered for a future Pine
release?

	(Pine is my favorite email program, and yet I cannot offer it to
my customers because of this issue.)

Thank You,
Derek Simkowiak
[email-masked]

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Derek Simkowiak <[email-masked]>
Date: Thu, 27 Feb 2003 18:02:22 -0500 (EST)

> 	My problem is that Pine is Fubaring the From: address.

	I just found this page:

http://www.ii.com/internet/messaging/pine/changing_from/

	...which gave me some new options.  For the time being, I can
instruct customers to add their own "From:" using customized-hdrs option.

	Also note that my proposed "user-local-part" seems to be the exact
same thing as "user-id" in PC-Pine.  Why not just add "user-id" to the
Unix version?

--Derek

---

From: Nancy McGough <[email-masked]>
Date: Thu, 27 Feb 2003 23:03:08 +0000 (GMT)

On 27 Feb 2003 Derek Simkowiak ([email-masked]) wrote:
>   [...]
>    [...]

My vote  is for your option #2 and it seems like it should be
easy to implement because there already exists a user-id variable
in PC-Pine. This has been discussed over and over again for years
and my #1 Pine wish is for this to be fixed. For lots more about
the issue, including workarounds, see this:

 <http://www.ii.com/internet/messaging/pine/#wishFrom>

Good luck,
Nancy

-- 
--  I N F I N I T E  I N K    www.ii.com    N A N C Y  M c G O U G H  --

---

From: Eduardo Chappa <[email-masked]>
Date: Fri, 28 Feb 2003 07:39:24 -0800 (PST)

*** Derek Simkowiak ([email-masked]) wrote in the pine-info list on Feb...:

:) > 	My problem is that Pine is Fubaring the From: address.
:)
:) 	I just found this page:
:)
:) http://www.ii.com/internet/messaging/pine/changing_from/
:)
:) 	...which gave me some new options.  For the time being, I can
:) instruct customers to add their own "From:" using customized-hdrs
:) option.

Hello Derek,

You can add a customized header like

customized-hdrs = From: <$LOGNAME>

to /etc/pine.conf. If you can get their personal name into an enviroment
variable then you can construct a better from field.

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Derek Simkowiak <[email-masked]>
Date: Fri, 28 Feb 2003 15:17:54 -0500 (EST)

> variable then you can construct a better from field.

	This is cool!  Thanks for the tip.

	I didn't realize one could use shell vars in the pine.conf.
Where can I find technical documentation on pine.conf/.pinerc?

Thanks,
Derek Simkowiak