Re: time zone conversion

2012-01-23 Thread P. Mazart
Hi,

Sebastian Tramp schrieb am 23.01.2012 09:21:17:
> I'm looking for a way to convert the date header to my local time zone
> in the mail detail view. I'm aware of the index format %D option but
> need this for the (internal) pager.

Just noticed myself having this problem, too.
Thanks! :-) 

The only thing I can think of yet is using display_filter with an own 
script that uses formail or similar …

P.M.


Re: keep headers fixed in pager

2012-09-26 Thread P. Mazart
Hi,

steve schrieb am 26.09.2012 22:20:56:
> Is it possible, while reading a mail, to keep the headers fixed while 
> scrolling
> down the message? I experienced many times when I have to go back to the top 
> of
> the message to see who has been CCied for example. Keeping chosen headers 
> fixed
> would be really useful (in some circumstances).

Could maybe changing “pager_format” resolve your problem?

P.M.



Re: Android MUA does not display mail correctly because of Content-Disposition in header

2012-09-29 Thread P. Mazart
Hi,

Ambrevar schrieb am 28.09.2012 13:22:13:
> … [Content-Disposition-Header] …
> But I must disagree: a *lot* of people are using the stock MUA. Simply because
> they don't care. That's why this issue shouldn't be neglected.

I agree. But is this really a problem with mutt rather than android’s
stock MUA?

P.M.


Re: Forward message inline and attachments, attached.

2012-11-16 Thread P. Mazart
Hi Oscar,

Oscar Pereira schrieb am 16.11.2012 19:08:25:
> As it turns out, there is a workaround to this issue, which is to tag
> the attachments you want, and then hit ;f. This works, but is *really*
> cumbersome.

Can’t this be put into a macro somehow?

P.M.


Re: Help with mutt - sending mail with body as html with attachments

2013-10-08 Thread P. Mazart
Hello Cary,

> 1. Mail whose content is html - I can do this by specify -e "my_hdr
> Content-Type: text/html", and formatting the message as a pure html
> file, e.g. no extra headers.

I’m not entirely sure but I feel that it’s not too ideal 
to set the Content-Type via a my_hdr setting.

Maybe you can set a custom header like “x-change-to-html”, and apply a
hook running an  macro if this header is present?
Sounds more native to me. 

Regards,
P.M.



Re: Help with mutt - sending mail with body as html with attachments

2013-10-08 Thread P. Mazart
Hello again,

> Maybe you can set a custom header like “x-change-to-html”, and apply a
> hook running an  macro if this header is present?
> Sounds more native to me. 

Maybe this is even easier:
mutt -e 'set content_type="text/html"' -s 'Subject of your msg' 
spamreceipi...@server.gov -a attachment.pdf < message.html

Regards,
P.M.


Re: Automate standard replies

2021-03-21 Thread P. Mazart
Hi Francesco,

Francesco Ariis schrieb am 21.03.2021 12:15:23:
> Is there a way to one-button this? I thought about a macro,
> but I suspect that wouldn’t work, since I am firing up an
> editor.

You could do that with changing the editor then „editing“ then changing
the editor back to vim.

I do something similar with labeling a received email:
macro pager,index y "set editor=\"~/bin/editlabel 
append\"Nset 
editor=vim" "Append label"

(change editor, edit existing email on disk, sync-mailbox, set mail as new, 
change editor back to vim)

I guess you could what you want with vim/ex/sed/awk or else.

Also keep in mind that procmail may be able to automate this process
entirely.

Best Regards,
PM


Re: Automate standard replies

2021-03-26 Thread P. Mazart
Hello Cameron,

Very nice! Thank you for sharing!

Best Regards,
PM



Re: How to intercept recipient before reply, and before sending?

2021-06-30 Thread P. Mazart
Hi Jean,

we missed each other in IRC, so here’s my reply.

Jean Louis schrieb am 24.06.2021 15:36:10:
> Thus I would like to inject the ID number into the text before the
> reply. 

I think you could always create a {python,bash,ruby} script or c-program
and let it “mimic” an editor when you reply:

:macro index r "set 
editor=\"edit-id-then-reply.py\"set 
editor=\"vim\""

Once you hit your reply button »r« the editor is changed, started and
set back again. It could also start your favourite text editor.

e.g. you could use this as »edit-id-then-reply.py«:

#!/usr/bin/env python3

import sys
import subprocess

with open(sys.argv[1], 'a') as email_file:
email_file.write('Hello, I am your ID\n');

subprocess.run(['vim', sys.argv[1]]);

This would open the filename of the reply-email, then read it and change
some of its content (e.g. insert user id), then start your text editor so
you can type your reply.

> Is there a way to intercept the recipient's address, like making a
> macro for the `y' key binding?

Similar to the above, you could create a sendmail-compatible wrapper,
that does the interception and later actually runs sendmail or msmtp or
else.

Best Regards,
PM



Re: How to intercept recipient before reply, and before sending?

2021-06-30 Thread P. Mazart
Hi Jean,

Jean Louis schrieb am 30.06.2021 17:52:55:
> That is good idea. It is nice hack. Intercept the file, change it a
> bit if necessary and delegate to editor.
> 
> I think in this version I will not get the To: field, I will get the
> reply message.

My fault: I was implying that you have edit_headers on:
:set edit_headers="yes"

Now run that “hack” again and your good to go. 🙂

> Maybe first piping, getting email address, recording ID, then reply as
> usual. The ID actually need not be in the text, it can be outside of
> Mutt, important is that I can access the "current ID" from editor. 

True, you could maybe even put it into the postponed location and then try to 
send
that message. I guess that could work as one nice macro, too.
If the above does not work, let’s elaborate on this idea later.

Anyhow I guess, edit_headers="yes" opens up some new capabilities; maybe
even doing everything inside emacs without the “hack” above.
 
> This is all good as brainstorming.

Nice, any chance that this system will be talked about in a blog or
something like that? This CRM of yours sounds like an interesting read.

> Also good idea. That is what I have to do.

Great!

Best Regards,
PM


Re: Ask for which account to send email from?

2022-10-05 Thread P. Mazart
Hi Ranjan,

Ranjan Maitra schrieb am 06.10.2022 03:53:38:
> I have multiple accounts, and the way I get this resolved is that I
> have different folders where different accounts are used (all >
> configured in my .muttrc).

As a first step I recommend using a folder-hook to source a config file
that changes your smtp-settings like so:

folder-hook '+PMazart' 'source ~/.mutt/incl-ident-pmazartwebde'

Within this config file may be:
set sendmail="/usr/bin/msmpt -a yourconfig"
set realname=Ranjan

and so on.

If you need to change your account manually you could do something like:
macro compose,index,pager "\ca1" ':source 
~/.mutt/incl-ident-pmazartWHATEVER' 'use pmaz...@whateverdoesnotexist.cn'
macro compose,index,pager "\ca2" ':source 
~/.mutt/incl-ident-pmazartwebde' 'use pmaz...@web.de'

With this you can use CTRL+A then 1 or 2 to change your smtp-configs.

You can additionally consider changing compose_format, status_format and
pager_format to mention the currently used email address within those
include files.

Best Regards,
Peter



Re: Setting X-Priority/Priority/Important headers more easiliy?

2023-09-28 Thread P. Mazart
Hi Tim,

Tim Chase schrieb am 27.09.2023 21:36:57:
> Does anyone have any suggestions/mappings that might make it easier
> to add/manage add/manage these headers rather than hand-entering
> them with {edit-headers} in the message-compose menu? 

If you use vim you could use imap in ~/.vim/ftplugin/mail.vim:
imap .urg Priority: urgent
Typing .urg would then fill write the header at this point. (given that
you have “set edit_headers=yes”

> Preferrably picking from a list rather than remembering the exact
> text/number for each header.

You could refine the attached script I use to set X-Label which uses
formail and bash to create such a “user interface”.
It can be used by binding a key like this:

macro compose P "set 
editor=\"~/.mutt/editlabel\"set editor=vim" 
"Change label"

This sets the editor to your “Priority” script and then resets it back
to your favourite editor.

Best Regards,
PM

#!/bin/bash
# Hiermit kann man E-Mail aus Mutt heraus labeln
# Folgender vereinfachter Dialog soll angezeigt werden:
#
#[1] Label1 (+)
#[2] Label2 (+)
#[3] Label3 (+)
#[4] Label4 (+)
#[c] Clear All
#[x] Do Nothing

# $1 is the filename

# Konsole reinigen
clear

# Configuration
# this file contains one valid label per line
LFILE="$HOME/.mutt/labels"

FNAME="$1"
NFNAME="/tmp/editlabels-`basename "$1"`.$$"


# Start
# multiline variablen imm mit Anführungszeichen (echo "$existLabels") ausgeben
existLabels=`formail -c -z -x X-Label < "$FNAME" | sed 's/ /\n/g'`
stdLabels=`cat $LFILE`
allLabels=`echo "${stdLabels}"$'\n'"${existLabels}" | sort | uniq`

# Anzeige generieren
i=1;
for label in $allLabels 
do
  del=`grep $label <(echo "$existLabels") | wc -l`
  if [ $del -eq 1 ]; then
echo -e "\e[1;31m[$i]\e[0m $label"$'\t'"\e[1;31m(-)\e[0m";
  else
echo -e "\e[1;32m[$i]\e[0m $label"$'\t'"\e[1;32m(+)\e[0m";
  fi
  i=$(($i+1));
done

echo -e "\e[1;31m[c] Clear All\e[0m";
echo -e "[*] Do Nothing";


# Input lesen
read -n 1 choice 

# Input auswerten
re='[0-9]'
if [ "$choice" == "c" ]; then
  # Alles Tags löschen
  echo OK $choice
  formail -I "X-Label:" < "$FNAME" > "$NFNAME"
elif [[ "$choice" =~ $re ]]; then
  # Nummerneingabe prüfen

  i=1;
  for label in $allLabels 
  do
if [ $i -eq $choice  ]; then
del=`grep $label <(echo $existLabels) | wc -l`
if [ $del -gt 0 ]; then
# Entfernen
new=`echo "X-Label: $existLabels" | tr '\n' ' ' | sed 
"s/$label//g" | sed "s/[ ]*$//g"`
#echo löschen \"$new\"
formail -I "$new" < "$FNAME" > "$NFNAME"
else
# Hinzufügen 
new=`echo "X-Label: $existLabels $label" | tr '\n' ' ' | sed 
"s/[ ]*$//g"`
#echo hinzufügen \"$new\"
formail -I "$new" < "$FNAME" > "$NFNAME"
fi
fi 

i=$(($i+1));
  done


else
exit
fi

# Abspeichern sofern formail eine neue Datei geschrieben hat
if [ -f "$NFNAME" ]; then
mv "$NFNAME" "$FNAME"
fi

# Konsole reinigen
clear


Re: Manually Setting References

2011-09-29 Thread P. Mazart
Hey,

Vance Shipley schrieb am 29.09.2011 06:33:18:
> The reason I use mutt is to have the greatest control over my email.
> If I say there is a thread there is a thread!

FULL ACK!
e.g. when answering an email in a mailinglist that’s been sent before
one’s subscribed to the list, but can view that email in an archive or
e.g. debian bugreport…

Regards,
P.M.


Re: Configuring mailcap to view vnd.openxm

2011-10-08 Thread P. Mazart
Hi,

Mandar Mitra schrieb am 08.10.2011 17:24:30:
> I have the following line in /etc/mailcap (probably added by the
> installation scripts for libreoffice):
>
> application/vnd.openxmlformats-officedocument.wordprocessingml.document; 
> soffice -no-oosplash -writer '%s'; edit=soffice -no-oosplash -writer '%s'; 
> test=test -n "$DISPLAY"; description="Office Open XML Document"; 
> nametemplate=%s.docx

I have the exact same line on Debian Lenny,
yet mutt won’t open it with soffice…

> I also have libreoffice installed, and can read docx files after a
> fashion using this package.

Maybe its because mutt mentions the attachment as octett stream‽

Regards,
P.M.


OpenPGP and Subject encryption

2011-11-06 Thread P. Mazart
Hi,

are there any implementations or thoughts on subject encryption
for PGP/MIME, yet?

I wonder if there might be a special trigger word inside the
encypted body part to reset or redisplay the message’s
subject (e.g. X-Msg-Subject:), so one could choose a random
Subject: Header .

Thanks
P.M.


Re: OpenPGP and Subject encryption

2011-11-07 Thread P. Mazart
Hi Patrick,

thank you for your answer!

Patrick Shanahan schrieb am 07.11.2011 13:21:37:
> an encrypted Subject would only be visible to the intended recipient
> holdiong the correct key and only after he decrypted the post, so what
> would be the point?

Avoiding inference about the email’s content…
That’s why we use pgp, don’t we‽

> Why would you send an encrypted post (?Subject) to
> anyone but the intended recipient?

I guess we got each other wrong here,
I was indeed talking about encrypting AND sending
to the keyholder.

None the less I stick to the policy of choosing a
proper, content describing, subject which in return
does reveal information about the content while traveling
over the net.
So a dummy subject which might be overridden after the first
decryption might fit the purpose of “hiding” information about the mail…

I wonder if there’s some ideas on that yet.

Thank you.
P.M.


Re: S/Mime signatures and Outlook 2010

2011-11-17 Thread P. Mazart
Hi,

Stas Verberkt schrieb am 17.11.2011 14:43:46:
> Nevertheless, disabling the "clear text" mode is not really an option,
> as this would render all my e-mails unreadable by those using older
> e-mailclients or e-mailclients on smartphones.

Actually we might not have an idea, what “clear text” mode is…
Do you mean inline PGP‽
If so there’s a hook for inline pgp at

http://wiki.mutt.org/?MuttFaq/Encryption

Bye
P.M.