Dan Harkless <[EMAIL PROTECTED]> wrote:
>...
>Therefore, I've upped the VERSION to 1.0.3. Unfortunately Doug didn't do
>this just after releasing the tarball, so there was a small window when
>someone could have gotten a different 1.0.2 than most end-users have, but
>hopefully no significant changes were made after 1.0.2 went public.
Let me suggest a change for the next version -- patch attached.
The code changes are small -- most of the patch is documentation.
This is a simple change to allow a user to easily set the sender
address to user+detail, a form of address already supported by recent
sendmail versions. I overloaded the variable mmailid in mts.conf, as
a way of giving the system administrator control over whether to
permit this.
Personally, I find this tremendously valuable. It allows me to
easily use distinctive addresses for different mailing lists, such as
the <[EMAIL PROTECTED]> that I am using here. This can aid in
automatically filtering incoming mail, as well as helping to identify
where the spammers got your address.
I understand that one of the exmh team has is testing exmh support
for accessing this feature.
-NWR
--- zotnet/mts/mts.c 1999/10/29 17:34:47 1.1
+++ zotnet/mts/mts.c 1999/10/29 17:35:19
@@ -412,10 +412,10 @@
* field should have the form "Full Name <fakeusername>".
*/
#ifndef GCOS_HACK
- for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
+ for (cp = fullname; *np && *np != ',' && !((MMailids & 01) && (*np == '<'));
+*cp++ = *np++)
continue;
#else
- for (cp = fullname; *np && *np != (MMailids ? '<' : ','); ) {
+ for (cp = fullname; *np && *np != ',' && !((MMailids & 01) && (*np == '<')); ) {
if (*np == '&') { /* blech! */
strcpy (cp, pw->pw_name);
*cp = toupper(*cp);
@@ -429,15 +429,20 @@
#endif
*cp = '\0';
- if (MMailids) {
- if (*np)
- np++;
+ if ((MMailids & 01) && (*np == '<') ) {
+ np++;
for (cp = username; *np && *np != '>'; *cp++ = *np++)
continue;
*cp = '\0';
}
- if (MMailids == 0 || *np == '\0')
+ if (!(MMailids & 01) || *np != '>' || *username == '\0')
strncpy (username, pw->pw_name, sizeof(username));
+
+ if ((MMailids & 02) && (cp = getenv("USERPLUS")) && *cp &&
+ strlen(username) + strlen(cp) < sizeof(username) - 1) {
+ strcat(username,"+");
+ strcat(username,cp);
+ }
if ((cp = getenv ("SIGNATURE")) && *cp)
strncpy (fullname, cp, sizeof(fullname));
--- man/mh-tailor.man 1999/10/29 21:23:41 1.1
+++ man/mh-tailor.man 1999/10/29 21:29:06
@@ -101,9 +101,9 @@
.ti -.5i
mmailid: 0
.br
-If this is non-zero, then activate support for MMailids (username
-masquerading). When this is activated, \fInmh\fR will check if the
-pw_gecos field in the password file has the form
+If this is 1 (or any odd value), then activate support for MMailids
+(username masquerading). When this is activated, \fInmh\fR will
+check if the pw_gecos field in the password file has the form
.ti +.5i
Full Name <fakeusername>
@@ -117,6 +117,14 @@
This facility is useful if you are using POP, and wish for messages
that are sent by users to appear to originate from the username of
their POP account, rather than their username on the local machine.
+
+If mmailid is 2, then activate support for generating user+detail
+sender addresses, consistent with recent versions of sendmail. If
+this support is active, then \fInmh\fR will check whether the
+variable USERPLUS is defined in the environment. If it is, then the
+string "+$USERPLUS" will be appended to the username. This can be
+useful for setting distinctive sender addresses for the various
+mailings lists to which you might subscribe.
.ti -.5i
maildelivery: %libdir%/maildelivery
--- INSTALL 1999/10/29 21:17:29 1.1
+++ INSTALL 1999/10/29 21:23:00
@@ -62,9 +62,9 @@
originated on the POP server.
d) "mmailid" is checked to see if nmh should do username
- masquerading. If the value of this field is non-zero, then
- nmh will check if the pw_gecos field in the password file
- has the form
+ masquerading. If the value of this field is 1 (or any odd
+ number), then nmh will check if the pw_gecos field in the
+ password file has the form
Full Name <fakeusername>
@@ -74,6 +74,19 @@
useful if you wish messages that you send to appear to come
from the username of your POP account, rather than your username
on the local machine.
+
+ If the value of mmailid is 2, then nmh will check whether
+ $USERPLUS is defined in the environment. If it is, then nmh
+ will set the sender address to userid+$USERPLUS. This allows
+ users to send mail with sender address of the form
+ user+detail. Most recent versions of sendmail will treat this
+ as equivalent to user for incoming mail. Using sender
+ addresses of this form can be convenient when subscribing to
+ mailing lists, to help you distinguish where spammers got your
+ address.
+
+ Setting mmailid to 3 combines the effects of setting it to 1 and
+ of setting it to 2.
If you compile with POP support, but only want to use it occasionally,
then you can always use the `-host' and `-user' options to `inc'