Zhiliang wrote ..
> I wonder which part of the
> smartlist converts mordern mails to old fashioned plain text(?),
It doesn't. It treats "modern mails" the same way it treats "antique mails;" as a stream. If you want only plain-text mails in your list, you need to reject or convert multipart outside of SmartList. (Well, ok, you can call your rejection or conversion routine, like the demime perl script, from any of the rc.submit.* you want, but I mean that SmartList cannot natively change multipart to plain text. Truth is, IMHO, one of the things that makes it such an excellent tool even now is that it _doesn't_ munge the body.)
> and if I
> can take that part out (e.g. is it in "rc.submit"? etc).
There's nothing to remove. SmartList is working exactly as-designed; passing the message on to the list mostly the way it found it (header changes notwithstanding).
Charlie
I have a new list, that turns all attachable parts/hyper text to plain
text into the mail body (see lower part for an example). I did an
experiment, using procmailrc code to only forward to a list of emails with
! `cat listfile`
which passes the mails with multi-parts well. I wonder which part of the
smartlist converts mordern mails to old fashioned plain text(?), and if I
can take that part out (e.g. is it in "rc.submit"? etc).
Thanks,
Zhiliang
-------------
-- example --
-------------
--_004_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_
Content-Type: multipart/alternative;
boundary="_000_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_"
--_000_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
......................
mail body text
...........................
--_000_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word"
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
xmlns=3D"http://www.w3.org/TR/REC-html40">
...................................
mail body hyper text
......................................
</body>
</html>
--_000_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_--
--_004_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_
Content-Type:
application/vnd.openxmlformats-officedocument.wordprocessingml.document;
name="2014 NRSP 8 Leadership.docx"
Content-Description: 2014 NRSP 8 Leadership.docx
Content-Disposition: attachment; filename="2014 NRSP 8 Leadership.docx";
size=19737; creation-date="Mon, 17 Mar 2014 13:42:32 GMT";
modification-date="Mon, 17 Mar 2014 13:42:32 GMT"
Content-ID: <814DB34A2C17E0419B28190B2C5E44B5(a)mail.iastate.edu>
Content-Transfer-Encoding: base64
UEsDBBQABgAIAAAAIQAk5ahdmwEAAJYGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAAC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
.................
coded lines
......................
--_004_4BBDE0AB525DA74BB64ABBFEA3F2C4B53A7CB7F1ITSDAG2Ditsiast_--
> Date: Fri, 01 Mar 2013 12:38:07 -0500 (EST)
> From: charlie(a)lofcom.com
> To: smartlist(a)lists.rwth-aachen.de
> Subject: Re: archive file name
>
> Zhiliang wrote ..
>
>> I seem to remember there used to be a mail header on SmartList out-going
>> mails to show the path/file_name (usually a number) of the archived copy
>> of the mail, but cannot find how to make it appear from all online FAQs
>> and other available documentations. I may have overlooked somewhere?
>
> For digest: X-Mailing-List: <$listaddr> archive/volume$Year/$Issue
>
> For standard mail, check rc.submit, and the $ARCHIVE variable:
> X-Mailing-List: <$listaddr> $ARCHIVE.
> Should be available by rc.local.submit.20.
>
> Charlie
I realize I was deleting all "X-" headers - that's why I don't find it any
more. As I lifted that I was able to trace from "X-Mailing-List" as you
have described. For some reason I was able to get the variable $ARCHIVE
not in rc.local.s20 but in rc.local.s30, which is included right after
"# Main header munger" section in rc.submit
Tried to see how $ARCHIVE is generated in .bin scripts - don't have luck.
But anyway I got what I need. Thank you and have a nice weekend!
Zhiliang
Zhiliang wrote ..
> I seem to remember there used to be a mail header on SmartList out-going
> mails to show the path/file_name (usually a number) of the archived copy
> of the mail, but cannot find how to make it appear from all online FAQs
> and other available documentations. I may have overlooked somewhere?
For digest: X-Mailing-List: <$listaddr> archive/volume$Year/$Issue
For standard mail, check rc.submit, and the $ARCHIVE variable: X-Mailing-List: <$listaddr> $ARCHIVE. Should be available by rc.local.submit.20.
Charlie
I seem to remember there used to be a mail header on SmartList out-going
mails to show the path/file_name (usually a number) of the archived copy
of the mail, but cannot find how to make it appear from all online FAQs
and other available documentations. I may have overlooked somewhere?
My actual need is to bring the archive path/file information into the
mail body, with an inserted line saying how to access an online copy if
the mail body contains truncated URL or in bad formats. Any hint to get
that info would be much appreciated.
Thanks!
Zhiliang
ps: This list has been quiet. It appears there are not many enthusiastic
new users any more?
I have a recipe in Smartlist to save certain mails to a directory in MH
format (yyyy/.). I had the Smartlist to create this directory upon this
recipe. Everything went fine.
In addition, I need to also save certain mails into this same directory in
the MH format from recipes in my personal .procmailrc (/path/to/yyyy/.).
I made sure my account has proper group permissions (770; my account is
on its group; I manually tested) to write into this directory. However,
the process of my account .procmailrc generates following errors:
procmail: Unable to treat as directory "/var/slist/xxx/yyyy"
procmail: Assigning "LASTFOLDER=/var/slist/xxx/yyyy"
procmail: Opening "/var/slist/xxx/yyyy"
procmail: Error while writing to "/var/slist/xxx/yyyy"
In the meanwhile the Smartlist saves into the MH directory still fine. I
wonder what could be the problem?
Zhiliang
On Tue, 21 Sep 2010, Richard Ball wrote:
> Date: Tue, 21 Sep 2010 13:04:21 -0400
> From: Richard Ball <rgball(a)ellerbach.com>
> To: smartlist(a)lists.RWTH-Aachen.DE
> Subject: Re: demime.pl related problem
>
> On 21-9-2010 12:44, Zhiliang wrote:
>> I have "demime.pl" working fine on my list for a while, except once a
>> while some spam mail cause this error to appear in a mail to the
>> listmaster:
>>
>> 450 Lynx formatting failed: open3: exec of lynx --stdin
>> --dump --force_html --hiddenlinks=ignore --localhost
>> --image_links --nolist --noredir --noreferer --realm
>> failed at /var/list/bin/demime.pl line 1519
>>
>> I could't figure out why and I was not really bothered as long as normal
>> mailing works fine and the spam is filtered out. Now something weird
>> happened -- upon a normal post by a legitimate user, the Smartlist
>> completely replaced the mail body with this error line to have posted to
>> the list.
>>
>> Could anyone help for hints what could be wrong?
>>
>> FYI - the demime.pl recipe is the very first before all others in
>> rc.local:
>>
>> :0 fw
>> | /var/list/bin/demime.pl -
>>
> That looks like a lynx error so I'd start by running the original
> message through lynx and see if you can work out why it is having a
> formatting problem.
>
> You could also try replacing the lynx call with one to elinks (or w3m)
> and see if that works better for the problem messages.
>
> Mind you, I don't use smartlist nor demime nor lynx etc. any more so
> your mileage may vary :-)
>
> Rich
You mean the (old) text-only linux browser "lynx"? I don't have it on the
system (probably that's why!). I only looked for "open3" from its
depenecies :-|
Wonder why "demime.pl" needs to make http calls... I may need to look for
a replacement for "demime.pl".
Thank you for suggestions on elinks etc. That's useful!
Zhiliang
I have "demime.pl" working fine on my list for a while, except once a
while some spam mail cause this error to appear in a mail to the
listmaster:
450 Lynx formatting failed: open3: exec of lynx --stdin
--dump --force_html --hiddenlinks=ignore --localhost
--image_links --nolist --noredir --noreferer --realm
failed at /var/list/bin/demime.pl line 1519
I could't figure out why and I was not really bothered as long as normal
mailing works fine and the spam is filtered out. Now something weird
happened -- upon a normal post by a legitimate user, the Smartlist
completely replaced the mail body with this error line to have posted to
the list.
Could anyone help for hints what could be wrong?
FYI - the demime.pl recipe is the very first before all others in
rc.local:
:0 fw
| /var/list/bin/demime.pl -
Thank you,
Zhiliang
Good day all!
We are getting an error in the logs:
../.bin/extraddr: subscription request from who(a)domain.tld
who(a)domain.tld - assigned cookie s03261058491490
sed: -e expression #1, char 4: Unexpected ','
Would this refer to the comma in the maxcookies line near the bottom of
confirm_add? How to fix?
$cat $confirmtxt
$echo ""
$rm -f _dummy_ `$ls -td cookies/* | $sed -e '1,'$maxcookies' d' `
$sed -e 's/^/>/' $tmprequest
) | $SENDMAIL $sendmailOPT $authaddr
I don't know enough about sed (find all shell hard to grasp), but other
programming experience tells me the two sets of ' are ambiguous or
confusing. Is this what was meant - a delet range 1-to-maxcookies - okay to
drop the inner quotes?
$sed -e '1,$maxcookies d'
Many thanks in advance for any assistance.
Jo
Jim, Bart, Cary,
Thanks for the responses. I had to be away for a couple of days to take
care of other stuff, which had the benefit of giving me some distance
from the problem, too.
Yes, it appears to be related to the match operator and greedy/stingy
behavior.
Here is a solution I've come up with which *SEEMS* to work:
:0 fhw
* ^content-type:(.*\<)?multipart.*\<(boundary=\/[^"; ]+|
boundary="\/[^"; ]+)
{
TESTVAR = $MATCH
}
Since I have two mutually exclusive cases, quoted and unquoted, only one
of the two branches will match at any time:
boundary=\/[^"; ]+ or boundary="\/[^"; ]+
For a quoted string, the first branch will stop matching on the first
character after the \/, but the second branch should match until the
trailing double-quote is reached.
For an unquoted string, the first branch matches the complete boundary
string, while the second branch will not match to the left of the \/.
It works on well behaved samples with both quoted and unquoted boundary
strings but doens't handle all possible whitespace characters after the
string.
I could try to create a [...] expression with all possible characters
(except ; and " and <space>), but it would break if I miss even one
oddball character that might turn up in a boundary string. The following
looks to be adequate after analyzing a few thousand recent list mails
and testing with several clients and webmail systems...
[-+=/_.:A-Za-z0-9]
Substituting this positive bracket expression in the above recipe
(twice!) seems to work decently well as long as the strings behave
themselves.
Instead of this, it would make the most sense to match anything except
double-quote, semi-colon, or whitespace, except that we don't seem to be
allowed to use control characters, POSIX character classes or shortcuts
( e.g.: [:space:] or \s ) inside bracket expressions in procmail? This
seems to be impossible to do:
[^";<something that stands for all whitespace characters>]
I wish I could understand why?
Cary, you say that procmail doesn't allow escaping of control
characters. Does that mean things like \f \n \r \n \t \v will not be
understood in any context? Or just inside bracket expressions? Can you
or anyone point me to where that's documented, please?
Thanks,
Mike D.