[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pan-users] Sending attachments
From: |
Duncan |
Subject: |
Re: [Pan-users] Sending attachments |
Date: |
Fri, 16 Oct 2015 10:47:47 +0000 (UTC) |
User-agent: |
Pan/0.140 (Chocolate Salty Balls; GIT c9c83f3) |
Camaleón posted on Thu, 15 Oct 2015 17:40:26 +0000 as excerpted:
> Hello,
>
> Using Debian Wheezy and Pan 0.139.
>
> When sending an attachment file ("es.po¹" and also "es.tar.gz²") to a
> mailing list by means of Gmane, the file lands into the list corrupted.
> I used the [+] symbol to add files in the queue.
>
> Any advice about the right way for sending attachments (plain text
> and/or binary files) with Pan?
>
> ¹https://lists.debian.org/debian-l10n-spanish/2015/10/msg00051.html
> ²https://lists.debian.org/debian-l10n-spanish/2015/10/msg00054.html
Those aren't corrupted files, as pan sends them anyway. They're simply
encoded using yenc, which was designed as a much more efficient encoder
of binary files (near-binary encoding with an overhead of ~5%) than
either base64 or uuencode (both of which have an encoding overhead of
33%, four bytes of text encoding for three bytes of binary file), by
taking advantage of the fact that the news server transmission and
peering paths were generally 8-bit-clean, with the noted exception of the
crlf line termination sequence.
Email protocols, specifically SMTP, OTOH, are not considered 8-bit clean
by standard (tho in practice they often are today), and the standards
contain many compromises that allow mail to work over only 7-bit-ASCII-
safe transmission paths, even tho they're mostly 8-bit-clean today.
As a result, while the attachment was transmitted y-encoded (aka yenc),
and very likely the attachment actually arrived uncorrupted in most
mailboxes because the mail transmission paths do tend to be generally 8-
bit-clean today as well, most mail clients don't have the y-decoding
ability that pan and other good binary-targeted news-clients have, and
would thus see even an uncorrupted y-encoded attachment as corrupted
unencoded text, instead.
Put it this way. There have been times when people using pan or other
yenc-attaching news clients have posted to gmane, and using pan to fetch
the messages on the gmane news interface after they've round-tripped thru
the list and back to gmane, I've been able to save the attachments off
uncorrupted. That means they were sent correctly, and the gmane to
listserv relay along with the listserv back to mailboxes including the
one gmane uses, didn't corrupt the attachments.
But few if any people using mail-only clients, or even clients that could
handle news but weren't designed to handle yenc, could make any sense of
the attachments at all -- to them, they appeared corrupted, even if they
weren't, as proven by the fact that I could save them off properly using
pan.
Of course by the time that attachment is further transferred thru the
mail to web gateway, where it can be linked in http or https form, on
lists.debian.org, or on the gmane web interface, the attachments may
indeed be corrupted, as the mail to web gateway may well corrupt them.
OK, be that as it may, what to actually /do/ about it? How to send
attachments that those using traditional mail clients, etc, can read?
Basically, since pan only does yenc attachments, you can't use pan's
attachment mechanism when sending to what is actually a mailing list,
just gatewayed thru gmane, etc. There are, however, a number of
alternatives that work, letting you pick the one that works best for you.
Likely the easiest for many is to remember how pan behaves when you send
a reply directly to the author, instead of replying to the "group", and
use that.
Basically, assuming pan is setup correctly so it knows how to invoke your
mail client, when replying to author, pan lets you compose your reply in
pan as you normally would, but then, when you hit send, it opens your
mail client's message composer, with the message you composed in pan
preloaded.
Once your mail client's compose window is open, you can tweak the message
further if desired, then hit send in your mail client, and it'll send the
message by mail to the author, as it normally would have done had you
composed the message in the mail client in the first place.
The idea here is that back in pan, you act like you're replying to author
instead of to the list. Except that, instead of using the author's email
address, you put the email address of the list itself. (If you don't
know it, it's generally in the headers. Expand the headers, find it
there, and you can normally select and paste it into mailto.)
Actually, many lists already are setup so that if you hit reply to
author, it replies to list instead. But some aren't, so you can't count
on it. Check, and change the mailto to the list address if necessary.
Do *not* attach your file at this time.
Make sure the newsgroups line is blank, so you don't end up double-
posting, once via gmane and once via direct mail, and hit send.
As I said, it should then open the message in your mail client's compose
window for further editing. Once in the mail client, attach the files
and make any further tweaks to the message (like eliminating the double-
sig, if both pan and your mail client applied their usual sig) as desired.
Then, with the files attached in the /mail/ client, not in pan, and
sending direct to the list address via mail, not via pan and gmane, hit
send in the mail client, and let the usual mail thing work.
Alternatively, do effectively the same thing manually, by opening your
mail client's compose window and doing the message there, copying in the
quote, etc, if necessary, from pan, instead of using pan's message window
to send it to the mail client.
Alternatively, use separate encoding tools to do what you need, pasting
the pre-encoded text directly into the pan message window and sending it
using pan via gmane as you normally would.
The two most common encoding options, as mentioned above, are base64, and
uue. Base64 is the most commonly used these days, as it's a part of the
MIME internet mail standards, which encode attachments as separate parts,
one for text/plain, perhaps another for text/html, and one each for each
attachment. However, because MIME uses these separate parts and pan has
no mechanism for setting up the separate parts, this doesn't work well in
pan.
So you're left with UUE, which can be pasted directly into the message
body as encoded text.
But you need a separate tool to generate that encoded text. One of the
more common tools is UUDeview, which includes the uudeview binary to
decode attachments, and the uuenview binary, to encode them. We'll be
encoding so it'll be uuenview.
uuenview can actually encode in yenc, base64, or uue. UUE, the -u
option, is what we want, for the reasons explained above.
uuenview -u file
... should uu-encode the given file and spit out the result on STDOUT.
If you need more detail, read the manpage.
You can then paste that result directly into the message body window,
obviously keeping it on its own lines separate from any real text message.
You might want to try doing this with a couple messages either to a test
group, or using your mail client, emailing them to yourself, until you
are sure the attachments are working as intended, showing up on the
receiving side as attachments, not as the gibberish in the text message
that by now you know them to actually be, etc.
Once your tests are working, /then/ send your first real manual
attachment to the list. =:^)
Another alternative (actually two). Quite some years ago now, I coded up
a couple little scripts to help automate the otherwise manual encoding
and attachment process above. The first was a very rough proof-of-
concept that I posted, hoping someone that could code more than just bash
would run with the idea, but nobody did. So later, I added a real UI of
sorts, via another dependency. Both scripts are designed to be
configured as pan's external editor, so that hitting the run editor
button in pan's compose dialog will launch them. If either one is
launched from the console or a terminal window without parameters,
they'll spit out some help information explaining what they do, their
deps, how to setup and use them, etc.
The first is called pan-attach, and requires nothing but bash and
uuenview
(from the uudeview package, as above). No GUI. When invoked from pan,
it looks at the existing message as pan hands it to it, looking for %%
encoded commands as described in its help output. If it finds them, it
replaces them with the named file. As I said, very rough, no gui,
primarily proof of concept, but all it requires is uuenview and bash.
The second is called pan-attach-kd. This adds a GUI and dependency on
kdialog. Presumably those who prefer gtk/gnome can switch that to zenity
if desired, and I think some of my previous users did just that, but I
always used kdialog here.
When invoked from pan, it first pops up an encoding dialog with several
choices, uuencode, yenc, text/identity, pass-thru, help.
Help spits out basically the same thing that invoking it with no
parameters does, but this time in X window form.
uue and yenc encode the selected file and paste it into the body in
encoded form. Only uue works in modern pan, tho modern pan has yenc
builtin, so it doesn't need that anyway.
text/identity pastes the selected file as-is, assuming it's text. This
is useful for sending text files as part of the message as opposed to
actually attached.
pass-thru lets you pass thru to a real text editor or another utility, if
so configured. See the environment section of the help text for more on
that. (If none is configured, it simply pops up a dialog telling you
that.)
The one irritating thing about kdialog is that unlike most actual app
dialogs, it doesn't let you simply double-click to select and go on. You
must select, then hit OK...
If one of uue/yenc/identity are chosen, a file-picker dialog opens to let
you select the file. Once a file is selected and this window closes, the
selected file is encoded using the selected method, with the encoder
output pasted into the body window, below the sig.
I'll attach pan-attach-kd here. (I'm actually using it to do the
attachment, uue, pasting below the sig as it does. I've not actually
used it in quite awhile... tho it appears to still paste in the encoding
as expected. Hopefully clients still decode uue into attachments when
posted this way... Guess I'll find out if people start yelling that it
didn't work! =:^)
If anyone's actually interested in the much rougher pan-attach, perhaps
because it doesn't have the kdialog dependency, or maybe simply out of
curiosity, I can post it too, but I won't unless asked, as it really is
hard to use, even for me, its author. The kdialog version's far easier
to use, but of course comes with that dependency...
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard StallmanM
begin 700 pan-attach-kd
M(R$O8FEN+V)A<address@hidden(R!#;W!Y<FEG:'0@,C`P-B!*;VAN($1U;F-A;@HC($1E
M<VEG;F5D('1O(&5N86)address@hidden'1A8VAM96YT('=H96X@:6YV
M;VME9"!A<R!T:&address@hidden)address@hidden&address@hidden($%S('address@hidden(&ET(&UA
M>2!B92!D:7-T<FEB=71E9"!U;F1E<B!T:&4@<V%M92!L:6-E;G-E(&-O;F1I
M=&EO;G,L(&]R"B,@=6YD97(@=&AE('1E<FUS(&]F('1H92!'address@hidden)A
M;"!0=6)L:6,@3&EC96YS92!V,BXP(&]R(&AI9VAE<B`H870@>6]U<B!O<'1I
M;address@hidden(&AT='`Z+R]P86XN<F5B96QB87-E+F-O;2\@;W(@:'1T<#HO+W=W
M=RYG;G4N;W)G+VQI8V5N<V5S+V=P;"YH=&address@hidden<&%N+6%T=&%C
M:"UK9"(*5D524TE/3CTB,"XP+C(P,#8N,3`N,C,N,"(*0D]$649)3$4])'LQ
M.BTM:'T*"B,@3F5W('1H:7,@<F5L96%S93H*(R`J('address@hidden
M86-H;65N="!P871H+"!C;W5R=&5S>2!"<G5N;address@hidden:2!';F5C8V\*
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,*(R!D97-C<FEP
M=&EO;B!A;F0@:&5L<`H*2$5,4#TB7&X*)$Y!344L('9E<G-I;VX@)%9%4E-)
M3TXL($-O<'ER:6=H="`R,#`V($IO:&address@hidden'5N8V%N7&X*/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/5QN
M"D1E<V-R:7!T:6]N.EQN"B1.04U%(&ES(&1E<VEG;F5D('1O(&5N86)L92!0
address@hidden'1A8VAM96YT('=H96X@:6YV;VME9"!A<R!I='-<;@IE>'1E
M<FYA;"!E9&ET;W(N("`D3D%-12!H87,@='=O(')E<75I<F5M96YT<address@hidden
M)W,@:address@hidden&X*=75E;G9I97<@9G)O;2!T:&address@hidden<@
M<&%C:address@hidden&AE(&AO;64@<&%G92!O9B!W:&EC:"!I<UQN"FAT='`Z+R]W
M=W<N9G!X+F1E+V9P+U-O9G1W87)E+U551&5V:65W+UQN"CT]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3U<
M;@I087)A;65T97)S.EQN"E-E="!004XG<R!E>'1E<FYA;"!E9&ET;W(@=&\@
M)$Y!344@)70N("@E="!I<R!T:&4@;F%M92!O9B!T:&5<;@IT96UP;W)A<GD@
M961I="!F:6QE(&%S('!A;B!P87-S97,@:address@hidden&address@hidden&AE(&5D:71O<BXI("`D
M3D%-12!T86ME<UQN"F]N;'address@hidden&AA="!S:6YG;&4@<&%R86UE=&5R+"!E:71H
M97(@=&AE(&9I;&address@hidden&%I;FEN9R!T:&address@hidden>2!T97AT7&X*87,@<&%S
M<V5D(&9R;address@hidden"!O<B`M:"!O<B`M+6AE;'address@hidden('1H:7,@=&5X="Y<
M;@H]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]7&X*16YC;V1I;F<@9&EA;&]G.EQN"D%F=&5R('-T87)T
M:6YG+"`D3D%-12!F:7)S="!A<VMS(&9O<B!T:&address@hidden;V1E('1Y<&4N7&X*
M2&5R92P@>6]U(&UA>address@hidden;F-O9&4L('EE;F,L(&]R('1E>'0O:61E
M;G1I='DL(&]R('-E;&5C=%QN"FAE;'`L('=H:6-H(&1I<W!L87ES('1H:7,@
M=&5X="P@;W(@<&%S<RUT:')U+"address@hidden:7)O;FUE;G0L(&)E;&]W+EQN
M"BAU=65N=FEE=R!D;V5S(&UI;address@hidden,@=V5L;"address@hidden('!A;B!W;W5L9"!H
M879E('1O('-U<'!O<G0@:address@hidden&]O+BE<;@address@hidden@,"XY,"!W
M;VY<)address@hidden&%K92!Y96YC(&%T('1H92!T:6UE(&]F('1H:7,@=W)I=&EN9R%<
M;@H]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]7&X*1FEL92!D:6%L;V<Z7&X*/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/5QN"D5N
M=FER;VYM96YT.EQN"EEO=2!C86X@<V5T('1H92!<)%!!3E]%1$E43U(@=F%R
M:6%B;&4@:68@>6]U(&1O;B=T('=A;address@hidden&address@hidden<"!Y;W5R7&X*<F5A
M;"!E>'1E<FYA;"!E9&ET;W(@9G5N8W1I;VYA;&ET>2X@($EF("1.04U%(&9I
M;F1S('1H870@<V5T(&%N9%QN"GEO=2!C:&]O<V4@<&%S<RUT:')U(&9O<B!Y
M;W5R(%PB96YC;V1I;F=<(BP@)address@hidden;"!P87-S+71H<G5<;@IT;R!T
M:&%T(&5D:71O<address@hidden:address@hidden,@7"1004Y?141)5$]2("5T+EQN(@H*(R!T
M97-T(&9O<B!N;R!P87)A;65T97(L(&]R(&address@hidden:"`M:"!O<B`M
M+6AE;'`*6R`B)$)/1%E&24Q%(B`]("(M:"(@+6\@(B1"3T191DE,12(@/2`B
M+2UH96QP(B!=("8F(&5C:&address@hidden@)$A%3%`@)address@hidden($EF(&MD:6%L
M;V<@:7-N)W0@:address@hidden&AE('!A=&@L(&EN=F]K92!H96QP(&%N9"!E>&ET+"!S
M;R!W92!K;F]W(&ET(&ES(&%F=&5R('1H:7,N"FMD:6%L;V<@+78@,3XF+2`R
M/B8M('Q\('address@hidden;R`M92`D2$5,address@hidden@?0H*(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,*(R!&:7)S="!D:6%L;V<L(&5N8V]D
M:6YG"F5?9&EA;&]G("@I('L*("!L;V-A;"!04D]-4%0](D-H;V]S92!A;B!E
M;F-O9&EN9R!O<B!P87-S+71H<G4@;W(@:&5L<"`@("`@("`@("`@("`@("`@
M("`@("`@("`@("`@(@H@(&QO8V%L('EE;F,](GEE;F,@*&YO="!O;B!N97<@
M<&%N*2(*("!%3D-/1$4])"AK9&EA;&]G("TM=&ET;&4@)address@hidden
M("(D4%)/35!4(B!U('5U96YC;V1E('D@(B1Y96YC(B!T('1E>'0O:61E;G1I
M='D@<"!P87-S+71H<G4@:"!H96QP*2!\?"!E>&ET"GT*"B,@address@hidden"!T
M;R!L;V]P(&]N('1H:7,@9&EA;&]G(&%S(&QO;F<@87,@=&AE>2!S96QE8W0@
M:&5L<"address@hidden/1$4]:`IW:&EL92!;("(D14Y#3T1%(B`](")H(B!=.R!D
M;PH@(&5?9&EA;&]G"B`@:address@hidden)$5.0T]$12(@/2`B:"(@72`[('1H96X*
M("`@(&MD:6%L;V<@+2UT:71L92`D3D%-12`M+6US9V)O>"`B)"AE8VAO("UE
M("(D2$5,4"(I(@H@(&9I"F1O;F4*"G5N<V5T("UF(&5?9&EA;&]G"B,@3TLL
M("1%3D-/address@hidden;"!N;W<@8F4@;VYE(&]F('4O=75E+"!Y+WEE;F,L('0O
M=&5X="P@;W(@<"]P87-S+71H<G4*"B,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C"B,@5&AI<R!S96-T:6]N(&EN=F]K97,@:&5L<"!A;F0@
M97AI=',@:address@hidden&AE(&9I<G-T('!A<F%M971E<@HC(&ES;B=T(&%N(&5X:7-T
M:6YG(')E9W5L87(@9FEL92!W:71H(')W('!E<address@hidden<&%R86U?9F%I;"`H
M*2E9F]R92!E>&ET:6YG/R(*
M("!K9&EA;&]G("TM=&ET;&4@)address@hidden)N:6YG8V]N=&EN=65C86YC
M96P@(B1F86EL8F5G:6X@)&9A:6QT>7!E("1F86EL96YD(B!\?"!E>&ET"B`@
M:V1I86QO9R`M+71I=&QE("1.04U%("TM;7-G8F]X("(D*&5C:&address@hidden@(B1(
M14Q0(BDB"address@hidden"`@"GT*"F9A:6QT>7!E/6YO;F4*6R`A("UW("1"3T19
M1DE,12!=("8F(&9A:6QT>7!E/7=R:71A8FQE"EL@(2`M<B`D0D]$649)3$4@
M72`F)B!F86EL='EP93UR96%D86)L90I;("address@hidden@)$)/1%E&24Q%(%T@)B8@
M9F%I;'1Y<&4]<F5G=6QA<@I;("$@(B1F86EL='EP92(@/2`B;F]N92(@72`F
M)B!P87)A;5]F86EL"G5N<V5T(&9A:6QT>7!E(address@hidden@<&%R
M86U?9F%I;`H*(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,*
M(R!4:&ES('-E8W1I;address@hidden&5A;',@=VET:"!P87-S+71H<G4N"@II9B!;("(D
M14Y#3T1%(B`](")P(B!=.R!T:&5N"B`@:address@hidden>"`B)'M004Y?141)5$]2
M?2(@address@hidden&AE;@H@("address@hidden>U!!3E]%1$E43U)]("1[0D]$649)3$5]
M"address@hidden@("address@hidden,4#TB3F\@<&%S<RUT:')U(&5D:71O<B!S970A7&X*
M("`@($EF('EO=2!W86YT('1O('!A<W,@=&AR;W5G:"!T;R!A;B!E>'1E<FYA
M;"!E9&ET;W(@;V8@>6]U<B!C:&]I8V4L7&X*("`@('-E="!A;address@hidden;W)T
M('1H92!<)%!!3E]%1$E43U(@=F%R:6%B;&address@hidden<F]P<FEA=&5L>address@hidden
M7&X*("`@("1.04U%(&-A;B!C86QL(&ET("AA<R!<)%!!3E]%1$E43U(@)69I
M;&4I+B(*("`@(&MD:6%L;V<@+2UT:71L92`D3D%-12`M+65R<F]R("(D2$5,
M4"(*("`@(&5X:70*("!F:0IF:0H*(R!/address@hidden('1H870G<R!L969T(&ES
M('1H92!R96%L(&5N8V]D:6YG(&-H;VEC97,L('4O=75E+"!Y+WEE;F,L(&%N
M9"!T+W1E>'0N"@HC(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(PHC(%-E8V]N9"!D:6%L;V<L('address@hidden&AE(&9I;&4H<RD*9E]D:6%L;V<@
M*"D@>PH@($%41DE,13TD*&MD:6%L;V<@+2UT:71L92`B071T86-H(&9I;&4@
M+2`D3D%-12(@+2UG971O<&5N9FEL96YA;address@hidden"!E>&ET"GT*
M"F9?9&EA;&]G"@HC27,@)'M!5$9)3$5](&%C='5A;&QY(')E861A8FQE/R`@
M268@;F]T+"!E<G)O<B!O=70N"B,D>T%41DE,17T@<W!A8V4M<V%F92!W:71H
M('%U;W1E<address@hidden<G1E<address@hidden)U;address@hidden:2!';address@hidden,BD*
M=VAI;&address@hidden("UR("(D>T%41DE,17TB(%T[(&1O"B`@:V1I86QO9R`M+65R
M<F]R(")4:&address@hidden;W4@<V%I9"!T;R!A='address@hidden&X@)'M!5$9)3$5]
M7&address@hidden;B=T(')E861A8FQE(2(*("!F7V1I86QO9PID;VYE"@HC(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PHC($]++"!W92!K;F]W('1H
M92!A='1A8V@@9FEL92!I<R!R96%D86)address@hidden('=E(&MN;W<@=VAA="!E
M;F-O9&EN9R!T;R!U<V4L('-O+BXN"F5C:&\@/CX@)'M"3T191DE,17T*96-H
M;R`^/B`D>T)/1%E&24Q%?0HC)'M!5$9)3$5]('address@hidden:"!Q
M=6]T97,L(&-O=7)T97-Y($)R=6YO($)A<F)E<address@hidden("@R+S(I"G5U
M96YV:65W("TD>T5.0T]$17T@(B1[051&24Q%?2(@/CX@)'M"3T191DE,17T*
M"B,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C"B,@9&5B=6=G
M:6YG(&%I9',*(VMO;G-O;&address@hidden;V-L;W-E("TM;F]H:7-T("UE(&5C:&\@
;)`HC97AE8R!K=W)I=&4@)$)/1%E&24Q%"@H@
`
end