Re: Send menu colors for To: etc.

2017-12-03 Thread Peter P.
* Peter P. <peterpar...@fastmail.com> [2017-12-03 15:40]:
> * Wim <factotum_m...@web.de> [2017-12-03 15:26]:
> > Hi Peter,
> > 
> > Debian testing and experimental now package 'mutt' and 'neomutt' separately.
> > 'mutt' is the package from the official maintainer whereas 'neomutt' has
> > the extra patches. To achieve what you want it's probably enough to install
> > the 'neomutt' package rather than 'mutt'.
> Thank you Wim. Installing and running neomutt on Debian does not give me
> any colors at all, ie vim is launched without a mail syntax coloring
> file.
Replying to myself here: Yes, this is a known neomutt bug and should not
be discussed here.

Thanks again Wim and please excuse the extra noise.
P


Re: Send menu colors for To: etc.

2017-12-03 Thread Peter P.
* Wim  [2017-12-03 15:26]:
> Hi Peter,
> 
> Debian testing and experimental now package 'mutt' and 'neomutt' separately.
> 'mutt' is the package from the official maintainer whereas 'neomutt' has
> the extra patches. To achieve what you want it's probably enough to install
> the 'neomutt' package rather than 'mutt'.
Thank you Wim. Installing and running neomutt on Debian does not give me
any colors at all, ie vim is launched without a mail syntax coloring
file.

Is it correct that Debian had neomutt packaged as mutt before and I was
most likely using neomutt without knowing recently?

best, P


Send menu colors for To: etc.

2017-12-03 Thread Peter P.
Hi,

Using the latest mutt on Debian testing (Mutt 1.9.1) I notice that the
color scheme of the Send menu has changed in as the To: Cc: etc fields
now have a solid white background. I would like to reverse this to the
old coloring but can't seem to find a quick way of doing it. I must
admit that I do not have the time to read through all of mutt's coloring
options and documentation, hence let me ask on this list if someone has
a quick pointer to what to change where. Any answer is much appreciated!

Peter


pgp-signed flag in index updated when expunging folder?

2017-05-03 Thread Peter P.
Hi mutt list,

here is a funny behavior which might be explainable but let me
nevertheless ask you about.

Changing to one of my mail folders the 's' flag denoting pgp-signed
mails is not displayed for such messages not until I execute 'expunge'
deleted mails from this folder, at which point the flag is set.

I assume that mutt updates the flags when such an action is executed and
the folder is somehow refreshed, but then why does it only happen with
the 's' flag and not others?

Thank you for all ideas!
Peter


selecting target folder for multiple tagged attachments

2017-03-09 Thread Peter P.
Hi list,

the following task in mutt does always puzzle me:

I am tagging multiple attachements in an email message and want to save
them into a folder onto my disk. I execute
; s
so save all tagged attachment. Mutt asks me "Save to file:"
and I start entering the path, folder by folder, using TAB to
autocomplete a folder's name. Once I have traversed the folder structure
deep enought to not remember names any more I press TAG again to have
mutt display me all folders within the current one. Using the up/down
arrow keys and the Enter key I navigate into the target folder. The
actual riddle is: One I am within that target folder, I can't find a way
to let mutt know that I have arrived. I can, upon pressing Enter either
select a file within that folder (which would get overridden by the
attachment(s) I want to save) or leave that folder for its containing
parent-folder.

Am I missing something obvious? Also I noticed a =:Goto shortcut being
displayed in the info line at the bottom, but this takes me somewhere
els (where?).

Thank you for your ideas!
P


Re: Are there any good/recommended address book add-ons for mutt other than abook?

2017-01-30 Thread Peter P.
* Chris Green  [2017-01-27 10:13]:
> On Thu, Jan 26, 2017 at 08:46:02PM -0200, Marcelo Laia wrote:
> > On 26/01/17 at 04:28, Chris Green wrote:
> > > Does anyone here use an address book for mutt other than abook?
> > > 
> > 
> > Yes! I use The Little Brother's Database (lbdb)
> > 
> > http://www.spinnaker.de/lbdb/
> > 
> Aha!  Thank you, I'd not found that in my recent searches though I
> think I have noticed it before.  A major plus for lbdb is that it's in
> the Ubuntu repositories.
> 
> 
> > Maybe you would like to use goobook with lbdb.
> > 
> > https://pypi.python.org/pypi/goobook
> > 
> No, I don't want my addresses out on the cloud.  However there are
> lots of possibilities with lbdb and I'm sure something will fit my
> needs.

For example I do sort and tidy up my collected addresses in lbdb like the 
following:

# let lbdbq filter all duplicates:
lbdbq > m_inmail.list.filteredByLbdbq

# sort by TAB delimiter according to first and second field, ignoring
# the third one and remove duplicates
sort -k1,1 -k2,2 -t$'\t' --stable --unique m_inmail.list > m_inmail.list.sorted

# extract first column only (email addresses) 
cut -f1 m_inmail.list.sorted > uppercase.txt

# convert them to lowercase 
tr '[:upper:]' '[:lower:]' < uppercase.txt > lowercase.txt

# and check for duplicates
uniq -d lowercase.txt


undo delete?

2016-12-08 Thread Peter P.
Hi list,

I am wondering about the following: Deleting a message in my mutt will
move it to the Trash folder and mark it as deleted in the respective
folder I am in. If I decide to undelete it, it will not purge that
message out of the Trash again, but I will end up with two copies of the
same mail (one in the respective folder, the other sill in the Trash).
While I can live with having to clean up myself after I did some
mistake, I was wondering if there is some sort of Undo action for
deleting/moving messages in mutt?

thanks for ideas!
Peter


gnutls_handshake: A TLS packet with unexpected length was received.

2016-12-02 Thread Peter P.
Hi list,

getting the error 
 gnutls_handshake: A TLS packet with unexpected length was received.
when trying to connect to a server with mutt 1.5.21 on Debian.
This packaged versions of mutt has -USE_SSL_OPENSSL  +USE_SSL_GNUTLS
and I have no root access on that machine, eg am unable to install
packages.

I checked all similar errors via internet search but the described
fixes do not work for me. 
Running mutt with the debug flag gives not much more insight:
 [2016-12-02 10:52:09] gnutls_handshake: A TLS packet with unexpected length 
was received.
 [2016-12-02 10:52:11] Connected to some.server:993 on fd=4

I would be delighted to hear how I can debug this further and solve
it.
Thank you for all ideas!
Peter


Re: can't read sent encrypted mail

2016-10-12 Thread Peter P.
* Kevin J. McCarthy <ke...@8t8.us> [2016-10-08 06:07]:
> On Sat, Oct 08, 2016 at 02:46:42AM +0200, Peter P. wrote:
> > Interesting! man muttrc tells me that the default for crypt_use_gpgme is no.
> 
> Yes, but I believe they changed the system muttrc to enable it (likely
> in /etc/Muttrc.d/gpg.rc.  Your own muttrc is read afterwards and so can
> override that setting.
> 
> > Nevertheless when I
> > unset crypt_use_gpgme
> > or
> > set unset crypt_use_gpgme=no
> > the problem remains.
> 
> Which problem are you speaking of?  This will not magically allow you to
> read emails encrypted in the recent past using gpgme (that therefore
> were not also encrypted to you).  It should make emails sent henceforth
> be encrypted to you again.
> 
> > How could I debug this further?
> 
> Well, first I am assuming that this is a recent change in behavior, and
> that prior to the mutt upgrade in Debian you had no trouble reading your
> encrypted emails sent to others.
> 
> You might check that those older sent emails are still readable by you.
> 
> To make sure the option is off, type
>   :set ?crypt_use_gpgme
> and mutt should echo back 'crypt_use_gpgme is unset'
Amazing idea, thank you! It made me find out that I had another line of 
set crypt_use_gpgme=yes
sneaked into my local mutt_gpg.rc by the debian maintainers. Removing
that made mutt use its old pgp_ commands and the self-encryption works
again.
 
Thanks Kevin!
P


Re: can't read sent encrypted mail

2016-10-07 Thread Peter P.
Hi Kevin,

* Kevin J. McCarthy <ke...@8t8.us> [2016-10-08 01:44]:
> On Fri, Oct 07, 2016 at 07:46:10PM +0200, Peter P. wrote:
> > Hi list,
> > 
> > I am having a strange problem with mutt (NeoMutt 1.7.0 on debian
> > testing) and gpg (GnuPG) 2.1.15
> 
> Debian switched to using GPGME by default.  GPGME does not look at the
> various $pgp_* commands, so your changes made in your muttrc are not
> taking effect.
> 
> Add 'unset crypt_use_gpgme' to your muttrc, to start using your
> pgp_encrypt_sign_command again.
Interesting! man muttrc tells me that the default for crypt_use_gpgme is no.

Nevertheless when I 
unset crypt_use_gpgme
or
set unset crypt_use_gpgme=no
the problem remains.

How could I debug this further?
Btw, is there any advantage of switching to gpgme? How would I add my
own key to the encryption in gpgme?

Thanks again!
Peter


[SPAM?] Re: can't read sent encrypted mail

2016-10-07 Thread Peter P.
Adding more information below.

* Peter P. <peterpar...@fastmail.com> [2016-10-07 19:46]:
> Hi list,
> 
> I am having a strange problem with mutt (NeoMutt 1.7.0 on debian
> testing) and gpg (GnuPG) 2.1.15
> 
> Mail that I encrypt with someone else's key, and also with my own one,
> is unreadable by myself afterwards in my Sent folder. Mutt gives a
> rather short
>   Could not decrypt PGP message
> followed by 
>   Could not copy message
Messags that I encrypt to myself only are successfully decrypted.
Thanks, P


can't read sent encrypted mail

2016-10-07 Thread Peter P.
Hi list,

I am having a strange problem with mutt (NeoMutt 1.7.0 on debian
testing) and gpg (GnuPG) 2.1.15

Mail that I encrypt with someone else's key, and also with my own one,
is unreadable by myself afterwards in my Sent folder. Mutt gives a
rather short
Could not decrypt PGP message
followed by 
Could not copy message

mutt -d 5 gives the following in .muttdebug
Entering pgp_encrypted handler
../../crypt-gpgme.c:2591: mutt_mktemp returns 
"/tmp/mutt-hostname-1000-26184-6735641325734396222".
Could not decrypt PGP message
which I can't make much sense of and which doesn't yield useful results
in a web search.

I have a .mutt/mutt_gpg.rc which has, amongst other lines
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg
%?p?--passphrase-fd 0? --pi nentry-mode=loopback --batch --quiet
--no-verbose --textmode --output - --encrypt -- sign %?a?-u %a? --armor
--always-trust --encrypt-to 0xmyOwnKey -- -r %r -- %f"
and I sign/encrypt using my own key as well (--encrypt-to). 

PS: I discovered that there is an /etc/muttrc.d/ directory present on my
Debian system, which I was not aware of, and it holds an
/etc/muttrc.d/gpg.rc file. I wonder which one is given precedence?
Starting mutt with the -n flag (bypass system configuration file) does
not change the problematic behavior.

I am aware that debian switched to neomutt, and that gpg in mutt might
have switched to gpgme and its possible different configuration options. 
But how do I go about debugging all this? Any ideas are well appreciated!
Thank you for your help!
Peter



Re: [SPAM?] Re: preview images before attaching

2016-09-06 Thread Peter P.
* Samir Benmendil <m...@rmz.io> [2016-09-05 11:04]:
> On Sep 05, 2016 at 8:46, Peter P. wrote:
> > I am frequently attaching images to emails in mutt and wonder if there
> > is a way I can preview them when selecting the files, but before
> > actually attaching them. I imagine selecting/entering the path to the
> > file to be attached, but then pressing TAB once more, or using any other
> > keypress, launching eg. imagemagick's display to show the image briefly.
> I use a combination of vim, the CheckAttach plugin [0] and ranger [1] and
> w3mimgdisplay. [2]
> 
> Basically you simply edit your mail, run :AttachFile and select the file in
> ranger which can show you a preview on the side.
> 
> [0] https://github.com/vim-scripts/CheckAttach.vim
> [1] http://nongnu.org/ranger/
> [2] https://github.com/ranger/ranger/wiki/Image-Previews

Thank you Samir, this is an amazing toolchain as well!
best, Peter


Re: preview images before attaching

2016-09-06 Thread Peter P.
Hi,

* li...@2ion.de <li...@2ion.de> [2016-09-05 10:46]:
> On Mon, Sep 05, 2016 at 08:46:44AM -0400, Peter P. wrote:
> > I am frequently attaching images to emails in mutt and wonder if there
> > is a way I can preview them when selecting the files, but before
> > actually attaching them. I imagine selecting/entering the path to the
> > file to be attached, but then pressing TAB once more, or using any
> > other keypress, launching eg. imagemagick's display to show the image
> > briefly.
> 
> I have in my .mailcap:
> 
>   image/*; mutt_bgrun sxiv -fbz100 '%s'
> 
> Then, in mutt's Compose view,  is bound to view-attach --
> selecting an attachment and hitting return opens the file in the
> specified application _after_ attaching the file.
> 
> In the Directory view when navigation to an attachment,  is bound
> to view-file and does the same _before_ attaching the file.

Thank you! This is exactly what I was looking for!


preview images before attaching

2016-09-05 Thread Peter P.
I am frequently attaching images to emails in mutt and wonder if there
is a way I can preview them when selecting the files, but before
actually attaching them. I imagine selecting/entering the path to the
file to be attached, but then pressing TAB once more, or using any other
keypress, launching eg. imagemagick's display to show the image briefly.

This might be a funny idea, but I thought if one software could do it,
it would be mutt. ;)

thanks for all ideas/comments!
Peter


Re: syscall(getrandom) not supported

2016-07-23 Thread Peter P.
Dear Christoph,

* Christoph Biedl <mutt.c...@manchmal.in-ulm.de> [2016-07-23 10:29]:
> Peter P. wrote ...
> 
> > When sending encrypted mail from mutt using gpg I do get the following
> > error message from gpg:
> > 
> > gpg: DBG: syscall(getrandom) not supported; errno = 38
> > 
> > The mail is sent nevertheless, but I am wondering why the error message
> > is there. A quick online search did not bring up something and I was
> > womdering if this list could help me, or tell me where to ask next.
> 
> Came across that message somewhere else, investigated and decided to
> share as your question shows up when searching it in the net, but no
> explanations.
> 
> Executive summary: It's harmless, and it will go away in the future.
Thank you! Indeed that was my experience (and I forgot to report back to
this list).
 
> Full story: A while ago, the kernel learned a new syscall "getrandom"
> that eases access to random data, something always needed when
> dealing with cryptography. The gpg programm uses the libgcrypt library
> which tries to use that syscall first, which is a good thing. Upon
> failure, it emits that warning, and falls back to the old style of
> gaining random data. Which is not perfect but it worked the last
> years.
> 
> Code:
> http://sources.debian.net/src/libgcrypt20/1.7.1-2/random/rndlinux.c/#L239
> 
> That syscall was introduced around kernel 3.16 but the Debian jessie
> kernel appearently does not have it yet. The change in libgcrypt was
> after 1.6.3 (as in Debian jessie) and at 1.7.2 (as in Debian stretch)
> the latest. I can trigger the message in Debian by running gpg on a
> jessie kernel (3.16) inside a stretch chroot.
> 
> As soon as you'll switch to a newer kernel, libgcrypt will be happy
> again.
As happy as I am today ;)
Thanks for your kind explanation!

Peter


syscall(getrandom) not supported

2016-06-27 Thread Peter P.
When sending encrypted mail from mutt using gpg I do get the following
error message from gpg:

gpg: DBG: syscall(getrandom) not supported; errno = 38

The mail is sent nevertheless, but I am wondering why the error message
is there. A quick online search did not bring up something and I was
womdering if this list could help me, or tell me where to ask next.

thank you for all ideas!
P


Re: strange characters in lbdb file make mutt throw "standard input "

2016-06-16 Thread Peter P.
* Patrick Shanahan <p...@opensuse.org> [2016-06-16 00:25]:
> * Peter P. <peterpar...@fastmail.com> [06-15-16 16:32]:
> > * Marcelo Laia <marcelol...@gmail.com> [2016-06-15 21:00]:
> > > Em 15 de jun de 2016 15:41, "Peter P." <peterpar...@fastmail.com> 
> > > escreveu:
> > > >
> > > > I found out that the way lbdb collects the addresses from mails I send
> > > > from mutt via lbdb-fetchaddr will create an iso-8859-15 file unless
> > > > specified differently using the (-c) flag.
> > > > Please excuse the noise, and thanks.
> > > > Peter
> > > 
> > > Hi,
> > > 
> > > Have you solved the problem?
> > > 
> > > Please, coul you share the solution?
> > Well I add the -c flag to lbdb-fetchaddr.
> > 
> > When I send mail from mutt I do it as follows:
> > 
> > In .muttrc I have
> > set sendmail="~/.mutt/mysendmail.sh"
> > 
> > and that script holds the line 
> > #!/bin/bash
> > tee >(lbdb-fetchaddr -a -c utf8 -x "to:cc")|/home/peter/bin/msmtpq -a 
> > account $@
> > 
> > which lets lbdb save all to: or cc: addresses to its database in utf8
> > encoding, which is the default locale on my system.
> 
> 
> there is also /usr/bin/lbdb-fetchaddr which contains the line:
> 
>   additional_param=""
> 
> where it can be added.  
Nice! 

Having written a database of addresses in the wrong encoding over the
last 5 years, I feel lbdb-fetchaddr could take a look at the system's
locale by itself, or post an error message if system locale and database
file have different encodings, but that is only wishful thinking.

cheers,
Peter


Re: strange characters in lbdb file make mutt throw "standard input "

2016-06-15 Thread Peter P.
* Marcelo Laia <marcelol...@gmail.com> [2016-06-15 21:00]:
> Em 15 de jun de 2016 15:41, "Peter P." <peterpar...@fastmail.com> escreveu:
> >
> > I found out that the way lbdb collects the addresses from mails I send
> > from mutt via lbdb-fetchaddr will create an iso-8859-15 file unless
> > specified differently using the (-c) flag.
> > Please excuse the noise, and thanks.
> > Peter
> 
> Hi,
> 
> Have you solved the problem?
> 
> Please, coul you share the solution?
Well I add the -c flag to lbdb-fetchaddr.

When I send mail from mutt I do it as follows:

In .muttrc I have
set sendmail="~/.mutt/mysendmail.sh"

and that script holds the line 
#!/bin/bash
tee >(lbdb-fetchaddr -a -c utf8 -x "to:cc")|/home/peter/bin/msmtpq -a 
account $@

which lets lbdb save all to: or cc: addresses to its database in utf8
encoding, which is the default locale on my system.


[SPAM?] Re: [SPAM?] strange characters in lbdb file make mutt throw "standard input "

2016-06-15 Thread Peter P.
Hi list,

(replying to myself below)

* Peter P. <peterpar...@fastmail.com> [2016-06-15 19:47]:
> Hi list,
> 
> as the subject says, I am trying to query the little brother database
> (lbdb) for an email address that contains a german umlaut in its
> realname. While querying the database from bash works somehow (using the
> lbdbq command) and only replacing the umlaut with a question mark
> symbol, the query function from within mutt throws
> "standard input ".

I found out that the way lbdb collects the addresses from mails I send
from mutt via lbdb-fetchaddr will create an iso-8859-15 file unless
specified differently using the (-c) flag.
Please excuse the noise, and thanks.
Peter


[SPAM?] strange characters in lbdb file make mutt throw "standard input "

2016-06-15 Thread Peter P.
Hi list,

as the subject says, I am trying to query the little brother database
(lbdb) for an email address that contains a german umlaut in its
realname. While querying the database from bash works somehow (using the
lbdbq command) and only replacing the umlaut with a question mark
symbol, the query function from within mutt throws
"standard input ".

This error message sounds a lot like grep, and I suspect mutt (or lbdb)
to just grep the database file when searching. Now grep has flag (-a)
that forces it to treat the input file(s) as ascii whatsoever and I am
wondering if mutt could at least use that one to query lbdb?

Nevertheless, if someone has an idea how lbdb could handle non-standard
characters in realnames of email addresses I would be delighted to know.

best, Peter


Re: leaking timezone

2016-03-21 Thread Peter P.
* Артур Истомин <art.is...@yandex.ru> [2016-03-21 16:59]:
> On Mon, Mar 21, 2016 at 06:08:13AM -0400, Peter P. wrote:
> > Hi list,
> > 
> > please excuse me if this has been discusse before, but I have not found
> > a satisfactory explanation in the mailing list archives or on the web.
> > 
> > I send mail with mutt and msmtp. Apparently the "Date:" header of the
> > sent mail shows my current timezone to the receiver, which I would like
> > to avoid.
> > 
> > Is there a way to do this?
> 
> You can specify the time zone by means of the TZ environment variable before
> running mutt.
> 
> TZ=UTC mutt
Thank you! A most elegant quick solution!
cheers, P


Re: leaking timezone

2016-03-21 Thread Peter P.
* Alarig Le Lay  [2016-03-21 09:16]:
> On Mon Mar 21 08:37:19 2016, hy...@lactose.homelinux.net wrote:
[...] 
> Mutt puts the header. You can use a MUA located in Europe (so, at home)
> and a mail server located in Asia.
If this is the case, is there a known way to tell mutt to put an UTC header?
Thanks!
P


leaking timezone

2016-03-21 Thread Peter P.
Hi list,

please excuse me if this has been discusse before, but I have not found
a satisfactory explanation in the mailing list archives or on the web.

I send mail with mutt and msmtp. Apparently the "Date:" header of the
sent mail shows my current timezone to the receiver, which I would like
to avoid.

Is there a way to do this?

Thanks!
P


specify time at which mutt sends a precomposed mail?

2016-02-03 Thread Peter P.
I am wondering if there is any way during message composition in mutt to
specify at which time (eg. 3pm, 10mins later,...) at which an email will
actually be sent by mutt to the sendmail command? I would like to
draft emails but have them sent out at a later time automatically.

Thanks for all ideas!
Peter


Re: viewing attachments with identical filenames

2015-12-07 Thread Peter P.
* Arkadiusz Drabczyk <arkadi...@drabczyk.org> [2015-11-19 18:11]:
> On 2015-11-18, Peter P. <peterpar...@fastmail.com> wrote:
> > Hi list,
> >
> > I came across an annoying issue when viewing attached files in mutt.
> > In order to view attachment "A" Mutt saves the file to /tmp/mutt and
> > launches the appropriate viewer. When I want to see another attachment
> > "B" which has an identical filename as "A" and ask mutt to display it,
> > mutt will not overwrite the already stored "A" file in /tmp/mutt, and
> > hence display "A" while I would expect to see "B".
> >
> > Is this a known issue, and could there be a workaround to this?
> 
> I must be missing something.  Mutt saves temporary files to $TMPDIR or
> to /tmp if $TMPDIR is unset (TMPDIR is kinda standard
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03).
> Did you set your $TMPDIR to /tmp/mutt?  
I have not set $TMPDIR nor tmpdir in .muttrc but have the following line
in my .mailcap:

application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt/ \; xdg-open 
/tmp/mutt/$(basename %s) 2>/dev/null &

I found that the attachment file is given read-only permissions by the
above copy command, and cannot really reproduce why.

By adding the -f (force) option to cp I managed to have the old
attachment file overwritten. I am curious about why the file referenced
in %s above has only read permissions in the first hand place.

But then I wonder if there is a better/more elegant way of doing
this in .mailcap in the first hand place.

Thank you for your advice,

cheers, P


viewing attachments with identical filenames

2015-11-18 Thread Peter P.
Hi list,

I came across an annoying issue when viewing attached files in mutt.
In order to view attachment "A" Mutt saves the file to /tmp/mutt and
launches the appropriate viewer. When I want to see another attachment
"B" which has an identical filename as "A" and ask mutt to display it,
mutt will not overwrite the already stored "A" file in /tmp/mutt, and
hence display "A" while I would expect to see "B".

Is this a known issue, and could there be a workaround to this?

Thank you so much!
P


Re: abook to lbdb (OT?)

2015-10-16 Thread Peter P.
* Chris Bannister <cbannis...@slingshot.co.nz> [2015-10-16 00:22]:
> On Thu, Oct 15, 2015 at 11:06:34PM -0400, Patrick Shanahan wrote:
> > * Peter P. <peterpar...@fastmail.com> [10-15-15 18:28]:
> > > * Patrick Shanahan <p...@opensuse.org> [2015-10-15 18:04]:
> > > > * Peter P. <peterpar...@fastmail.com> [10-15-15 16:30]:
> > > > > Hi list,
> > > > > 
> > > > > please excuse me if this is slightly offtopic, nevertheless this 
> > > > > seems a
> > > > > propoer community to ask.
> > > > > 
> > > > > Does anyone know if/how I can export an abook data file to a format 
> > > > > that
> > > > > can be merged with lbdb's m_inmail.list file?
> > > > 
> > > > lbdb can read abook, /usr/lib64/lbdb/m_abook
> > > > 
> > > > I believe if configured that it will automatically include abook 
> > > > addresses
> > > > and will provide them when queried.
> > > 
> > > Thank you, this is what I am already doing successfully. I would just
> > > like to uninstall abook altogether (I am not using it really) and rely
> > > only on lbdb, hence I would like to import/merge abook's datafile into
> > > ~/.lbdb/m_inmail.list
> > 
> > lbdbq > m_inmail.list.new
> > 
> > cat m_inmail.list > m_inmail.list.new
> 
> Shouldn't that be:
> cat m_inmail.list >> m_inmail.list.new

Thanks Patrick, Chris,

simple and elegant, what a nice solution! 
thanks again!

best,P


abook to lbdb (OT?)

2015-10-15 Thread Peter P.
Hi list,

please excuse me if this is slightly offtopic, nevertheless this seems a
propoer community to ask.

Does anyone know if/how I can export an abook data file to a format that
can be merged with lbdb's m_inmail.list file?

Thank you for all ideas!
P


Re: abook to lbdb (OT?)

2015-10-15 Thread Peter P.
* Patrick Shanahan <p...@opensuse.org> [2015-10-15 18:04]:
> * Peter P. <peterpar...@fastmail.com> [10-15-15 16:30]:
> > Hi list,
> > 
> > please excuse me if this is slightly offtopic, nevertheless this seems a
> > propoer community to ask.
> > 
> > Does anyone know if/how I can export an abook data file to a format that
> > can be merged with lbdb's m_inmail.list file?
> 
> lbdb can read abook, /usr/lib64/lbdb/m_abook
> 
> I believe if configured that it will automatically include abook addresses
> and will provide them when queried.

Thank you, this is what I am already doing successfully. I would just
like to uninstall abook altogether (I am not using it really) and rely
only on lbdb, hence I would like to import/merge abook's datafile into
~/.lbdb/m_inmail.list


Re: avoid multiple deletion of same mail?

2015-07-30 Thread Peter P.
Dear Michael, dear Cameron,

* Michael Tatge tatg...@gmail.com [2015-07-22 14:17]:
 * On Wed, Jul 22, 2015 11:35AM -0400 Peter P. (peterpar...@fastmail.com) 
 muttered:
  I have bound the 'd' key to move mails to a trash folder, and 'D' to
  move an entire thread to a trash folder:
  
   folder-hook . 'macro index,pager d save-message=INBOX.Trash \r
   folder-hook . 'macro index,pager D 
  tag-threadtag-prefixsave-message=INBOX.Trash \r
 
  This doesn't prevent me from accidentally moving these messages twice,
  eg when the first mails in a thread are deleted using 'd' (and are
  marked deleted accordingly) with a subsequent use of 'D' the entire
  thread, including the messages that got deleted already, gets saved to
  the trash folder again, causing duplicates.
 
 You could use the trash folder patch included in most distros.
 Then you wouldn't need those macros.

I managed to change to the trash folder patch and have been using it
successfully for a week by now. Thank you for suggesting it Michael, and
thank you Cameron for your instructions on how to write a godd macro
that could indeed do without the above patch and which made me learn a
lot.

cheers, P


Re: amount of displayed characters of sender name in index view

2015-07-30 Thread Peter P.
* spaceman space...@antispaceman.com [2015-07-29 13:57]:
 is there a way to tell mutt to show me more of the sender name in index
 view? Currently it seems to be 15 characters regardless of the
 (x)terminal dimensions.
 
 The following should set the field width to twenty: Original
 index_format = %4C %Z %{%b %d} %-15.15L (%?l?%4l%4c?) %s
 
 Modified
 index_format = %4C %Z %{%b %d} %-20.20L (%?l?%4l%4c?) %s
 
 Don't ask me why you need both numbers, all I know is that it related to
 printf and right and left alignment.
 
 May I suggest:
 man mutt
 man 3 printf
 
 Regards,
 spaceman

spaceman, Jon, dear others,

thank you so much for this advice and please excuse me for not having
checked the manpage this time.

best, P


amount of displayed characters of sender name in index view

2015-07-29 Thread Peter P.
Hi list,

is there a way to tell mutt to show me more of the sender name in index
view? Currently it seems to be 15 characters regardless of the
(x)terminal dimensions.

thank you!
P


avoid multiple deletion of same mail?

2015-07-22 Thread Peter P.
Hi list,

I have bound the 'd' key to move mails to a trash folder, and 'D' to
move an entire thread to a trash folder:

 folder-hook . 'macro index,pager d save-message=INBOX.Trash \r
 folder-hook . 'macro index,pager D 
tag-threadtag-prefixsave-message=INBOX.Trash \r

This doesn't prevent me from accidentally moving these messages twice,
eg when the first mails in a thread are deleted using 'd' (and are
marked deleted accordingly) with a subsequent use of 'D' the entire
thread, including the messages that got deleted already, gets saved to
the trash folder again, causing duplicates.

Is there a way to execute above scripts only on messages and threads
whose status is not 'deleted'?

Thank you for all ideas!

Peter

PS: Does anyone know of a simple way to disply identical duplicated
messages with mutt, and optionally delete only the duplicates?


save email without header but as text?

2015-07-21 Thread Peter P.
Hi list,

(Mutt is a amazing client!)

I am wondering how I can save emails to disk as text files the way they
are displayed to me in the pager, ie. without the full header.
If I select the message body from the attachment menu, it is saved as
body only (evidently) without any From: addresses etc. If I save it from
the pager itself, using pipe, that is
 | cat  somefile.txt
It saves the full header, which is a bit too much info for my taste. I
don't want to print mails to a pdf file via muttprint, as textfiles are
easier to parse and edit.

Most looking forward to suggestions!
Peter


Re: not display hostname in References: ?

2015-07-21 Thread Peter P.
* Ian Zimmerman i...@buug.org [2015-07-21 13:49]:
 On 2015-07-21 12:50 -0400, Peter P. wrote:
 
  I am sending mails using msmtp (msmtp-queue, to be exact). In the
  References: field of emails that I send back to mailing list using
  list-reply, I notice that the hostname of my local box is inserted, and
  would prefer to keep it out of there. I am not sure if this a mutt or an
  msmtp issue, please excuse me if this is inappropriate here. 
  Does anyone know of a way to suppress the own boxes hostname from that
  field in replies sent to lists?
 
 The References header field is not free form: its meaning and syntax is
 specified by RFC 2822.  Bascially, mutt has no choice in the matter, if
 it wants to stay standard conforming.
 
 You probably have asked the wrong question, and what you really want is
 to change the Message-ID header of you outgoing emails.  
Thank you Ian! The manpage for muttrc mentions that setting
$hostname
affects the Message-ID, and I just verified that it does.

Am I then right to assume that References: header fileds are derived
from Message-IDs, and that by setting $hostname should hence be the
solution to my problem? I will try to find out.

 You can do that
 with the regular mutt my_hdr mechanism, although the manual warns
 against it, and it is a bit tricky as I discovered myself.  Here's 2
 lines from my muttrc:
 
 send-hook . my_hdr Message-ID: \`mutt-message-id\`
 send2-hook . my_hdr Message-ID: \`mutt-message-id\`
 
 Here mutt-message-id is a script that generates the ID in a format I
 like.  (But be very sure that the ID you generate is unique and conforms
 to the standard.  You really need to read RFC 2822 if you do this.)
 
 _Both_ lines are necessary to override the mutt-generated ID in all cases.
Thank you for pointing out your way of doing it! This is much
appreciated!

best, Peter


not display hostname in References: ?

2015-07-21 Thread Peter P.
Hi Muttlist,

I am sending mails using msmtp (msmtp-queue, to be exact). In the
References: field of emails that I send back to mailing list using
list-reply, I notice that the hostname of my local box is inserted, and
would prefer to keep it out of there. I am not sure if this a mutt or an
msmtp issue, please excuse me if this is inappropriate here. 
Does anyone know of a way to suppress the own boxes hostname from that
field in replies sent to lists?

Thank you!
P


Re: save email without header but as text?

2015-07-21 Thread Peter P.
* Ian Zimmerman i...@buug.org [2015-07-21 13:12]:
 On 2015-07-21 12:43 -0400, Peter P. wrote:
 
  I am wondering how I can save emails to disk as text files the way they
  are displayed to me in the pager, ie. without the full header.
  If I select the message body from the attachment menu, it is saved as
  body only (evidently) without any From: addresses etc. If I save it from
  the pager itself, using pipe, that is
 
   | cat  somefile.txt
 
  It saves the full header, which is a bit too much info for my taste. I
  don't want to print mails to a pdf file via muttprint, as textfiles are
  easier to parse and edit.
 
 So for multipart MIME messages, do you want to save the nontext parts or
 not?
Hm, didn't thought of that distinction yet. I would say for now, yes,
with nontext parts, as I could always chose to save withouth them from
the attachment menu.


Re: save email without header but as text?

2015-07-21 Thread Peter P.
* Suvayu Ali fatkasuvayu+li...@gmail.com [2015-07-21 13:16]:
 On Tue, Jul 21, 2015 at 12:43:34PM -0400, Peter P. wrote:
  the pager itself, using pipe, that is
   | cat  somefile.txt
  It saves the full header, which is a bit too much info for my taste. I
  don't want to print mails to a pdf file via muttprint, as textfiles are
  easier to parse and edit.
 
 Maybe set $pipe_decode=yes?
Thank you so much Suvayi, this is it! Yes! ;)
Again... Thanks!
P


Re: not display hostname in References: ?

2015-07-21 Thread Peter P.
* Ian Zimmerman i...@buug.org [2015-07-21 14:58]:
 On 2015-07-21 14:02 -0400, Peter P. wrote:
 
  Am I then right to assume that References: header fileds are derived
  from Message-IDs, and that by setting $hostname should hence be the
  solution to my problem?
 
 It will solve your problem (such as it is) for new threads from now on.
 
 In existing threads, existing message-ids embedded in References will
 stay as they are (even in new messages in those threads).  Message-Ids
 are immutable, that is part of their value.
Perfectly fine, thank you again for your help Ian!
P


Re: mutt with GPG and S/Mime

2015-06-30 Thread Peter P.
* Jon LaBadie mut...@jgcomp.com [2015-06-30 16:53]:
 On Tue, Jun 30, 2015 at 10:11:53PM +0200, jonas hedman wrote:
  On 15-06-30 22:00:27, Niels Kobschaetzki wrote:
   Hi,
   
   is it possible to use with one account PGP and S/Mime? I found a how-to
   for using S/Mime or using mutt with one account with PGP and one account
   S/Mime. But I want to use my main account with both and would like to
   choose on a per user basis whether I encrypt via PGP or S/Mime. I know
   people who use only PGP and others only S/Mime.
   So: is this possible in mutt? If yes, how - any how-tos you can
   recommend?
   
   Thanks,
   Niels
  
  Hi!
  
  I use send-hooks for this for examples
  send-hook someonewhoperfersinlinecry...@mail.com set pgp_autoinline; set 
  pgp_autoencrypt
  
  While I have S/Mime as standard in my default crypto settings.
  
 
 For configuration ease, so as not to have lots of send-hooks,
 could you do something like:
 
 set my_PersonsWhoUsePGP = \
 pers...@email1.com,\
 pers...@email2.com,\
   ...
 pers...@emailn.com
 
 send-hook $my_PersonsWhoUsePGP set pgp_autoinline; set pgp_autoencrypt
 
 I don't have that need, but I'm curious for other similar purposes.
Thank you, this is a great contribution!

I am also curious if the above solution would be able to distinguish
between mails that are sent to the pers...@email1.com (who uses PGP)
only and exclusively, and between mails that get sent to others in CC:
as well.

best, 
P


Re: Deleting messages in trash creates duplicates

2015-06-22 Thread Peter P.
* Mick michaelkintz...@gmail.com [2015-06-22 18:44]:
 Hi All,
 
 Any idea why when I delete messages in trash, it creates duplicate
 messages?  Is there another way to delete a single message in the trash
 folder, or empty the whole folder?
 
 -- 
 Regards,
 Mick

in my .muttrc I have

# deleting a message pressing 'd' saves them to the Trash folder
folder-hook . 'macro index d save-message=INBOX.Trash \r
# unless we are in the Trash folder, then the same command deletes
folder-hook INBOX.Trash bind index d delete-message

Perhaps this helps? You might have to change the name of
INBOX.Trash
to reflect that of your Trash folder Mick.



Re: saving attachment on sshfs-mounted volume results in fopen error

2015-06-17 Thread Peter P.
* Peter P. peterpar...@fastmail.com [2015-06-17 13:04]:
 Hi mutt and friends
 
 when I try to save an attachment from within mutt to a directory that is
 mounted on an sshfs volume, mutt tells me that
   fopen: File exists (errno = 17)
 and writes an empty file with the correct name to that location.
 It then offers to save the file to the same path/filename which
 obviously results in the message
   File exists, (o)verwrite, (a)ppend, or (c)ancel?
 
 Is this behavior known, is it only me (Debian testing mutt package,
 Version 1.5.23) and what could I do to help enabling saving attachments
 to such volumes?

Excuse me list, I could have had made my homework though first.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670926
This report claims that it is an sshfs bug that was fixed in the current
version of sshfs on Debian testing, so I have gotten in contact with the
sshfs maintainers/developers.

Sorry for the noise.
P


saving attachment on sshfs-mounted volume results in fopen error

2015-06-17 Thread Peter P.
Hi mutt and friends

when I try to save an attachment from within mutt to a directory that is
mounted on an sshfs volume, mutt tells me that
fopen: File exists (errno = 17)
and writes an empty file with the correct name to that location.
It then offers to save the file to the same path/filename which
obviously results in the message
File exists, (o)verwrite, (a)ppend, or (c)ancel?

Is this behavior known, is it only me (Debian testing mutt package,
Version 1.5.23) and what could I do to help enabling saving attachments
to such volumes?

thx
P


Re: display html email in browser?

2015-04-29 Thread Peter P.
* Michael Tatge tatg...@gmail.com [2015-04-29 03:32]:
 * On Tue, Apr 28, 2015 12:09PM -0400 Peter P. (peterpar...@fastmail.com) 
 muttered:
  Is there a way to have an html email rendered and displayed in a browser
  window?
 
 There used to be a page about that in the mutt wiki (wiki.mutt.org)
 though I cannot find it right now.
 
 In short:
 
 ~/.muttrc
 # i prefere text/plain thank you (show text part of multipart messages
 # rather then html
 alternative_order text/enriched text/plain text/html
 
 # this is needed for the autoview part in mailcap
 auto_view text/html
 
 ~/.mailcap
 # used when (v)iewing (use any browser you like)
 # text/html; w3m -v -F -T text/html '%s'; nametemplate=%s.html
 # text/html; /usr/bin/opera -newpage '%s'; test=test $DISPLAY != 
 # text/html; /usr/bin/firefox -new-tab '%s'; test=test $DISPLAY != 
 text/html; links2 -codepage utf8 '%s'; nametemplate=%s.html; needsterminal
 
 # for autoview
 text/html; lynx -stdin -dump -force_html ; copiousoutput; needsterminal
 
 HTH,
 
 Michael

Thanks to all of you for posting your suggestions! It will take me a few
days to catch up on your examples, which I am very eager to try out!

regards, 
P


Re: display html email in browser?

2015-04-28 Thread Peter P.
* Francesco Ariis fa...@ariis.it [2015-04-28 12:47]:
 On Tue, Apr 28, 2015 at 12:09:34PM -0400, Peter P. wrote:
  Dear fellow mutt users,
  
  Is there a way to have an html email rendered and displayed in a browser
  window?
 
 Hello Peter,
 once opened the message, press 'v' (view-attachments) and then
 select the .html one and press enter, that should auto-invoke
 x-www-browser.
Thanks Francesco,
That way the message gets displayed inside mutt using w3m. In my .muttrc I have 
set 
auto_view text/html application/x-pgp-message
and
text/html; /usr/bin/w3m -dump -T text/html '%s'; copiousoutput; 
description=HTML Text; nametemplate=%s.html
as the corresponding mailcap entry.
I wonder if I could pipe the html message part to the browser. The way I
did it, typing | and specifying firefox as the program to pipe it to,
did not really render it nicely.

best, P


display html email in browser?

2015-04-28 Thread Peter P.
Dear fellow mutt users,

Is there a way to have an html email rendered and displayed in a browser
window? I tried saving the html message part to disk and opened that
file, but there was no formatting, and some symbols were wrong.

Motivation: Wanting to print a few html emails in their original form
(in full glory), not rendered through w3m, but wanting to get rid of
icedove/thunderbird, which I am keeping just for that.

Thanks for ideas!
P


Re: attach public GPG key by default?

2015-03-14 Thread Peter P.
* Francesco Ariis fa...@ariis.it [2015-03-14 19:58]:
 On Sat, Mar 14, 2015 at 11:14:37AM +0100, Peter P. wrote:
  how can I configure mutt to always attach my public GPG key to signed
  messages without manually having to ESC-k and selecting the correct key?
 
 Maybe a macro [1] (exploiting attach-key) could do?
 Have you considered uploading your key to a pgp keyserver? In my opinion
 it is a more reliable and sensible way to share your public key.

Thanks Francesco, it is good to know now that such a thing does not
exist by default. Of course keyservers (or even better, multiple
publication paths in parallel) are a viable option.

best,P


attach public GPG key by default?

2015-03-14 Thread Peter P.
Hi list,

how can I configure mutt to always attach my public GPG key to signed
messages without manually having to ESC-k and selecting the correct key?

thank you,
P


Re: Boldness under mutt's indicator line?

2014-11-12 Thread Peter P.
* Andre Klärner kan...@ak-online.be [2014-11-11 21:01]:
 Hi Peter,
 
 On Tue 11.11.2014 16:08:21, Peter P. wrote:
  I am having a strange problem with different font/color behavior of
  two instances of mutt with almost identical configuration files. These
  two instances run on separate machines and otherwise have the same
  behavior.
  [...]
  I checked several variables such as 
  TERM=xterm
  XTERM_LOCALE=en_US.UTF-8
  XTERM_SHELL=/bin/bash
  XTERM_VERSION='XTerm(312)'
  and they are identical on both machines.
 
 do you use the exactly same terminal? Do you ssh to one of the machines? I
 would take a look at the terminal configuration, some allow you to disable
 boldness or switch bold and bright separately.
Thank you Andre for this advice! I am indeed shh-ing into one of the
machines, actually into the one where bold under the indicator bar
works. But that ssh session runs inside the same xterm terminal, which
I assume to have the same configuration in both cases. Ssh itself
would presumably not change font settings I guess and I tried with
identical .bashrc files and the difference stayed.

If anyone else has a clue where I could be looking, I'd greatly
appreciate any hints!

best, Peter


Boldness under mutt's indicator line?

2014-11-11 Thread Peter P.
Dear fellow mutt users,

I am having a strange problem with different font/color behavior of
two instances of mutt with almost identical configuration files. These
two instances run on separate machines and otherwise have the same
behavior.

New mail in the index is yellow and bold, as set in muttrc using 
color index brightyellow black ~N

My indicator is a bar, not an arrow, and is cyan, as set with
color indicator default cyan

Now in one instance new yellow+bold messages under the cyan
indicator continue being displayed in a bold font (the desired
behavior) while in the other instance their font is not bold.

I checked several variables such as 
TERM=xterm
XTERM_LOCALE=en_US.UTF-8
XTERM_SHELL=/bin/bash
XTERM_VERSION='XTerm(312)'
and they are identical on both machines.

What could I be missing that affects the 'boldness' of the font under
the indicator line?
This sounds like a minor thing first, but over the last days I have
grown to understand how much more intuitive mail handling is with the
font remaining bold, hence my question here on the list.

Thank you for all hints on what I might be missing!
best, P


Cancel limit-search?

2014-03-21 Thread Peter P.
Hi,

when I run a search across a folder using the limit function, I
can't find a way to stop it while it is searching through messages
(apart from killing mutt). Ctl-g doesn't work. Is there any this can
be done?

Thanks!
P


Re: Cancel limit-search?

2014-03-21 Thread Peter P.
* Rejo Zenger r...@zenger.nl [2014-03-21 17:00]:
 ++ 21/03/14 14:13 -0400 - Peter P.:
 when I run a search across a folder using the limit function, I
 can't find a way to stop it while it is searching through messages
 (apart from killing mutt). Ctl-g doesn't work. Is there any this can
 be done?
 
 Limit to all, so limit to ~A.
Thanks! In fact I am trying to stop the search _while_ it is running
(which can sometimes take very long / too long for large folders)

best P


Re: Cancel limit-search?

2014-03-21 Thread Peter P.
* Suvayu Ali fatkasuvayu+li...@gmail.com [2014-03-21 20:58]:
 On Fri, Mar 21, 2014 at 05:11:38PM -0400, Peter P. wrote:
  * Rejo Zenger r...@zenger.nl [2014-03-21 17:00]:
   ++ 21/03/14 14:13 -0400 - Peter P.:
   when I run a search across a folder using the limit function, I
   can't find a way to stop it while it is searching through messages
   (apart from killing mutt). Ctl-g doesn't work. Is there any this can
   be done?
   
   Limit to all, so limit to ~A.
  Thanks! In fact I am trying to stop the search _while_ it is running
  (which can sometimes take very long / too long for large folders)
 
 How large is large?  I just tried to limit to all messages sent by me in
 a folder with 20k messages, it was almost instantaneous.  Are you by
 any change doing full body search (with ~b)?  That will take a while; if
 that is the case you could reduce the time a bit by using =b instead.
You are right! It is ~b that can take very long. Thank you for
pointing out =b to me, this is what I was looking for!
Cool!
best, P


PGP signing rule-based on recipient(s) address?

2014-03-04 Thread Peter P.
Dear Mutt users,

I am wondering if anyone has found a way to automatically enable PGP
signing for certain recipients only, perhaps through some rule-based
scheme?

best,
Peter


Re: delete only undeleted messages?

2014-02-27 Thread Peter P.
* Ed Blackman e...@edgewood.to [2014-02-26 20:46]:
 On Wed, Feb 26, 2014 at 04:45:00PM +0100, Peter P. wrote:
folder-hook . 'macro pager d save-message=Trash \r
 [...]
 Is there a way to incoorporate the status/flag of a message as
 conditional for the above key binding to only allow saving to trash if
 the message is not marked as 'deleted'?
 
 You might want to investigate the 'trash' patch, which is commonly
 already applied to packaged versions of mutt.
 http://cedricduval.free.fr/mutt/patches/#trash

Thanks Ed! It seems my version of mutt (1.5.21) has the
features/trash-folder
compiled in, yet I didn't yet set the respective variable in the
config file. Will test that and get back to this list if there is
still questions open. Thank you also for hacking out the option below,
which seems very cool as well!

best, Peter

 If you don't have the patch and don't want to build mutt to apply
 it, there are not a lot of good options.  The main problem is
 there's no way I know of to do general conditional logic (if
 message isn't marked as deleted, save to trash, otherwise do
 nothing) directly in a macro.
 
 The only conditional logic I know of is tag-prefix-cond, but I can't
 think of a way to use that for your end.
 
 You can use backticks to move some of the conditional logic to a
 shell script.  You would need a macro that would pipe a message to
 save it in a known location, then use :push with backticks to call a
 program that read the email in that location, then either emitted
 the command to save the message or a noop depending on whether the
 email's Message-Id was in a cache.
 
 It would look something like this:
 
 macro index d 'pipe-messagecat  /tmp/message.txtenter\
 :push `/path/to/script.sh`enter' Save to trash folder
 
 /path/to/script.sh would:
 1) read /tmp/message.txt and extract the Message-Id
 2) check to see if the Message-Id was in the cache
 3) if not, print 'save-message=Trashenterenter' and add the Id
 to the cache
 
 If the message was in the cache, the script would do nothing,
 causing the macro to do nothing further.
 
 Pretty convoluted, and race-prone since you have to save the message
 in a fixed location.  There might be further tricks to remove that
 particular limitation, but I've procrastinated enough today.
 
 -- 
 Ed Blackman
Thanks Ed


delete only undeleted messages?

2014-02-26 Thread Peter P.
Hi!

I have noticed that I can delete (save to trash folder) the same
message over and over again using, 

folder-hook . 'macro index d save-message=Trash \r
folder-hook . 'macro pager d save-message=Trash \r

even after it has been marked as deleted. I end up with mutiple
accidental copies in the trash this way. Is there a way to
incoorporate the status/flag of a message as conditional for the above
key binding to only allow saving to trash if the message is not marked
as 'deleted'?

Thank you for any hints,
best, P


Re: delete only undeleted messages?

2014-02-26 Thread Peter P.
* Patrick Shanahan ptilopt...@gmail.com [2014-02-26 17:23]:
 * Peter P. p8...@aol.com [02-26-14 10:48]:
  Hi!
  
  I have noticed that I can delete (save to trash folder) the same
  message over and over again using, 
  
  folder-hook . 'macro index d save-message=Trash \r
  folder-hook . 'macro pager d save-message=Trash \r
  
  even after it has been marked as deleted. I end up with mutiple
  accidental copies in the trash this way. Is there a way to
  incoorporate the status/flag of a message as conditional for the above
  key binding to only allow saving to trash if the message is not marked
  as 'deleted'?
 
 You need sync-mailbox after the save_to_tash.  As long as you remain in
 the same mailbox, destructive actions aside from editing are not applied
 until you close, move to another, or sync the mailbox.

Thank you for the reply Patrick, I would prefer to not sync/expunge   
the mailbox after every copy to trash key shortcut.
Perhaps there is a way to make key commands aware of a message's flag 
instead.

Thank you again!
best, P


Re: delete only undeleted messages?

2014-02-26 Thread Peter P.
* Christian Brabandt cbli...@256bit.org [2014-02-26 19:45]:
 On Mi, 26 Feb 2014, Peter P. wrote:
 
  * Patrick Shanahan ptilopt...@gmail.com [2014-02-26 17:23]:
   * Peter P. p8...@aol.com [02-26-14 10:48]:
Hi!

I have noticed that I can delete (save to trash folder) the same
message over and over again using, 

folder-hook . 'macro index d save-message=Trash \r
folder-hook . 'macro pager d save-message=Trash \r

even after it has been marked as deleted. I end up with mutiple
accidental copies in the trash this way. Is there a way to
incoorporate the status/flag of a message as conditional for the above
key binding to only allow saving to trash if the message is not marked
as 'deleted'?
   
   You need sync-mailbox after the save_to_tash.  As long as you remain in
   the same mailbox, destructive actions aside from editing are not applied
   until you close, move to another, or sync the mailbox.
  
  Thank you for the reply Patrick, I would prefer to not sync/expunge   
  the mailbox after every copy to trash key shortcut.
  Perhaps there is a way to make key commands aware of a message's flag 
  instead.
 
 I see three possibilities.
 
 - Instead of deleting the actual messages you tag them and on a key 
   press, you move all tagged, not-deleted messages to your Archive/Trash 
   folder. Something like this (untested):
   
macro index,pager d 
 tag-pattern!~D~Tentertag-prefix-condsave-messagekill-line=Trashenteruntag-pattern~Aenter
  'Delete messages'
 
 - Add an folder hook, to delete duplicate messages (something like 
   this):
folder-hook =Trash 'push 
 untag-pattern~Aentertag-pattern~=entertag-prefix-conddelete-messageuntag-pattern~Aentersync-mailboxenter'
 
 - Use the trash folder patch, that is floating around and even provided 
   in some distributions like Debians mutt-patched, IIRC

 
 Best,
 Christian
 -- 
 If it weren't for the last minute, nothing would ever get done.

Wow, thanks a lot Christian for this precise information! It is 
greatly appreciated and I am going to look deeper into the solutions 
you suggest.

best, Peter