Skip to contentSkip to conversation

silently discarded post

DISCUSSION Patrick Bennett 5 participants 15 messages Sep 29, 2005 – Sep 30, 2005

lore
Share & tools
lore
#0 lore raw

I have a mlmmj 1.2.4-1 mailing list running on a debian+postfix host and one particular user is having trouble posting to it. Every mail he sends is silently filed away into queue/discarded. The address he is emailing from is properly subscribed to the "nomail" part of the list. There is no control/access file. Others, both on the mail-receipt and noreciept lists, are able to post to the list successfully.

Below is a copy of one of the mails that ended up in queue/discarded. Two things catch my eye, I wonder if either of them has something to do with it: 1) his "from" address has a 3-part domain; 2) the "to" address has single quotes around it (he seems to be unable to prevent this in his mailer, and at any rate, postfix was obviously able to handle it...).

No information is showing up in /var/log/syslog|mail.log or mlmmj.operation.log- is there somewhere else I should look? Thoughts anyone?

TIA,
Patrick

~*~*~*~mail.log~*~*~*~

Sep 29 00:04:16 newnorcal postfix/smtpd[17638]: B3BD6382C2: client=localhost[127.0.0.1]
Sep 29 00:04:17 newnorcal postfix/cleanup[17633]: B3BD6382C2: message-id=<[email protected]>
Sep 29 00:04:17 newnorcal postfix/smtpd[17638]: disconnect from localhost[127.0.0.1]
Sep 29 00:04:17 newnorcal postfix/qmgr[17663]: B3BD6382C2: from=<[email protected]>, size=1852, nrcpt=1 (queue active)
Sep 29 00:04:18 newnorcal postfix/local[17639]: B3BD6382C2: to=<[email protected]>, relay=local, delay=2, status=sent (delivered to command: /usr/bin/mlmmj-recieve -L /var/spool/mlmmj/stockton/)
Sep 29 00:04:18 newnorcal postfix/qmgr[17663]: B3BD6382C2: removed

~*~*~*~the discarded email~*~*~*~
From [email protected] Thu Sep 29 00:04:17 2005
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from newnorcal.norcalsolutions.com (localhost [127.0.0.1])
by mail.norcalsolutions.com (Postfix) with SMTP id B3BD6382C2 for <[email protected]>; Thu, 29 Sep 2005 00:04:16 +0000 (UTC)
Received: from hwaexbh02.cahwnet.gov (hwaexbh01.cahwnet.gov [158.96.104.22])
by mail.norcalsolutions.com (Postfix) with ESMTP id 6BB07382C2 for <[email protected]>; Thu, 29 Sep 2005 00:04:01 +0000 (UTC)
Received: by hwaexbh01.cahwnet.gov with Internet Mail Service

        (5.5.2657.72)id <TVYNHZN0>; Wed, 28 Sep 2005 17:08:58 -0700

Message-ID: <[email protected]>
From: "Patterson, Daniel@EDD" <[email protected]>
To: "'[email protected]'" <[email protected]>
Subject: test email. please ignore
Date: Wed, 28 Sep 2005 17:08:56 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: multipart/alternative;

        boundary="----_=_NextPart_001_01C5C489.F1BA5994"

X-imss-version: 2.031
X-imss-result: Passed
X-imss-scores: Clean:57.84395 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:3 C:1 M:1 S:2 R:1 (0.5000 0.5000)

This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C5C489.F1BA5994

Content-Type: text/plain;
        charset="iso-8859-1"

Danny Patterson

------_=_NextPart_001_01C5C489.F1BA5994

Content-Type: text/html;
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24"> <TITLE>test email. please ignore</TITLE>
</HEAD>
<BODY>

<P><FONT FACE="Arial">Danny Patterson</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C5C489.F1BA5994--

#1 lore raw
Quoted 8 lines · Patrick Bennett

I have a mlmmj 1.2.4-1 mailing list running on a debian+postfix host and one particular user is having trouble posting to it. Every mail he sends is silently filed away into queue/discarded. The address he is emailing from is properly subscribed to the "nomail" part of the list. There is no control/access file. Others, both on the mail-receipt and noreciept lists, are able to post to the list successfully.

Quoted 6 lines

Below is a copy of one of the mails that ended up in queue/discarded. Two things catch my eye, I wonder if either of them has something to do with it: 1) his "from" address has a 3-part domain; 2) the "to" address has single quotes around it (he seems to be unable to prevent this in his mailer, and at any rate, postfix was obviously able to handle it...).

Can you try and reproduce with mlmmj-1.2.8?

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#2 lore raw
In reply to Patrick Bennett
Quoted 9 lines · Mads Martin Joergensen
Quoted 8 lines · Patrick Bennett

I have a mlmmj 1.2.4-1 mailing list running on a debian+postfix host and one particular user is having trouble posting to it. Every mail he sends is silently filed away into queue/discarded. The address he is emailing from is properly subscribed to the "nomail" part of the list. There is no control/access file. Others, both on the mail-receipt and noreciept lists, are able to post to the list successfully.

Quoted 8 lines
Quoted 6 lines

Below is a copy of one of the mails that ended up in queue/discarded. Two things catch my eye, I wonder if either of them has something to do with it: 1) his "from" address has a 3-part domain; 2) the "to" address has single quotes around it (he seems to be unable to prevent this in his mailer, and at any rate, postfix was obviously able to handle it...).

Can you try and reproduce with mlmmj-1.2.8?

The 1.2.4-1 version of mlmmj is the one currently in the stable branch of Debian, and the 1.2.8-7 version in unstable probably won't install on a host running stable.

If it would help, I will be happy to provide a backported version of 1.2.8 that works on Debian stable.

Signature · 4 lines
Søren O.                                           ,''`.
                                                  : :' :
GPG key id: 0x1EB2DE66                            `. `'
GPG signed mail preferred.                          `-
#3 lore raw
In reply to Patrick Bennett

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Søren Boll Overgaard wrote:

|>Can you try and reproduce with mlmmj-1.2.8?
|
| The 1.2.4-1 version of mlmmj is the one currently in the stable branch of
| Debian, and the 1.2.8-7 version in unstable probably won't install on
a host
| running stable.
|
| If it would help, I will be happy to provide a backported version of

1.2.8 that works on Debian stable.

Try this for now: http://noc.sectoor.de/mlmmj_1.2.8-2_i386.deb

Regards,
Sven
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFDO80qQoCguWUBzBwRAkZ0AKCLJH94VzLS8BCpsygzdV1nESnebACfRuh1 mIjxv8KR7M+qsFl8Q6dwEfs=lNOq
-----END PGP SIGNATURE-----

#4 lore raw
In reply to Patrick Bennett

I wish I had seen that offer before I just apt-get updated to testing. Heh. Well, anyways, 1.2.8 now installed.... will wait for morning and ask my user to try posting again.

Thanks for the help,
Patrick
~~~~~~~~~~~~

The 1.2.4-1 version of mlmmj is the one currently in the stable branch of Debian, and the 1.2.8-7 version in unstable probably won't install on a host running stable.

If it would help, I will be happy to provide a backported version of 1.2.8 that works on Debian stable.

Signature · 4 lines
Søren O.                                           ,''`.
                                                  : :' :
GPG key id: 0x1EB2DE66                            `. `'
GPG signed mail preferred.                          `-
#5 lore raw
In reply to Patrick Bennett
Quoted 3 lines · Patrick Bennett

I wish I had seen that offer before I just apt-get updated to testing. Heh. Well, anyways, 1.2.8 now installed.... will wait for morning and ask my user to try posting again.

And if it fails again, please resend the mail, and the logs as before. Thanks.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#7 lore raw
In reply to Patrick Bennett

Hey, I just noticed this: From: "Patterson, Daniel@EDD" <[email protected]>

I assume mlmmj has to parse the from field in order to do the auth checking... do you think that "@" in the address book label (From:
"Patterson, Daniel@EDD" <[email protected]>) is making the parser choke?!

-Patrick

----- Original Message -----
From: "Patrick Bennett" <[email protected]>
To: "Mads Martin Joergensen" <[email protected]>; <[email protected]>
Sent: Thursday, September 29, 2005 1:21 PM
Subject: Re: silently discarded post

Quoted 252 lines

Okay, no change in behaviour with 1.2.8-7 from debian testing.... I can hunt thorugh mail.log later today if you think it is necessary. Below are the three emails that landed in queue/discarded since the upgrade. Emails #2 and #3 were both sent, I believe, by simply selecting a test message I successfully posted to the list, hitting the "reply" button, then hitting the "send" button- no editing of the message or "To" fileds at all.

TIA,
Patrick

~~~~~~ EMAIL 1 ~~~~~~~~
From [email protected] Thu Sep 29 20:03:27 2005
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from newnorcal.norcalsolutions.com (localhost [127.0.0.1])
by mail.norcalsolutions.com (Postfix) with SMTP id E859838584 for <[email protected]>; Thu, 29 Sep 2005 20:03:26 +0000
(UTC)
Received: from hwaexbh02.cahwnet.gov (hwaexbh01.cahwnet.gov [158.96.104.22])
by mail.norcalsolutions.com (Postfix) with ESMTP id E539438584 for <[email protected]>; Thu, 29 Sep 2005 20:03:24 +0000 (UTC)
Received: by hwaexbh01.cahwnet.gov with Internet Mail Service

       (5.5.2657.72)id <TVYN2K2N>; Thu, 29 Sep 2005 13:08:23 -0700

Message-ID:
<[email protected]>
From: "Patterson, Daniel@EDD" <[email protected]>
To: "'[email protected]'" <[email protected]>
Subject: test, trying to get computer savvy
Date: Thu, 29 Sep 2005 13:08:16 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: multipart/alternative;

       boundary="----_=_NextPart_001_01C5C531.47286068"

X-imss-version: 2.031
X-imss-result: Passed
X-imss-scores: Clean:17.12835 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:3 C:1 M:1 S:2 R:1 (0.5000 0.5000)

This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C5C531.47286068

Content-Type: text/plain;
       charset="iso-8859-1"

sorry about the emails,

Danny

------_=_NextPart_001_01C5C531.47286068

Content-Type: text/html;
       charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24"> <TITLE>test, trying to get computer savvy</TITLE>
</HEAD>
<BODY>

<P><FONT FACE="Arial">sorry about the emails, </FONT> </P>

<P><FONT FACE="Arial">Danny</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C5C531.47286068--

~~~~~~~ EMAIL 2 ~~~~~~~~~~~~
From [email protected] Thu Sep 29 20:01:13 2005
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from newnorcal.norcalsolutions.com (localhost [127.0.0.1])
by mail.norcalsolutions.com (Postfix) with SMTP id 1BF1638584 for <[email protected]>; Thu, 29 Sep 2005 20:01:13 +0000
(UTC)
Received: from hwaexbh02.cahwnet.gov (hwaexbh01.cahwnet.gov [158.96.104.22])
by mail.norcalsolutions.com (Postfix) with ESMTP id 4B24838584 for <[email protected]>; Thu, 29 Sep 2005 20:01:11 +0000 (UTC)
Received: by hwaexbh01.cahwnet.gov with Internet Mail Service

       (5.5.2657.72)id <TVYN2KF8>; Thu, 29 Sep 2005 13:06:09 -0700

Message-ID:
<[email protected]>
From: "Patterson, Daniel@EDD" <[email protected]>
To: "'[email protected]'" <[email protected]>
Subject: RE: [CL Stockton] test
Date: Thu, 29 Sep 2005 13:06:06 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: multipart/alternative;

       boundary="----_=_NextPart_001_01C5C531.39CFD69E"

X-imss-version: 2.031
X-imss-result: Passed
X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:3 C:1 M:1 S:2 R:1 (0.5000 0.5000)

This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C5C531.39CFD69E

Content-Type: text/plain;
       charset="iso-8859-1"

-----Original Message-----
From: Patrick Bennett [mailto:[email protected]]
Sent: Thursday, September 29, 2005 4:42 AM
Subject: [CL Stockton] test

testing again. please ignore.

------_=_NextPart_001_01C5C531.39CFD69E

Content-Type: text/html;
       charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 6.00.2800.1479" name=GENERATOR> <STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader><FONT face="Times New Roman" size=2>-----Original Message-----<BR><B>From:</B> Patrick Bennett [mailto:[email protected]]<BR><B>Sent:</B> Thursday, September 29,
2005
4:42 AM<BR><B>Subject:</B> [CL Stockton] test<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>testing again.&nbsp;&nbsp; please ignore.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C5C531.39CFD69E--

~~~~~~~~~~~ EMAIL 3 ~~~~~~~~~~~~~~~~
From [email protected] Thu Sep 29 20:00:16 2005
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from newnorcal.norcalsolutions.com (localhost [127.0.0.1])
by mail.norcalsolutions.com (Postfix) with SMTP id EE0F138584 for <[email protected]>; Thu, 29 Sep 2005 20:00:15 +0000
(UTC)
Received: from hwaexbh02.cahwnet.gov (hwaexbh01.cahwnet.gov [158.96.104.22])
by mail.norcalsolutions.com (Postfix) with ESMTP id 1002338584 for <[email protected]>; Thu, 29 Sep 2005 20:00:10 +0000 (UTC)
Received: by hwaexbh01.cahwnet.gov with Internet Mail Service

       (5.5.2657.72)id <TVYN2K15>; Thu, 29 Sep 2005 13:05:04 -0700

Message-ID:
<[email protected]>
From: "Patterson, Daniel@EDD" <[email protected]>
To: "'[email protected]'" <[email protected]>
Subject: RE: [CL Stockton] test - please ignore
Date: Thu, 29 Sep 2005 13:05:02 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: multipart/alternative;

       boundary="----_=_NextPart_001_01C5C531.138410FE"

X-imss-version: 2.031
X-imss-result: Passed
X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:3 C:1 M:1 S:2 R:1 (0.5000 0.5000)

This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C5C531.138410FE

Content-Type: text/plain;
       charset="iso-8859-1"

-----Original Message-----
From: dumbox [mailto:[email protected]]
Sent: Thursday, September 29, 2005 2:22 AM
Subject: [CL Stockton] test - please ignore

this is just a test of the mailing list. please ignore.

------_=_NextPart_001_01C5C531.138410FE

Content-Type: text/html;
       charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<META content="MSHTML 6.00.2800.1479" name=GENERATOR> <STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader><FONT face="Times New Roman" size=2>-----Original Message-----<BR><B>From:</B> dumbox [mailto:[email protected]]<BR><B>Sent:</B> Thursday, September 29,
2005
2:22 AM<BR><B>Subject:</B> [CL Stockton] test - please ignore<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>this is just a test of the mailing
list.&nbsp;
please ignore.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C5C531.138410FE--

----- Original Message -----
From: "Mads Martin Joergensen" <[email protected]>
To: <[email protected]>
Sent: Thursday, September 29, 2005 4:43 AM
Subject: Re: silently discarded post

Quoted 16 lines · Patrick Bennett
Quoted 4 lines

I wish I had seen that offer before I just apt-get updated to testing. Heh. Well, anyways, 1.2.8 now installed.... will wait for morning and ask
my user to try posting again.

And if it fails again, please resend the mail, and the logs as before. Thanks.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
                               -- A. P. J.
#8 lore raw
In reply to Patrick Bennett

I pointed this out to the user and he says that listing is kept in a global directory at work (he is a government employee... take a look at the address, you can probably guess where) and he has no power to change the way the listing is set up. Additionally, he won't be able to get anywhere having the IT Department change the listing for him, since this is about a email issue for personal use.

Thus, if this is the source of the error, the only way for him to be able to use the mailing list is for mlmmj to be able to work around it.

-Patrick

----- Original Message -----
From: "Patrick Bennett" <[email protected]>
To: "Mads Martin Joergensen" <[email protected]>; <[email protected]>
Sent: Thursday, September 29, 2005 1:48 PM
Subject: Re: silently discarded post

Quoted 11 lines

Hey, I just noticed this: From: "Patterson, Daniel@EDD" <[email protected]>

I assume mlmmj has to parse the from field in order to do the auth checking... do you think that "@" in the address book label (From:
"Patterson, Daniel@EDD" <[email protected]>) is making the parser choke?!

-Patrick

#9 lore raw
In reply to Patrick Bennett
Quoted 10 lines · Patrick Bennett

I pointed this out to the user and he says that listing is kept in a global directory at work (he is a government employee... take a look at the address, you can probably guess where) and he has no power to change the way the listing is set up. Additionally, he won't be able to get anywhere having the IT Department change the listing for him, since this is about a email issue for personal use.

Thus, if this is the source of the error, the only way for him to be able to use the mailing list is for mlmmj to be able to work around it.

It is the source of the error, and very hard to work around. Reason mlmmj discards it, is that it's not a valid from with two email adresses in it, and then it's thrown away.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#10 lore raw
In reply to Patrick Bennett

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mads Martin Joergensen wrote:

| It is the source of the error, and very hard to work around. Reason
| mlmmj discards it, is that it's not a valid from with two email adresses
| in it, and then it's thrown away.

How about checking the Return-Path instead of the From for such checks? No bullshitsigns from bloated mailsystems and normally the same address (if not its probably a spoofing, so it would work ok) or did i forgot something?

Regards,
Darkman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFDPU3yQoCguWUBzBwRAtwhAKCK8xfuEpP8b6JU9N2jx3BYYRIKPQCfRIHT A4VcAusihcRrP3XKVWOIckA=pYUD
-----END PGP SIGNATURE-----

#11 lore raw
In reply to Patrick Bennett
Quoted 8 lines · Sven 'Darkman' Michels
| It is the source of the error, and very hard to work around. Reason
| mlmmj discards it, is that it's not a valid from with two email adresses
| in it, and then it's thrown away.

How about checking the Return-Path instead of the From for such checks? No bullshitsigns from bloated mailsystems and normally the same address (if not its probably a spoofing, so it would work ok) or did i forgot something?

It's already done on both :-)

So we can be less restrictive.

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                -- A. P. J.
#12 lore raw
In reply to Patrick Bennett
Quoted 3 lines · Mads Martin Joergensen

It is the source of the error, and very hard to work around. Reason mlmmj discards it, is that it's not a valid from with two email adresses in it, and then it's thrown away.

The original header value was:

From: "Patterson, Daniel@EDD" <[email protected]>

This is perfectly valid according to both RFC 822 and RFC 2822, and parsing this as two addresses is an error. I'll work on a patch to correctly parse it, but I can't promise anything right away.

The stuff inside the quotation marks is considered a "display-name" in the RFC 2822 BNF, section 3.4:

address = mailbox / group

mailbox = name-addr / addr-spec

name-addr = [display-name] angle-addr

angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr

group = display-name ":" [mailbox-list / CFWS] ";"

                        [CFWS]

display-name = phrase

mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list

address-list = (address *("," address)) / obs-addr-list

And then "phrase" is defined in section 3.2.6:

word = atom / quoted-string

phrase = 1*word / obs-phrase

And "quoted string" is discussed in 3.2.5:

qtext = NO-WS-CTL / ; Non white space controls

                        %d33 /          ; The rest of the US-ASCII
                        %d35-91 /       ;  characters not including "\"
                        %d93-126        ;  or the quote character

qcontent = qtext / quoted-pair

quoted-string = [CFWS]
DQUOTE *([FWS] qcontent) [FWS] DQUOTE [CFWS]

Correctly parsing all valid email addresses is a pain. I can't find any non-GPL code that does it but I haven't looked too hard.

Neale

#13 lore raw
In reply to Patrick Bennett

----- Original Message -----
From: "Mads Martin Joergensen" <[email protected]>
To: <[email protected]>
Sent: Friday, September 30, 2005 7:34 AM
Subject: Re: silently discarded post

Quoted 8 lines · Patrick Bennett
Quoted 7 lines

I pointed this out to the user and he says that listing is kept in a global directory at work (he is a government employee... take a look at the address, you can probably guess where) and he has no power to change the way the listing is set up. Additionally, he won't be able to get anywhere having the IT Department change the listing for him, since this is about a email issue for personal use.

Quoted 8 lines
Quoted 3 lines

Thus, if this is the source of the error, the only way for him to be able to use the mailing list is for mlmmj to be able to work around it.

It is the source of the error, and very hard to work around. Reason mlmmj discards it, is that it's not a valid from with two email adresses in it, and then it's thrown away.

I wonder if this could be (from a logical standpoint) handled in one of the following two ways, and whether it would make sense to program this logic into mlmmj:

1) Even though it is not a "valid from" if it contains (what appear to be) two email addresses and one of the two is on the authorized-to-post-list, the mail is accepted;

or

2) here's a quick survey of "From" fields in the message sources in my inbox:

From: "Patterson, Daniel@EDD" <[email protected]> (the offending example)
From: "[email protected]" <[email protected]>
From: Mads Martin Joergensen <[email protected]>
From: [email protected]
From: Arno van Amersfoort <[email protected]>

If there is a matching pair of <>, everything inside the "" (if they exist), or everything prior to < should be discarded. Or perhaps it would be better to simply scan the "From" field and first discard everything inside quotes, before searching it for an @?

As I see it, the problem isn't so much a bloated mailer (even though it probably is bloated), it's that the @ symbol is considered a valid character for the "name" field of many mailers' email account settings (and now I see Neale's reply that this is within the RFC's). I've just tested outlook express and mozilla thunderbird and both accepted @'s. I believe my user is using outlook. Theoretically, lots of mlmmj users and administrators - and not just ones using microsoft mailers - could run into this two-@'s-in-the-from-field snafu.

TIA,
Patrick

#14 lore raw
In reply to Patrick Bennett
Quoted 3 lines · Neale Pickett

This is perfectly valid according to both RFC 822 and RFC 2822, and parsing this as two addresses is an error. I'll work on a patch to correctly parse it, but I can't promise anything right away.

Perhaps the following will be of some assistance. I ripped the code from BSD's "mail" program.

Neale

/* Some crap from BSD mail to parse email addresses */

/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
char *skin(char *);

/*
* Start of a "comment".
* Ignore it.
*/
char *
skip_comment(cp)

        char *cp;
{
        int nesting = 1;

        for (; nesting > 0 && *cp; cp++) {
                switch (*cp) {
                case '\\':
                        if (cp[1])
                                cp++;
                        break;
                case '(':
                        nesting++;
                        break;
                case ')':
                        nesting--;
                        break;
                }
        }
        return (cp);
}

/*
* Skin an arpa net address according to the RFC 822 interpretation
* of "host-phrase."
*/
char *
skin(name)

        char *name;
{
        char *nbuf, *bufend, *cp, *cp2;
        int c, gotlt, lastsp;

        if (name == NULL)
                return (NULL);
        if (strchr(name, '(') == NULL && strchr(name, '<') == NULL
            && strchr(name, ' ') == NULL)
                return (name);

        /* We assume that length(input) <= length(output) */
        if ((nbuf = malloc(strlen(name) + 1)) == NULL)
                err(1, "Out of memory");
        gotlt = 0;
        lastsp = 0;
        bufend = nbuf;
        for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) {
                switch (c) {
                case '(':
                        cp = skip_comment(cp);
                        lastsp = 0;
                        break;

                case '"':
                        /*
                         * Start of a "quoted-string".
                         * Copy it in its entirety.
                         */
                        while ((c = *cp) != '\0') {
                                cp++;
                                if (c == '"')
                                        break;
                                if (c != '\\')
                                        *cp2++ = c;
                                else if ((c = *cp) != '\0') {
                                        *cp2++ = c;
                                        cp++;
                                }
                        }
                        lastsp = 0;
                        break;

                case ' ':
                        if (cp[0] == 'a' && cp[1] == 't' && cp[2] == ' ')
                                cp += 3, *cp2++ = '@';
                        else
                        if (cp[0] == '@' && cp[1] == ' ')
                                cp += 2, *cp2++ = '@';
                        else
                                lastsp = 1;
                        break;

                case '<':
                        cp2 = bufend;
                        gotlt++;
                        lastsp = 0;
                        break;

                case '>':
                        if (gotlt) {
                                gotlt = 0;
                                while ((c = *cp) != '\0' && c != ',') {
                                        cp++;
                                        if (c == '(')
                                                cp = skip_comment(cp);
                                        else if (c == '"')
                                                while ((c = *cp) != '\0') {
                                                        cp++;
                                                        if (c == '"')
                                                                break;
                                                        if (c == '\\' && *cp != '\0')
                                                                cp++;
                                                }
                                }
                                lastsp = 0;
                                break;
                        }
                        /* FALLTHROUGH */

                default:
                        if (lastsp) {
                                lastsp = 0;
                                *cp2++ = ' ';
                        }
                        *cp2++ = c;
                        if (c == ',' && *cp == ' ' && !gotlt) {
                                *cp2++ = ' ';
                                while (*++cp == ' ')
                                        ;
                                lastsp = 0;
                                bufend = cp2;
                        }
                }
        }
        *cp2 = '\0';

        if ((cp = realloc(nbuf, strlen(nbuf) + 1)) != NULL)
                nbuf = cp;
        return (nbuf);
}

/* This part was written by Neale Pickett <[email protected]>.
*
* I guess I'll release it for distribution under the same terms as BSD
* mail.
*/
#ifndef GOOB
void
tryit(char *str)
{
char *foo;

printf("Trying \"%s\"...\t", str);
foo = skin(str);

  if (0 != strcmp(foo, "[email protected]")) {
    printf("returned %s.  No good.\n",
           foo);
    exit(1);
  } else {
    printf("Bitchen.\n");

}
free(foo);
}

int
main()
{
char *foo;

  tryit("[email protected]");

  tryit("Neale Pickett <[email protected]>");
  tryit("\"Neale Pickett\" <[email protected]>");
  tryit("\"Neale Pickett@woozle\" <[email protected]>");

  tryit("[email protected] (Neale Pickett)");
  tryit("[email protected] (Neale \"Crashmaster\" Pickett)");
  tryit("[email protected] (Neale Pickett@woozle)");

  tryit("neale(I am such a badass)@woozle.org");
  tryit("neale(\"The Man\")@woozle(not heffalump).org (Neale Pickett@woozle)");

  printf("Everything worked.  Congratulations.\n");

return 0;
}
#endif