Re: Inconvenient Signature Requirements
On Tue, May 05, 2020 at 12:12:18PM -0500, Kevin Monceaux wrote: > On Tue, May 05, 2020 at 09:36:09AM -0500, Kevin Monceaux wrote: > > > With those pointers and Bing, I found that recent versions of Mutt have an > > example contrib/markdown2html python script in the source tarball that looks > > like it should be easily adaptable to do what I need. I'm not a Python fan, > > so I may eventually convert it to Perl, but it will get me started. > > It works!! Thanks to everyone for the suggestions. > > On top of the signature nit-picking my supervisors insist on top-posting > with no trimming when replying to e-mails. Now I have one of them > complaining that my signature is at the bottom of my e-mails instead of > between my reply and the quoted text. They're driving me crazier. > I actually had a script for reversing upside down E-Mails, within the development teams I was regarded as a bit odd wanting to be able to read from top to bottom of a thread to follow a discussion but I was at least tolerated! :-) -- Chris Green
Re: Inconvenient Signature Requirements
On Tue, May 05, 2020 at 09:36:09AM -0500, Kevin Monceaux wrote: > With those pointers and Bing, I found that recent versions of Mutt have an > example contrib/markdown2html python script in the source tarball that looks > like it should be easily adaptable to do what I need. I'm not a Python fan, > so I may eventually convert it to Perl, but it will get me started. It works!! Thanks to everyone for the suggestions. On top of the signature nit-picking my supervisors insist on top-posting with no trimming when replying to e-mails. Now I have one of them complaining that my signature is at the bottom of my e-mails instead of between my reply and the quoted text. They're driving me crazier. -- Kevin http://www.RawFedDogs.net http://www.Lassie.xyz http://www.WacoAgilityGroup.org Bruceville, TX What's the definition of a legacy system? One that works! Errare humanum est, ignoscere caninum.
Re: Inconvenient Signature Requirements
Jens, On Tue, May 05, 2020 at 02:47:42PM +0200, Jens John wrote: > Current mutt has a convenient option for this, $send_multipart_alternative: > You should be able to get done what you want by implementing a > $send_multipart_alternative_filter (for the protocol see man muttrc) that > converts the message to proper HTML markup (including ) and includes > the signature snippet. If the signature contains image data, it is > possible to inline the image data into the HTML by using the > src=data:image/jpeg;base64 attribute of the tag. This saves you from > having to inject extra attachments with certain content dispositions into > the message, and allows you to keep the filter clean from side effects. With those pointers and Bing, I found that recent versions of Mutt have an example contrib/markdown2html python script in the source tarball that looks like it should be easily adaptable to do what I need. I'm not a Python fan, so I may eventually convert it to Perl, but it will get me started. -- Kevin http://www.RawFedDogs.net http://www.Lassie.xyz http://www.WacoAgilityGroup.org Bruceville, TX What's the definition of a legacy system? One that works! Errare humanum est, ignoscere caninum.
Re: Inconvenient Signature Requirements
On Mon, 4 May 2020, at 22:54, Kevin Monceaux wrote: > My employer is trying to force me to downgrade to Outlook. One of the > powers that be came up with the brilliant idea of having a standard company > signature, with logo, specific font requirements, etc. Is there any way to > include such a signature in e-mails sent from mutt? Sadly, I suspect I > already know the answer. Note that in order to include such a signature, you'll also need to send the email as text/html. When composing a text/plain email and sending it, you then seem to need to generate a text/html MIME object and insert it into a multipart/alternative container. The recipient then will have the choice and see either the corporate design HTML or plain text (MUA will likely prefer the HTML version). Current mutt has a convenient option for this, $send_multipart_alternative: > If set, Mutt will generate a multipart/alternative container and an > alternative part using the filter script specified in > $send_multipart_alternative_filter. See the section “MIME > Multipart/Alternative” (alternative-order). You should be able to get done what you want by implementing a $send_multipart_alternative_filter (for the protocol see man muttrc) that converts the message to proper HTML markup (including ) and includes the signature snippet. If the signature contains image data, it is possible to inline the image data into the HTML by using the src=data:image/jpeg;base64 attribute of the tag. This saves you from having to inject extra attachments with certain content dispositions into the message, and allows you to keep the filter clean from side effects. This could be done real quick using Python; though I can also think of getting this done elegantly using pandoc: You'd specify the input format to be markdown, rst or similar, and pandoc will then emit HTML markup with paragraph markers etc, and your signature can be appended to the output file using a footer. Using pandoc with a HTML5 template file would be even simpler than piling up the command line switches; the template could look as simple as (first two lines are $send_multipart_alternative_filter protocol) > text/html > > $body$ > $for(include-after)$ > $include-after$ > $endfor$ and as part of the include-after, pandoc will append any HTML snippet(s) you specify using --include-after-body= to the output as-is. Since pandoc works fine with reading from stdin and writing to stdout, this could make for a clean solution. pandoc has documentation as good as mutt so it should be easy to find your way around it. You'd have two changes: implementing the filter, and possibly a change in style how you format your messages (because Pandoc needs a recognizable markup input format) to match markdown, rich structured text, asciidoc etc.
Re: Inconvenient Signature Requirements
Kevin Monceaux wrote: > Mutt Fans, > > My employer is trying to force me to downgrade to Outlook. One of the > powers that be came up with the brilliant idea of having a standard company > signature, with logo, specific font requirements, etc. Is there any way to > include such a signature in e-mails sent from mutt? Sadly, I suspect I > already know the answer. > > -- > > Kevin > http://www.RawFedDogs.net > http://www.Lassie.xyz > http://www.WacoAgilityGroup.org > Bruceville, TX > > What's the definition of a legacy system? One that works! > Errare humanum est, ignoscere caninum. Hi Kevin, I assume that the signature and sig_dashes .muttrc variables only work with plain text signatures. I suspect that you could arrange this by having the signature as an html file, defining a macro to attach it (with inline disposition), and then either using the macro keystroke manually when appropriate, or creating a send-hook to "push" the macro keystroke into the keyboard buffer (but this will probably only work if you can set up a pattern in the send-hook for all recipient domains that would require the signature). Good luck. cheers, raf
Re: Inconvenient Signature Requirements
On Mon, May 04, 2020 at 03:54:09PM -0500, Kevin Monceaux wrote: > My employer is trying to force me to downgrade to Outlook. One of the > powers that be came up with the brilliant idea of having a standard > company signature, with logo, specific font requirements, etc. Is > there any way to include such a signature in e-mails sent from mutt? I don't know the answer to your question, but I do know that you have my utter sympathy. -- A: When it messes up the order in which people normally read text. Q: When is top-posting a bad thing? () ASCII ribbon campaign. Please avoid HTML emails & proprietary /\ file formats. (Why? See e.g. https://v.gd/jrmGbS ). Thank you.