Discussion:
[bug-mailutils] sieve: malformed address when moving to
Sergey Poznyakoff
2016-12-26 22:06:03 UTC
Permalink
Hi Jean,

[Cc-ing to the list]

Thanks for the samples. I can confirm that I reliably get 'Malformed
email address' for two out of three messages in mailbox Safecharge.com.
The addresses are malformed indeed, as well as the messages themselves.
The problem with these messages is that they contain lines terminated
with CRLF (ASCII 13 10) characters insead of single LF (ASCII
10). Mailutils won't recognize such messages.

The same holds true for the second mailbox (PaySimple.com). In both
mailboxes in question, only the first message has properly terminated
lines and only this message is processed (I wonder what program could
have created such mailboxes).

There is nothing that can be done in that case, except making sure input
mailboxes are properly formatted (e.g. by filtering them through
tr -d '\r').

Another point: although I was able to reproduce the mailformed address
error, I wasn't able to reproduce the reported input mailbox
corruption. In both testcases, the malformed messages were retained in
the corresponding input mailboxes.

Regards,
Sergey
Jean Louis
2016-12-25 23:01:48 UTC
Permalink
Hello Sergey,

Those were mailboxes possibly created by Thunderbird, and later
converted by evolution to mboxes. One of those was making it that
way with lines terminating with CRLF, but I don't know which one. Some
mailboxes were standard, some not.

The evolution on its first run, starts converting mailboxes, so I
cannot recommend that software to anybody, for security reasons. I
have just tried running it, and now I have thousands of emails to sort
back.

By listening to your advice, I have now automatically converted
mailboxes with cat mbox | tr -d "\r" > new-mbox and processed
thousands of emails with the sieve.

The processing so far was almost perfect, as few of mailboxes still
remained unprocessed, and messages remained empty, with the original
date. Those are probably a problem on my side.

mutt was handling and reading those messages correctly.

I have spared a lot of time, I need to find out ways to donate for
this software.

Jean Louis
Post by Sergey Poznyakoff
Hi Jean,
[Cc-ing to the list]
Thanks for the samples. I can confirm that I reliably get 'Malformed
email address' for two out of three messages in mailbox Safecharge.com.
The addresses are malformed indeed, as well as the messages themselves.
The problem with these messages is that they contain lines terminated
with CRLF (ASCII 13 10) characters insead of single LF (ASCII
10). Mailutils won't recognize such messages.
The same holds true for the second mailbox (PaySimple.com). In both
mailboxes in question, only the first message has properly terminated
lines and only this message is processed (I wonder what program could
have created such mailboxes).
There is nothing that can be done in that case, except making sure input
mailboxes are properly formatted (e.g. by filtering them through
tr -d '\r').
Another point: although I was able to reproduce the mailformed address
error, I wasn't able to reproduce the reported input mailbox
corruption. In both testcases, the malformed messages were retained in
the corresponding input mailboxes.
Regards,
Sergey
Jean Louis
2016-12-25 23:36:27 UTC
Permalink
Just to confirm, I had to do tr -d "\r" even 2 times on many messages,
to get it to work.
Post by Sergey Poznyakoff
Hi Jean,
[Cc-ing to the list]
Thanks for the samples. I can confirm that I reliably get 'Malformed
email address' for two out of three messages in mailbox Safecharge.com.
The addresses are malformed indeed, as well as the messages themselves.
The problem with these messages is that they contain lines terminated
with CRLF (ASCII 13 10) characters insead of single LF (ASCII
10). Mailutils won't recognize such messages.
The same holds true for the second mailbox (PaySimple.com). In both
mailboxes in question, only the first message has properly terminated
lines and only this message is processed (I wonder what program could
have created such mailboxes).
There is nothing that can be done in that case, except making sure input
mailboxes are properly formatted (e.g. by filtering them through
tr -d '\r').
Another point: although I was able to reproduce the mailformed address
error, I wasn't able to reproduce the reported input mailbox
corruption. In both testcases, the malformed messages were retained in
the corresponding input mailboxes.
Regards,
Sergey
Loading...