Holy Grail (multipart/alternative + HTML + inline images + GPG)
Hi. This subject has been discussed many times over the years, and I'm having a go at it. Because mutt's native support for multipart/alternative seems insufficient for what I'm trying to achieve, I'm aiming to get this flow: 1) Use mutt (write text/plain mail, set mail headers (recipients, subject, others) and handle file attachments). 2) [Message pushed somewhere, via a mutt macro, that could save locally in a mailbox, or pipe to a file, or anything: mechanism does not really matter to me]. 3) Message is massaged by a script that rebuilds the MIME sections of the mail, adding a text/html section (transcoding text/plain via Markdown or other tool) and adding related HTML inline images (for signature). MIME structure becomes: - multipart/mixed - multipart/alternative - text/plain - multipart/related - text/html - inline image - attachments 4) Message returns to mutt, which handles GPG, archiving to appropriate Fcc, sending out for transport. Now my blocker comes from (4). No matter if I try to `recall-message` (Shift-R), `resend-message` (Esc-e) or mutt's `-H` option, the multipart/alternative part gets corrupted by mutt. I'm trying to tell mutt “Please just send it as it is”. `bounce-message` (b) leaves mail structure intact but of course modifies recipients. Any possible way to achieve that “send as is” behaviour, or do you guys know any patch in the wild that would allow that? Thanks, -- · Patrice Levesque · http://ptaff.ca/ · mutt.wa...@ptaff.ca -- signature.asc Description: Digital signature
Re: Holy Grail (multipart/alternative + HTML + inline images + GPG)
On 2017-01-25 07:55:05 Patrice Levesque hacked into the keyboard: > - multipart/mixed > - multipart/alternative > - text/plain > - multipart/related > - text/html > - inline image > - attachments Are you sure, you have closed every part properly? I do some things similary, BUT I use commandline tools, to create the multipart/alternative and then I move the complete file to the ~/Maildir/.Drafts/new/ folder, where mutt can find it if I recall a message. > Any possible way to achieve that “send as is” behaviour, or do you guys > know any patch in the wild that would allow that? You can use sendmail or ssmtp to send the file without using mutt. It is much easier, specially from a script. -- Michelle KonzackITSystems GNU/Linux Developer 0033-6-61925193 signature.asc Description: Digital signature
Re: Holy Grail (multipart/alternative + HTML + inline images + GPG)
>> [MIME message structure description] > Are you sure, you have closed every part properly? I used the swiftmailer library to construct the mail and mutt properly recognizes the parts when it receives the mail via a bounce, so I suspect the mail is well-formed but of course there might be subtleties. > I do some things similary, BUT I use commandline tools, to create > the multipart/alternative and then I move the complete file to > the ~/Maildir/.Drafts/new/ folder, where mutt can find it if I > recall a message. I'm happy it seems to work for you, and that the problem's probably in my chair. Would you be kind enough to send me a direct email to mutt.wa...@ptaff.ca using your method? That may help me figure out what's so different between your mail structure and mine. Just out of curiosity, when you recall the message, does the editor show only the text/plain part? It seems I always get an improperly unwrapped version of the multipart/alternative part. And when you exit the editor, are you saying all MIME parts left unchanged? > You can use sendmail or ssmtp to send the file without using mutt. It > is much easier, specially from a script. I get that, but I'd prefer dealing with GPG inside mutt, I want to avoid recreating mutt's perfectly fine interface for it (selecting keys for instance). Thanks, and have a nice day, -- · Patrice Levesque · http://ptaff.ca/ · mutt.wa...@ptaff.ca -- signature.asc Description: Digital signature
Re: Holy Grail (multipart/alternative + HTML + inline images + GPG)
On 2017-01-26 08:24:30 Patrice Levesque hacked into the keyboard: > I'm happy it seems to work for you, and that the problem's probably in > my chair. Would you be kind enough to send me a direct email to > mutt.wa...@ptaff.ca using your method? That may help me figure out > what's so different between your mail structure and mine. Currently not possibel, because the script is on my server @home which I can not access trough the Internet and I work currently 600km far away. > Just out of curiosity, when you recall the message, does the editor show > only the text/plain part? It seems I always get an improperly unwrapped > version of the multipart/alternative part. And when you exit the > editor, are you saying all MIME parts left unchanged? I see the text/plain part only. I can not edit the text/html part. Ehm yes, I get all parts presented and it looks like 8<-- From: linux4michelle To: admin Cc: Bcc: Subject: Only a test Reply-To: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="All_the_parts" Content-Transfer-Encoding: 8Bit This is a multi-part message in MIME format --All_the_parts Content-Type: multipart/alternative; boundary="Some_text"; --Some_text Content-Type: text/plain Hello World! --Some_text Content-Type: text/html Hello World! --Some_text-- --All_the_parts Content-Type: image/png; name="mutt.png" Content-Disposition: attachment; filename="mutt.png" Content-Transfer-Encoding: base64 --All_the_parts-- 8<-- > I get that, but I'd prefer dealing with GPG inside mutt, I want to avoid > recreating mutt's perfectly fine interface for it (selecting keys for > instance). > > > Thanks, and have a nice day, -- Michelle KonzackITSystems GNU/Linux Developer 0033-6-61925193 signature.asc Description: Digital signature
Re: Holy Grail (multipart/alternative + HTML + inline images + GPG)
Michelle, > Currently not possibel, because the script is on my server @home which > I can not access trough the Internet and I work currently 600km far > away. Would've been neat, but I think you gave me enough pointers so far that I can manage on my own for a bit. Thanks again for your time and extensive answers. -- · Patrice Levesque · http://ptaff.ca/ · mutt.wa...@ptaff.ca -- signature.asc Description: Digital signature