Re: [Mutt] attach file from another email to current email

2022-11-16 Thread Bastian
On 15Nov22 23:36-0600, Ranjan Maitra wrote:
> On Tue Nov15'22 12:33:32AM, Mihai Lazarescu wrote:
> > You can select the attachments you want from one source message, then reply
> > (r) or forward (f) and mutt will ask whether to attach them to the new
> > message.
> 
> Thanks very much. Sorry I am green at this: if I write an email, and 
> then after I am done writing an email, and I want to include an 
> attachment from another email (perhaps in another folder), what do I 
> do?

AFAIK this is not possible. I would say, only attaching an email as a 
whole works.

After attaching you can "edit the file to be attached" (^Xe) But that is 
not sensible.


cheers,
-- 
Bastian


Re: [ext] Re: Display info about S/MIME signature

2022-10-13 Thread Bastian
IIUC, you would like to see which certificates have been used while 
reading the mail. Sometime I also need such extra info, and I was 
struggling to get the info. So I dove again a bit into it.

On 13Oct22 08:26+0200, Ralf Hildebrandt via Mutt-users wrote:
> > gpgsm --list-keys ralf.hildebra...@charite.de
> > 
> > would give you all information about the key, including ID (which is the
> > last part of the fingerprint), serial etc.
> 
> Yeah, that's awesome. Exactly what I need!

gpgsm actually lists the content of your gnupg pubring. So you need to 
have the certificate already added to this database. Otherwise it is not 
finding the cert. And also this seems to be unrelated to the mail which 
is currently open in mutt's pager.

Another solution might be:
In mutt (pager or index view), you can use the pipe_message function 
(default keybind is |) and pipe the mail to:

--- paste: ---
openssl smime -pk7out | openssl pkcs7 -print_certs -text|less
--- eop ---

This command should work on smime multipart emails. It extracts the 
attached certificates and prints them. So you can see, which 
certificate (and which CA) were used to sign this particular email.

I think it is straight forward to bind this function to a key. It might 
also be possible to modify the config option 'smime_verify_commmand'.
But that did not work in my tests, mutt claimed verification is not 
successful even though openssl returned successfully.


Cheers,
-- 
Bastian 


Re: Display info about S/MIME signature

2022-10-12 Thread Bastian
On 12Oct22 16:12+0200, Ralf Hildebrandt via Mutt-users wrote:
> when receiving an S/MIME signed mail, how can I extract information
> about the certificate / public key that was sent along with the
> signature?

Try ^K, which is the default keybind for `extract-keys`.
This command extracts the public key and adds is to your keyring 
(smime_keys).

Also check the config options `crypt_verify_sig`, and 
`smime_verify_command`, `smime_verify_opaque_command`
When receiving a smime signed mail, mutt tells me if the signature is 
valid or not.


HTH,
-- 
Bastian


Re: Regard To-Envelope for alternates?

2022-09-19 Thread Bastian
On 13Sep22 09:49-0700, Will Yardley wrote:
> I agree that would be useful. That said, I usually handle the scenario
> you describe this way:
> send-hook '~C ^mutt-users@mutt\.org$' 'my_hdr From: Will Yardley 
> '

I had a look into the code and also experimented a bit how 
mutt_find_user_in_envelope [1] works. But as far as I see, there is no 
easy way to make it also look into further headers, because the ENVELOPE 
struct [2] does not provide those.

  1: https://gitlab.com/muttmua/mutt/-/blob/master/alias.c#L692
  2: https://gitlab.com/muttmua/mutt/-/blob/master/mutt.h#L739

Anyways, your reply gave me the idea, if the `reply-hook` might work. 
But I also did not succeed here. I think it is not possible with mutt 
hooks to work with the matched groups like below, is it?

--- paste:
reply-hook ~h'^Envelope-to:\ (.\*)$' set from=\1
--- eop

This does not work because if the expression is matched, the from is set 
to "1", group referencing is not applied or I do it wrongly. Also the 
alternates matching is run afterwards, which is good. So when the 
alternates match, they'll overwrite what the reply-hook set before.

Any idea how to use the reply-hook properly?


Cheers,
-- 
Bastian


Re: [Mutt] Is linewrap dead? Now: Self hosted SMTP

2022-09-12 Thread bastian-muttuser
On 12Sep22 21:07+0200, Mihai Lazarescu wrote:
> Given the cheap VPS, I can mirror the setup on a second VPS from a different
> provider with quick DNS switch in case of issues.

I just did that approx half a year ago. Before, everything was rolling 
just fine (for more than 10 yrs). No dead ends of my outgoing mails. 
After transferring the domain over to the new hoster, some destinations 
did not receive my mails. Either filtered into spam, some got denied 
(where I got a nice SMTP error reply) and some just got silently 
dropped.

This took me some time to figure out with each destination, why is that 
happening. And sometimes also just guessing. At least the 
mail-tester.com rate is 10/10, so it is not about my setup per se. The 
IP and/or subnet my VPS was in had a bad reputation at some denylist 
services. Question was then, how to get removed from them. Sometimes via 
automated forms and sometimes through personal mail-conversation with 
other mail operators (t-online.de was very nice and responsive to my 
surprise). For now, it seems fine again. And I would regret it to 
'throw in the towel' because of that; but to be honest, I thought about 
that.

After this experience there need to be very strong reasons to change my 
hoster again, meaning to change my IP/subnet again. 


Cheers,
-- 
Bastian


Re: Regard Envelope-to: for alternates?

2022-09-12 Thread Bastian
On 12Sep22 14:24+0200, Bastian wrote:
> Would it be feasible to also let the alternates scan the mail headers 
> and find the header 'To-Envelope'?

Sorry, the header is labled Envelope-to:

-- 
Bastian


Regard To-Envelope for alternates?

2022-09-12 Thread Bastian
Dear all,

I am a happy user of Alternative Addresses [1] in mutt, together with 
reverse_name and reverse_realname. I use this primarily when replying to 
a mail. This works if the mail is addressed (in headers to, and cc) to 
me. Then mutt recognizes and sets the from correctly to the matches 
address.

  1:  http://www.mutt.org/doc/manual/#alternates

However, when the mail is sent for instance to a maillist or without 
setting the headers to/c, then mutt sets the default From address when 
replying (setting realname).

Would it be feasible to also let the alternates scan the mail headers 
and find the header 'To-Envelope'? For me, this seems to always contain 
the correct address to which the mail was delivered to me. Well, I do 
not know where this header comes from; could be that my exim sets these 
during delivery to maildir.


Cheers,
-- 
Bastian


Re: Is linewrap dead?

2022-09-01 Thread Bastian
First, I'd like to thank Tavis for starting this discussion. I am very 
pleased to see I am not the only one struggling with this.

On 29Aug22 13:28-0400, Logan Rathbone wrote:
> FWIW, the solution/compromise I ended up using was to compose
> multipart/alternative mails with mutt, sending a very simple HTML mail
> and a standard hard-wrapped text-based mail as well. So mobile
> mailreaders can read it perfectly, and desktop users can read the
> plaintext version correctly as well.
> 
> Believe it or not, mutt actually has very sophisticated functionality to
> achieve this, and even comes with a sample script called markdown2html
> to assist with this. I tend to write plaintext mails using a subset of
> markdown *anyway*, so it works out very well.
> 
> And since sending such mails would obviously annoy certain people (eg,
> the users of this ML!) I have mutt set up to prompt if I want to send as
> multipart/alternative defaulting to no, as in:
> 
> set send_multipart_alternative = ask-no

Thanks for that pointer! I am what you might say a true believer in 
text/plain. OTOH, the world is very diverse, and looking only into one 
direction makes me feel missing other people out there. So I tend to 
like this multipart approach.

-- 
Bastian


Re: Visualising contents of a Maildir

2022-08-18 Thread Bastian
On 18Aug22 12:00+0200, martin f krafft via Mutt-users wrote:
> Regarding the following, written by "Bastian" on 2022-08-18 at 11:41 Uhr 
> +0200:
> > --- paste: % LINES=10 COLUMNS=1 mutt $OPTIONS > maildir.out ---
> > eop

Oh, I am sorry to hear that. I tested it on my side before and it 
piped a lot from the redirected stream into the file.

Here again:

--- paste:
bastian@t6l ~
1981% mutt > /dev/shm/o
  *blindly pressing q*
bastian@t6l ~
1982% wc /dev/shm/o
   1  599 6251 /dev/shm/o

--- eop

The file /dev/shm/o contains lots and lots of control characters. So 
this would be another task to get them stripped; less -r does it.


-- 
Bastian


Re: Visualising contents of a Maildir

2022-08-18 Thread Bastian
On 18Aug22 10:38+0200, martin f krafft via Mutt-users wrote:
> Not a bad idea to use the screendump functionality of X terminals. But I am
> talking thousands of lines… doubt this will work, but if it does, I'll
> report back.

Probably this could work:

--- paste:
% LINES=10 COLUMNS=1 mutt $OPTIONS > maildir.out
--- eop

You need to find the OPTIONS that mutt enters your mailbox of interest; 
and then quit it blindly.


Cheers,
-- 
Bastian


Re: Subject that ends with UTF-8, 85 or A0 ��

2022-08-02 Thread Bastian
> > I can't reproduce either.
> 
> I can reproduce the issue. In vim the character 0x52a0 is still present:
> 
> <http://d--p.de/tmp/2022-08-02_vim.png>
> 
> After quitting vim, mutt displays the unicode replacement character
> 0xfffd instead of 0x52a0:

I see it in the subject now.
There are two U+FFFD chars.

> | System: Darwin 21.6.0 (arm64)
> | ncurses: ncurses 6.3.20220625 (compiled with 6.3)
> | libiconv: 1.16
> | hcache backend: lmdb LMDB 0.9.70: (December 19, 2015)
> | 
> | Compiler:
> | Apple clang version 13.1.6 (clang-1316.0.21.2.5)
> | Target: arm64-apple-darwin21.5.0
> | Thread model: posix
> | [...]

Maybe some local vim/encoding issues on darwin?

-- 
Bastian


Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Bastian
On 02Aug22 16:04+0700, Đoàn Trần Công Danh wrote:
> On 2022-08-02 10:06:08+0200, Bastian  wrote:
> > υ 0x3C5
> > % 0xFF05
> > e 0xFF45
> > ム 0x30E0
> > 加 0x52A0
> > 
> > So only the last matches your description 'last byte is A0'
> 
> I think he meant the last byte of their utf-8 representation:
> Which means: υ 0x3C5 is 0xCF 0x85 which is ended with 0x85.

Thanks. TIL some more about utf8. When the pointer is ontop of a 
cahracter, vim shows me the character value as '0x3C5', which is the
'unicode code point'. On the utf8 chartable it is noted as 
U+03C5 and the according utf8 hex is 0xcf85.

-- 
Bastian


Re: Subject that ends with UTF-8, 85 or A0 加

2022-08-02 Thread Bastian
On 02Aug22 15:52+0900, Kenichi Asai wrote:
> - prepare .mutt/muttrc containing only the following line:
>   set edit_headers=yes
> - launch mutt and type m to create a new mail.
> - enter some e-mail address and a subject.
> - vim launches.
> - edit Subject line so that it ends with a character such as:
>   υ or % or e (whose last byte of their UTF-8 code is 85) or
>   ム or 加 (whose last byte of their UTF-8 code is A0).

The mail I received shows the characters you gave here as examples as:

υ 0x3C5
% 0xFF05
e 0xFF45
ム 0x30E0
加 0x52A0

So only the last matches your description 'last byte is A0'
I cannot see them currently, my font does not support them. But anyways 
I couldn't verify if these would be the characters you intended to send.

> Would it be possible to somehow avoid this problem?  I cannot avoid
> creating e-mails with Japanese characters in Subject and this problem
> bugs me quite much.

I think I am not able to reproduce this behavior. I appended 0x52A0 to 
the subject line. Can you verify?


Cheers,
-- 
Bastian


Re: resource for notmuch-mutt

2021-12-06 Thread Bastian
On 07Dec21 00:55-0600, mai...@email.com wrote:
> I am still new to mutt and I wanted to fix my searching and indexing 
> emails. I came across notmuch-mutt which exists in the Fedora repos. I 
> can not find a good resource for learning its features (beyond its 
> manpage). I wonder if there are suggestions. I did also find 
> maildir-utils, with a good description on the webpage, but it appears 
> that notmuch is more commonly used.

I can suggest:

- https://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/
- https://wiki.archlinux.org/title/Notmuch


Cheers,
-- 
Bastian


Re: Search program that can find an E-Mail with an exact Date: match

2021-12-01 Thread Bastian
On 30Nov21 11:00+, Chris Green wrote:
> Yes, it is rather an odd requirement and driven by history, a typical
> "if I did that now I wouldn't do it that way"! :-)

Thanks for revealing some background about it :) I find it always 
interesting, how things roll on other ends.
Probably, I would have started of with some python-foo to solve this. I 
think you found a reasonably good solution for your problem. This is 
also the biggest burden I have as sysadmin, to keep legacy up and 
running. So I feel your pain a bit :)


Cheers,
-- 
Bastian


Re: Search program that can find an E-Mail with an exact Date: match

2021-11-30 Thread Bastian
On 29Nov21 17:36+, Chris Green wrote:
> On Mon, Nov 29, 2021 at 09:45:17AM -0500, Ofer Inbar wrote:
> But does it do it recursively down a hierarchy of folders?  That's
> what I need.

Afaik, no. Mutt search/limits work on the current opened mailbox.

What you are trying to achieve is from my perspective a corner case and 
make me a bit curious about it. Currently, I cannot think of a situation 
where the Date Header is the only piece of information available to 
search for a specific email; also in a strict string and not like on Tue 
three weeks ago. Keep in mind, the Date field is set by the sender [0]. 
I am not sure which instance actually adds it, mutt (as MUA) or sendmail 
(as MTA).

  0: https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.1

Anyways, just because I cannot imagine the situation, does not mean 
there isn't one. From what I understood so far, I would have solved that 
with `grep -r`, too. Mutt and the mail indexers I am familiar with do 
not seem to provide what you are asking for.

Cheers,
-- 
Bastian


Re: OT: "domain-level" email hosting services?

2021-10-23 Thread Bastian
On 23Oct21 09:55-0400, Ofer Inbar wrote:
> I run postfix on a cheap cloud-hosted linux instance.  That does mean
> I sometimes have to deal with deliverability issues which can be annoying.
> However, I've searched for a more fully managed email hosting service
> that would let me see my logs, including logs of attempts to connect
> to deliver to my domain(s), and I don't think such a thing exists.
> I value the ability to tail -f my mail server logs enough to make it
> worth it to me to run my own server.

Same/similar here. The biggest issue for me was when the big players 
demanded SPF and DKIM. That was around 6-8 yrs ago if I'm not mistaken. 
There are tools on the net which can verify your setup, e.g. mailtester 
[0]. That was very helpful at that time. Other than that, I never had 
troubles [1]. Outgoing mails mostly end up in graylisting, but that's 
acceptable. The stack I use is exim, spamassassin, dovecot on debian 
stable since ~2006.
In addition to the reasons above, I also learned a lot about how email 
works and I was able to tweak exim config in a way which is only 
possible on a self hosted system.

  0: https://www.mail-tester.com
  1: My VM got hacked just after I started it due to a vulnerability in 
 exim. Lesson learned: Read debian-security mailing list and keep 
 system updated! But I was still young and re-installed everything.

-- 
Bastian 


Re: how to add domain name to email address (that is different from hostname)

2021-10-16 Thread Bastian
Another way to query your address book is to use mutt's `query_command`.
The way I uses it
  a. when starting a mail, mutt asks me for 'To:', 'Cc:'. There type 
'joe' press CTRL+T and I get either a list of results with results
delivered by query_coammnd, or the line immediately expands to the 
result if there is only one.
  b. Similar with SHIFT+Q

At this point I can recommend notmuch which can be integrated into mutt 
quite nicely.

-- 
Bastian


Re: Binding the pad-Enter key?

2021-09-28 Thread Bastian
On 27Sep21 11:12-0700, Kevin J. McCarthy wrote:
> I'll try to dig into it if that's not the problem.  However, my keyboard
> doesn't have a keypad so I may have some difficulty debugging.  :-)

Would this do it?

```
% xdotool key --window 0x100101 KP_Enter
```

-- 
Bastian


Re: multiple color schemes

2021-09-11 Thread Bastian
On 08Sep21 15:50-0400, Jon LaBadie wrote:
> On Wed, Sep 08, 2021 at 04:23:59PM +0300, Oleg A. Mamontov wrote:
> > On Wed, Sep 08, 2021 at 01:20:27AM -0400, Jon LaBadie wrote:
> > > I've always preferred a black letters on white background scheme.
> > > However, after cataract surgery I'm considering using a dark
> > > background scheme.
> > > 
> > > Has anyone a technique for defining multiple color schemes and
> > > toggling among them while using mutt?

While talking about colors, I'd like to suggest to have a look at the 
solarized color schemes. Configs for those are available for many 
programs (from terminal emulators up to e.g. heavy weight GUIs of IDEs).

Primarily, I use rxvt with a simple extension (perl) which switches 
the color scheme of the console between solarized-{light,dark}. Thus, 
not only mutt, but the entire console is using the same theme; in 
particular also vim, while composing the mail.

-- 
Bastian


Re: custom macro for "q" key

2021-09-02 Thread Bastian
Lets assume that after leaving the browser there is a quit command you 
could solve it with:

  macro browser q "" "QUIT MUTT FROM BROWSER"

This won't work in browsers behind composing a mail (attachment browser 
e.g.).

Another idea, I think you can always push Ctrl+C to leave mutt at any 
location.
-- 
Bastian


Re: Search and download

2021-07-29 Thread Bastian
On 29Jul21 09:38-0400, hy...@nasalinux.net wrote:
> Is "fetchmail" still a thing?

Yup. at least for me. Should I change to a modern tool?

-- 
Bastian


Re: Mutt - a scriptable email client?

2020-06-09 Thread Bastian
On 09Jun20 09:51+0200, Kia Niskavaara wrote:
> I'm looking for a scriptable email client for linux cli. Specifically I
> need to connect it to a Gmail account using IMAP IDLE so that I will be
> able to find new emails almost immediately. And secondly, when new emails
> arrive, I need a script that automatically parse the body of every email to
> look if they match a specific regular expression - and if they match, then
> another script should be executed.

This sounds like you are looking for a fetchmail/procmail solution. I 
still use those since years, well already decades, in very simple way. 

But nowadays there are more modern and active developed projects. I 
think getmail and offlineimap are to be named here, too, but I have not 
used them. Searching the net with this information I think you can find, 
what you are looking for.


Cheers,
-- 
Bastian


Re: providing IMAP password to a mutt running on a remote host

2020-05-29 Thread Bastian Tweddell
On 29May20 07:33+0200, Matthias Apitz wrote:
> I often use mutt on some remote Linux host of my ISP about which I do
> not have control as root, just a SSH login is provided. Due to this I do
> not want to store the IMAP password in ~/.muttrc or where ever there in
> plain text.
> 
> The SSH connection is initiated from my local FreeBSD laptop using RSA
> and a ssh-agent, i.e. I can do there on the remote host also:
> 
> $ ssh-add -l
> 1024 SHA256:kZHWaISpML7rzqVppZNTOR+r+6plvFsc967WqOJ5iKo 
> /home/guru/.ssh/id_rsa (RSA)

Please note: You do not trust your ISP with your mail password, but you 
give them access to your ssh-agent which publishes your private ssh-keys 
in plain-text.
This would not harm, if that key's sole reason is to access this VPS, 
but then it would also be useless there. If that key is used to access 
other systems from that VPS, your ISP has access to them, too.

> Has someone an idea how could I provide to the remote mutt session the
> IMAP credentials stored on my local laptop? 

The idea behind your question is not quite clear to me. I understand you 
do not want to store your credentials in plain-text on the VPS host 
(that's very sane). I think you not want someone to grant access to your 
systems, who has access to your VPS-storage incl any backups.
What is your understanding / trust level with your ISP in terms of 
transient credentials - meaning, via agent forwarding, or 
entering a password, or password in environment, etc. root has access 
to all of those, too, in the running system. 

If transient credentials do not raise security concerns, than there are 
some techniques with which you could forward them to the VPS. Just out 
of the top of myhead: ssh could pass over an environment variable, a 
forwarded gpg.agent could decrypt a file on the VPS, a forwarded socket 
could answer with the password ... or just type the password when 
starting mutt.

hth

-- 
Bastian Tweddell
+49 163 886 8890


Composing blocks checking for new

2018-10-29 Thread Bastian
Hi all,

I'm sure the one or the other of you also faced the problem that mutt 
enters conditions during which it does not check for new mails anymore.
These are (for me):
  - viewing email (display-message)
  - composing (new/reply) 
Sometimes it happens, that I get distracted and forget mutt in those 
conditions or e.g. composing just takes a long time.

As I rely on mutt to check for new mails and then send a bell to its 
terminal, it happens that I miss new incoming (urgent) mails. The reason 
simply is, that mutt waits/sleeps until the compose editor returns. Or 
perhaps checking for new mails is only active on the index view.

I know, this is my fault. I should be more attentive, but I think I read 
about an integration into a terminal multiplexer (screen or tmux). The 
idea was, that mutt opens a new window with the compose editor. Thus, 
the main mutt instance continues to run in the index-view and will be 
able to check for new mails.

Before starting on it all on my own, I'd like to ask here, if you are 
familiar with this and if there is a configuration I might should have 
a look at. In the end, I'd like to contribute a wiki page which explains 
all that.


Thanks,
-- 
Bastian


Re: Reply with another email as attachment?

2018-03-14 Thread Bastian
On 14Mar18 12:48 +, David Woodfall wrote:
> I couldn't find how to do that, apart from actually finding the file
> and attaching it that way. When I pressed 'a' to attach and then '?'
> for a list I had a list of my folders up, but mutt wouldn't let me enter
> them and gave a 'couldn't attach ' error.
> 
> Is there a way of doing this?

a - attach-file- attach file(s) to this message
A - attach-message - attach message(s) to this message

I don't remember all the keybindings. I have to look up especially those 
which are rarely used. I find it really helpful to hit '?' on the 
current view to get the list of keybindings along with their 
description. You can search within that list with '/'. In your case, 
searching for 'attach' you'll find the command 'attach-message'. Maybe 
this helps a bit.


Cheers,
-- 
Bastian


maildir-utils vs notmuch

2018-01-19 Thread Bastian
As this topic was touched recently, I got interested in notmuch again 
and took some time to look at it.

I used mairix for more than a decade, then switch over to mu some years 
ago for some forgotten reason and now notmuch is an interesting thing.

Right now I face a clash of features:

I really love and depend on mu's feature to track mail adresses of all 
indexed mails. I use 

  set query_command="mu cfind --format mutt-ab %s"

as an address book replacement for mutt.

On the other hand, what I really like notmuch for is it's feature to 
recontruct the mail thread. 

  notmuch-mutt -r thread

So far, I could not find a solution where notmuch is able to act as a 
address book for mutt or the other way round, where mu is able to 
reconstruct a thread. Any ideas from you to achieve the one or the 
other?


Many thanks,
-- 
Bastian


Re: collapsed threads that have unread/new mails inside

2017-09-16 Thread Bastian
On 17Sep17 04:19 +0800, Yubin Ruan wrote:
> How to identify collapsed threads that have unread/new mails inside?
> I want to assign some color to those that so that it can be distinguished, but
> currently I know no expression to express a "collapsed thread that has
> unread/new mails inside".

>From somewhere I have this in colors definitions since a long time:

color index yellow  black   "~v~(~F~N)" 
# collapsed thread with some unread & flagged


Cheers,
-- 
Bastian


Re: How to backup emails with colon in file name

2017-06-27 Thread Bastian
After following the thread a bit, my thoughts:

On 27Jun17 20:22 +0200, Simon Thelen wrote:
> On 17-06-27 at 11:20, Jason wrote:
> > On Tue, Jun 27, 2017 at 05:49:30PM +0200, Simon Thelen wrote:
> > > On 17-06-27 at 10:00, Jason wrote:
> > > > I use rsync for doing incremental backups to a USB stick. I am having
> > > > a problem that rsync does not like backing up my mutt emails since
> > > > they contain a colon in the filename. For example:
> > > > 
> > > > 1498570870.M370636P2743Q2R5bbb999d0aefc481.net1:2,S
> > > > 
> > > > Using fat32 format on the USB stick may be part of the problem but I
> > > > don't want to change to a different format for other reasons.

>From my experience I would recommend _not_ to do file system based 
backups (like with rsync) where the data source file system has more 
capabilities as the destination. Just don't do it. Chances are high 
you'll run into troubles at other locations, too.

There have been some helpful thoughts already on this threads. But 
nothing seem to fit. Here some more brainstorming:

  a Switch over from Maildir to mbox, with all its pros and cons, pro 
for your would be file name issue solved!
  b Write your own fuse fs
The API is really not too complicated. If you can code, you could 
remount your Maildir into another dir, which on the fly does s.th. 
like s/:/_/
Having that ro would also be enough, for backing up - restore is 
then another story.
Then exclude the src Maildir in rsunc and just backup the fuse mount
  c Don't use fat (sry, could not resist)


Have fun,
-- 
Bastian


Re: dev.mutt.org is down again

2017-06-11 Thread bastian-muttuser
On 11Jun17 10:57 -0400, Jack M wrote:
> Anybody else notice that dev.mutt.org is not responding?  Safari gives up and 
> says the server won't respond.  Running "Traceroute" in macOS's Network 
> Utility.app shows a stall-out (or something) after the IP address 
> 137.82.233.53.

dev.mutt.org is in maintenance over the weekend. This was announced on
mutt-dev, though [1].

  1: http://marc.info/?l=mutt-dev=149704469016375=2


Cheers,
-- 
Bastian


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

2017-01-31 Thread bastian-muttuser
On 30Jan17 17:57 +0100, Peter P. wrote:
> * Chris Green <c...@isbd.net> [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?

I use the maildir-utils "mu" as a mail indexer. That tool also creates a
database of all email contacts found and as such it is kind of a address
book.

It integrates well into mutt's address completion function (pressing
CTRL-T):

  set query_command="mu cfind --format mutt-ab %s"

Good thing: You don't have to manually fill your email address book. It
is all in the mailboxes

Drawback: I haven't found an easy way to remove/modify entries, besides
directly editing the email and the address book DB (which is ascii).
But that was necessary just one time in four years I use mu.


Cheers,
-- 
Bastian


Re: best practices answering multiple mails (at once?)

2016-11-08 Thread bastian-muttuser
On 08Nov16 19:47 +0100, Simon Ruderich wrote:
> > Hey Simon, your mail is exactly what saved me. I never noticed the ';'
> > entry in the index help screen, and for one reason or another i had
> > never had the need to operate on tagged messages until tonight, in
> > long time i use mutt. So i was trying replying to multiple messages
> > just tagging them and answering, which of course was not working.
> 
> Yeah. Tagging is also really useful when moving and deleting
> multiple mails.

If you are new to tags, give <{tag,delete}-pattern> functions (default
bound to keys T, D) a try.  These are pretty helpful for me.

-- 
Bastian


Re: saved or deleted?

2016-08-31 Thread bastian-muttuser
On 31Aug16 10:58 +0200, Gabriel Philippe wrote:
> On Wed, Aug 31, 2016 at 8:42 AM, Jon LaBadie <mut...@jgcomp.com> wrote:
> > Rephrasing, how can I tell if a deleted message has been copied?
> >
> > Currently, if I am uncertain I have to copy it just in case and
> > in the future, delete the duplicate if I created one.
> 
> Not what you want, but if you have mutt with the trash feature, it can
> be useful.
> 
> If you have deleted a message, it will be moved to the trash, thus if
> you have inadvertently deleted it you can get it back. But if you have
> moved it somewhere else, it will not go to the trash.


Sometimes I also have that problem to remember which key I pressed and
which macro was executed, so I lost track of my mails and I also purged
some mails by chance.

Honestly, I am also not fully convinced by the $ status. It is not
meaningful enough.
I'd like to note that when a mail is saved to another *box the status
line fickers 'Copying .. something'. I can't read it,  its too
quick for my local mailbox.

Maybe a solution to that problem is to simply not clear the status line.

Or even better:

Maybe I want to see a log of the current mutt session (in a quake
console style), and maybe also keep a real log of what I did ... 


What do you think?
-- 
Bastian


[SPAM?] Re: add the content of another email to new message

2016-08-24 Thread bastian-muttuser
On 24Aug16 20:38 +1000, c...@zip.com.au wrote:
> On 23Aug2016 19:47, Jethro Tull <heavyt...@hotmail.com> wrote:
> > > On 16Aug2016 19:58, Jethro Tull <heavyt...@hotmail.com> wrote:
> > > >I'm using vim as editor in mutt. I would like to find a way to dump the
> > > >content of another email or part to a new message while being composed. 
> > > >Of
> > > >course without running a new instance of mutt.
> > > 
> > > Why not by running a new instance of mutt?
> > > 
> > > Without that, you need some kind of tool that _vim_ can invoke to access
> > > message content. How are you intending to designate that message from 
> > > inside
> > > vim? [...]

Some more thoughts on this:

  - If you figure out the filename of the email, from which you want to
get some lines, then it could be a problem if that file has
content-transfer-encoding = base64 or quopri and not 7bit. Similar
issue might be content-type= text/html. And not to forget encrypted
Mail.

So, I suggest to use mutt to read/edit email in vim, because mutt
does some stuff to present the mail in a readable way.

  - Another solution to gather lines from other mails might be to use
mutt and vim's registers. 
   
Steps would be:
1. Postpone your mail (as described earlier)
2. Use mutt to find your source mails. In addition, mutt does all
   the content type/encoding handling when viewing/replying them.
3. Use named registers from vim and yank the precious content into
   them. 
4. Repeat step 3 as much as needed, either with different ragisters
   or append to one register.
3. Open the postponed mail again and paste our registers. Tadaa ..

(For that to work, verify that registers are saved after exiting
vim. see :help viminfo.)


Cheers,
-- 
Bastian


Re: tag-delete messages in collapsed thread?

2016-07-26 Thread Bastian
On 28Jun16 18:52 +0200, Francesco Ariis wrote:
> On Tue, Jun 28, 2016 at 03:26:30PM +0200, Bastian wrote:
> > I am used to have macro to move an entire thread to my trash folder:
> > 
> > --- paste 
> > macro index \cd "=trash" 
> > "move thread to trash folder"
> > --- eop ---
> > 
> > This works perfectly unless the thread is collapsed. 
> > When collapsed, all messages in the thread are tagged (great), but only
> > the visible, first message is saved/deleted. 
> > 
> > So  does not work on collapsed messages with my config.
> > 
> > I failed to find it, but is there a config option to change that
> > behaviour?
> 
> using , even on a collapsed thread, correctly tags
> every message with 'D'. Of course you'd have to add, say
> 
> set trash="+trash"
> set delete=yes
> 
> to your .muttrc. Would that fit your use case?

That might be a solution. (I do not use any of the trash patches
though.)

Further more, any other command with the  is not applied to
messages that are hidden in collapsed threads. Is that intended
behavior?

-- 
Bastian


tag-delete messages in collapsed thread?

2016-06-28 Thread Bastian
Hi all,


I am used to have macro to move an entire thread to my trash folder:

--- paste 
macro index \cd "=trash" 
"move thread to trash folder"
--- eop ---

This works perfectly unless the thread is collapsed. 
When collapsed, all messages in the thread are tagged (great), but only
the visible, first message is saved/deleted. 

So  does not work on collapsed messages with my config.

I failed to find it, but is there a config option to change that
behaviour?


Many thanks,
-- 
Bastian


Re: How do you survive without notmuch?

2016-04-07 Thread bastian-muttuser
On 07Apr16 19:53 +0200, Andreas wrote:
> Am 07.04.2016 um 01:19 schrieb Cameron Simpson:
> > Usually when I reach for notmuch it is because I have mismanaged my
> > folders.  Hmm, that message about blah isn't there - where is it?

Here, just a quick glimpse into my experience.
I discovered an easy way of life, at the time I stopped to sort my mails
into folders - either manually or automatically. For me it was just one
big source of failures. Mails could sometimes be sorted into multiple
folders, so where should I look to find that one again? And what the
heck is the sent-folder for? It just rips threads apart.

This made me change completely my email administration approx a decade
ago. Now, I just use two maildirs. inbox and trash. Where trash is more
the entire mail history and inbox a kind of todo or active threads.
Mails I sent are also put into inbox, thus I can follow threaded
discussions much better.
To find emails by searching, I begun to use mutt's powerfull limit
functionality on the trash. This became quite slow by time and growing
mbox. Afer changing to maildir, I also got interested in mail indexers
(started with mairix, now maildir-utils) which let me easily and
dynamically switch to the context I desire. 

In addition to that, since using maildir-utils, I use `mu cfind` as my
email address book via query_command. So there is no need to add
mailaddresses to the alias file any more. 

By now I cannot imagine any solution which is more flexible (for me).
Comments welcome!

> Me too and while it does find the message it does not tell me /where/ it
> is. How do you do this?

I do not precisely know about notmuch, but the indexers I know about
they create links to the original mail in a temporary maildir folder. At
least follow those links.
Actually, to find the location of a mail file grepmail is a nice tool,
which I used long time ago.


Cheers,
-- 
Bastian


Re: leaking timezone

2016-03-23 Thread Bastian
On 24Mar16 11:51 +1100, m...@raf.org wrote:
> Cameron Simpson wrote:
> 
> > On 23Mar2016 13:56, John Long <codeb...@inbox.lv> wrote:
> > >On Tue, Mar 22, 2016 at 08:40:21AM +1100, Cameron Simpson wrote:
> > >>On the othe hand, I do not think mutt makes the header. I'm in
> > >>compose mode right now with headers and the Date: header is not
> > >>there.
> > >
> > >Aside from the Received: header that was already mentioned upthread, Mutt
> > >can add headers when it sends meil that you don't see in compose mode. I
> > >don't think it's a proof of anything that you don't see it.
> > 
> > How irritating.

Is it? Besides Date: mutt adds many more when actually sending. Think
about mime, charset, msgid, ...

> but it makes sense for the Date: header not to be present when composing the
> email. it hasn't been sent yet. it might get postpone, or it might take a
> lot of time to write, etc. it makes sense for it to be added when it is sent
> and not before. perhaps if you put your own Date: header in while composing,
> mutt would not replace it.

In fact mutt replaces any Date: header. Play around with a simple
sendmail= script [1] and you can see what mutt pipes towards the mta.

  1: http://www.mutt.org/doc/manual/manual.html#toc6.3

Cheers,
-- 
Bastian


Re: leaking timezone

2016-03-23 Thread bastian-muttuser
On 22Mar16 08:40 +1100, Cameron Simpson wrote:
> >>TZ=UTC mutt
> >Thank you! A most elegant quick solution!
> 
> On the othe hand, I do not think mutt makes the header. 

The input to my sendmail= script lists a date header. (1.5.24)
So, mutt does it I assume.

> I'm in compose mode right now with headers and the Date: header is not
> there.
  
Wild guess: Date: is added right before sending 'y' ?

> This suggests that the mail system may be making yours also. So your
> mutt "sendmail=" settings says what to use to dispatch email; if you
> make that a tiny shell script which sets TZ and then runs sendmail (or
> msmtp or whatever) then you can read email in your local timezone and
> have the mail system generate a UTC
> Date: header.

Further idea:
 - Use the sendmail= script to modify the date header
 - Or configure/hack msmtp to rewrite/modify it


Cheers,
-- 
Bastian


Re: sending mails readable on small screens

2015-11-30 Thread bastian-muttuser
On 30Nov15 15:44 +, Samir Benmendil wrote:
> On Nov 29, 2015 at 19:42, Matthias Apitz wrote:
> >El d?a Sunday, November 29, 2015 a las 05:55:32PM +0100, Bernard Massot
> >escribi?:
> >>I'm struggling to build mails readable on small screens, ie mails whose
> >>lines wrap correctly even when there are few columns. I'm indeed
> >>thinking of smart phones.
> >>
> >>I thought format=flowed would be the answer. However the first mailer I
> >>tried – K9 mail – doesn't support f=f. I guess Android's native app is
> >>no better. So f=f isn't the universal solution.
> >Your mail renders fine in my Ubuntu mobile phone BQ E4.5, in Dekko and in
> >mutt, see the screens:
> >
> >Dekko: http://www.unixarea.de/screenshot20151129_180118205.png
> >mutt:  http://www.unixarea.de/screenshot20151129_180302430.png

f=f seems to be the esoteric way to tackle that problem. All other
users just make sure their terminal is at least 80 chars wide.

text/plain is just what it is, plain text. No formating meta data in
there.

One more thing I did not entirely get is, do you intend to reformat all
messages you receive or do you want to asure that messages you send will
be reformated on the recipents side? Anyway, both approaches won't work,
if you ask me. There are too many MTAs out there which all behave
differently when composing, formatting and paging emails.

> No it does not: http://rmz.io/ff.png

That screen is approx 65 chars wide/narrow. But also I would not count
that as not readable.

> >>What do you suggest? It seems HTML is the only widely supported format,
> >>which doesn't have line wrapping problems. So should I make Mutt
> >>creating automatically an HTML part of a multipart/alternative, using an
> >>empty HTML page template and wrapping paragraphs in  tags? Is there
> >>something more clever to do?
> >No, please no HTML.
> Indeed, please don't use HTML.

I sign that, too, but I also think that you are not wrong - given that
fact that most MTAs support html paging.

> You might have better luck with "quoted-printable". "f=f" is much
> nicer though.

To my knowledge quopri is an encoding method. I would not say that could
solve the problem here.


Cheers,
-- 
Bastian


Re: Move old messages

2015-11-30 Thread bastian-muttuser
> > Later on, you can use '=' which expands to that path, e.g.:
> > 
> >   folder-hook FreeBSD$ push 
> > 'T~d>5d;s=incoming/os/bsd/FreeBSD-OLD  
> > 
> > will save to a folder in ~/mail/incoming/os/bsd/FreeBSD-OLD
> 
> I undestand this ... the messages are currently tagged "*" ... so that seems 
> to
> be fine ... my problem is that I am NOT getting to the "D" stage ... I have
> tried the "=" but still nothing ...

I don't see any mistake here.
The part that tags the mails seems to work:

  T~d>5d

The second part should run the save-message command (s) on all tagges
messages (;) to the mbox named (=...):

  ;s=

Maybe you have bound the s key to another function?  

I would try that manually and see what happens step by step.

-- 
Bastian


Re: Move old messages

2015-11-28 Thread bastian-muttuser
Hey Danny, for mailing lists please try to use inline responses. Keep
the referenced mail on top and just as much as it gives enough context
to understand the discussion by other readers whi might not have seen
the original one. Find more in rfc1855 [1]

  1: http://www.ietf.org/rfc/rfc1855.txt

On 28Nov15 09:55 +0200, Danny wrote:
> O.k ... The messages older than 5 days gets tagged but not moved to the 
> archived
> folder ...

I was wondering about your /incoming root folder.

> The mails gets put into ~/mail/incoming/operating_systems/FreeBSD (by 
> procmail)
> ... the folder I want it to go to is
> ~/mail/incoming/archived/freebsd/freeBSD-Archived ...
> 
> I think I am getting the paths wrong ...

Please somebody correct me, mutt uses the 'folder' variable which points
to the root of your mailboxes. Which mailbox type do you use, btw?

According to what I know from your mails, make sure to 

  set folder = '~/mail'
 
Later on, you can use '=' which expands to that path, e.g.:

  folder-hook FreeBSD$ push 'T~d>5d;s=incoming/os/bsd/FreeBSD-OLD 
 

will save to a folder in ~/mail/incoming/os/bsd/FreeBSD-OLD

Also make sure that the folder already exists, otherwise mutt will ask
to create it.

Additional remark:
The tagged and saved mails are not purged immediately from you FreeBSD
mailbox. They are marked with D and will be purged as soon as you save
the mailbox.

Cheers,
-- 
Bastian


Re: Move old messages

2015-11-28 Thread bastian-muttuser
> One thought, if I'm away for a week or more this would archive several
> days of unread mail.  Adding a simple ~R to the pattern seems to
> eliminate this concern.  Are there any side-effects I overlook?
> 
>   folder-hook FreeBSD$ push 
> 'T~R~d>5d;s/incoming/os/bsd/FreeBSD-OLD

What I can tell you about the regex criteria is that ~R and ~d are
and'ed together. From that knowledge your pattern looks ok.

-- 
Bastian


Re: Move old messages

2015-11-27 Thread bastian-muttuser
On 27Nov15 16:33 +0200, Danny wrote:
> O.k ... I tried various combinations but it does not seem to work
> 
> folder-hook .FreeBSD push 'T~s>5d;s/incoming/os/bsd/FreeBSD-OLD 
> is
> what I tried last ...

Right. Of course I inserted some typo.  ~s is the metachar for the
subject of the mail. Try it with a ~d which corresponds to the date
received.

  folder-hook .FreeBSD push 'T~d>5d;s/incoming/os/bsd/FreeBSD-OLD

Watch out:
The first argument to folder-hook is a regexpr. So be careful with that.
.FreeBSD will (most probably) match both of your mailboxes FreeBSD and
FreeBSD-OLD.

Better try first:

  folder-hook FreeBSD$ push 'T~d>5d;s/incoming/os/bsd/FreeBSD-OLD

Here, the '$' marks the end of a line, thus the folder FreeBSD-OLD will
not be matched.

Cheers,
-- 
Bastian


Re: Move old messages

2015-11-27 Thread bastian-muttuser
On 27Nov15 15:18 +0200, Danny wrote:
> How can I have Mutt move messages (to another folder) automatically after 5 
> days when I go into a
> folder?
> 
> I am subscribed to many mailing lists and like to keep old messages for 
> archival
> purposes. However, after a few days these folders are getting just too big.
> 
> For example: When I open up the FreeBSD folder I want Mutt to automatically 
> move
> the older messages to FreeBSD-OLD folder.

I did achieved a similar goal with:

  folder-hook .folder push 'D~d>365d

Deletes messages which date is >356 days.

So yours might be:

  folder-hook .FreeBSD push 'T~s>5d;s.FreeBSD-OLD

Use that with caution, its a draft and untested. But should give you an
idea.


Cheers,
-- 
Bastian


Re: understanding PGP encrypt to myself

2015-11-15 Thread Bastian
> I see. So it is one email, but there is never actual double encryption
> on the same text. It is two single encryptions. I think I am
> understanding more.

It is one email which is encrypted only _once_, but against a set of
puclic keys which get referenced in the cipher text. So it is also
possible to have more pgp recipients than two. Obviously, the de- and
encryption algorithm is designed to support this. But keep in mind, as
more public keys are used the attack vector gets broader. Certainly you
can read how the crypto works (prime numbers) online or try to ask on
the pgp mailing lists for more detail.

-- 
Bastian


mutt mail archives

2015-09-01 Thread bastian-muttuser

The mutt homepage [1] links to the mutt mailing list archives for -users
[2] and -dev [3]. Both are not reachable (at least right now). 


  1: http://www.mutt.org/mail-lists.html
  2: http://marc.theaimsgroup.com/?l=mutt-users
  3: http://marc.theaimsgroup.com/?l=mutt-dev


The domain marc.theaimsgroup.com seems not to be resolvable anymore.

Are there any other archives available?


Cheers,
-- 
Bastian


Re: saving messages to files/permissions?

2015-06-22 Thread bastian-muttuser
On 17Jun15 12:37 -0500, Derek Martin wrote:
 On Sun, Jun 14, 2015 at 09:36:44PM +0200, bastian-muttu...@t6l.de wrote:
  On 13Jun15 22:55 -0700, Ian Zimmerman wrote:
  I think it is worth to solve the trouble of file permissions. FMPOV this
  behaviour is not typical to unix philosophy, because you cannot
  influence file modes via the umask syscall.
 
 This is wrong.  The file permissions are what they are quite
 specifically and intentionally for security reasons.  If you want to
 make the files less secure, you are required to make a conscious
 decision on a case-by-case basis, and take action to do so, and that
 is as it should be.

Right, I want to make files less secure and I really know a lot about
the implications. The point where I see room for improvement is the
lack of configurability to be able to change the behaviour of writing
out attachment files - not mailbox files. Everything tends to be
configurable in mutt. Whereas, hard-coding umask and file mode bits does
not look like the ultimate mutt-like solution FMPOV.

 This issue has been discussed and debated ad nauseum in the past, and
 this is one of those cases where the developers should do (and have
 done) what is right without regard to what the users want, because
 what the users want is simply just plain wrong--but they've proven too
 difficult to be convinced of that.  I'm not going to rehash the
 argument here; if you search the archives, you should find the
 discussion.  
 
 Whether anyone likes it or not, the fact is that when it comes to
 software security, most users--and even a large portion of the
 developers--just don't have any idea what they are talking about, and
 to some extent people who know better need to make the decision for
 them to prevent the possibility of bad things happening on a
 wide-spread basis.  This is one of those cases--the small
 inconvenience of having to manually change the permissions is VASTLY
 outweighed by the harm that could be done by allowing for the file
 permissions to be less restrictive by default.

I can still survive while doing that. But I have to admit, I do not get
the clue, why I should want my attachment files to be handled in an
imposed and uninfluenceable 'top-secret' manner. All other files I work
with in the same 'classification level' are created with the umask
setting I chose in .profile. 

 However, it would be good to document this somewhere, since it's come
 up more than once.

Cheers,
-- 
Bastian


Re: saving messages to files/permissions?

2015-06-15 Thread bastian-muttuser
On 15Jun15 11:31 +0200, Matthias Apitz wrote:
 To the OP: Can you please post here:
 
 $ ls -ld .
 $ ls -l file-to-save-in
 $ id

In addition:

df -T .
mutt -v


Cheers,

-- 
Bastian


Re: Forwarding mail with attachments?

2015-06-15 Thread bastian-muttuser
On 15Jun15 08:41 +0100, David Woodfall wrote:
 Is there a way of forwarding an email and all attachments too?

Attachments are forwarded if you answer 'yes' to 'forwarding as
attachment?'.  Drawback is, you cannot reply-inline.

-- 
Bastian


Re: saving messages to files/permissions?

2015-06-14 Thread bastian-muttuser
On 13Jun15 22:55 -0700, Ian Zimmerman wrote:
 On 2015-06-13 21:59 -0700, Tom Fowle wrote:
 
 Tom I often save individual incomming emails in seperate files in my
 Tom home directory with the mutt s command.  In any session, the
 Tom first time I save to a particular file it goes fine.  However if I
 Tom try to save another message to the same file, I get Permission
 Tom denied.
 
 Tom checking the permission of the file it is -rw- --- ---
 
 Tom I can, of course open another console and chmod to correct this
 Tom without leaving mutt, but I don't recall this problem with my
 Tom previously installed old fedora.
 
 Wait, something is odd here.  Are you running mutt as a different user?
 If not, why would it have any trouble writing to a file with 0600
 permissions?  Those two bits are _user_ read and write, after all.
 
 I think you should attack this angle before you try to change the
 permissions.

I think it is worth to solve the trouble of file permissions. FMPOV this
behaviour is not typical to unix philosophy, because you cannot
influence file modes via the umask syscall.

This behaviour also bothered me, even though I use just one UID
basically. See below for my reasons to work on it, if interested.

 strace may be your friend.

Code rules. In my current mutt (Mutt 1.5.23+89 (0255b37be491)
(2014-03-12)) I find two locations, where umask and mode bits are set
hard-coded, so no way to modify without re-compiling.

First, main.c:599
  
  umask (077);

  This could be set to 022, which also opens other permissions to other
  users. So you should know if you really want it.

Second, lib.c:645 and :657

  if ((fd = open (safe_file, flags, 0600))  0)

  Here again, when files are opened in a safe way when writing out
  attachements, file mode bits are set hard-coded :/

  Here you can set 0666 as mode bits. The open syscall also binary-ands
  () the bits from the umask setting, either set them globally to 022
  in main.c or - the way I'd propose - change umask before writing out
  attachements and then reset to the previous one.


Finally, here is my trouble with it. I got used to save attachments to
~/public_html/$somewhere to have them available remotely via browser. I
always had to chmod a+r manually to enable all users including the web
server process to read that files.

In addition, these hard-coded umask and file mode bit settings are in
the mutt source repositories (see version reference above), so I think
the same behaviour should be seen on fedora, but I don't about any
patches from their side.

Cheers,

-- 
Bastian


Re: Cannot render Spanish accents in builtin pager

2015-06-02 Thread bastian-muttuser
On 01Jun15 20:06 -0400, Xu Wang wrote:
 I cannot seem to configure mutt such that the builtin pager renders
 accents.
 
 Todavía is shown as TodavM-CM--a
 También is shown as TambiM-CM-)n

Did you compile mutt yourself?
I had similar issues and solved this when building against libncursesw5
instead of libncurses5 (note the w for wide, which is utf support afaik)

And of course the locale command shows:

% locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=


Cheers,

-- 
Bastian


Re: Cannot render Spanish accents in builtin pager

2015-06-02 Thread bastian-muttuser
On 02Jun15 08:44 -0400, Xu Wang wrote:
 This worked. Thank you so much for your help with this. All I had to
 do was install libncursesw5-dev and reconfigure mutt and it worked. I
 did not have to chance any configure flag.

I am happy to hear that.
My understanding is that the configure script checks first for ncurses
and afterwards for ncursesw. Thus, it will prefer the use of ncursesw
over ncurses.

 I originally read this:
 http://dev.mutt.org/trac/wiki/MuttFaq/Charset
 which was helpful (although not very structured), and it mentions
 something about about ncurses with wide char support, but I did not
 try it because it is listed under
 UTF-8 chars are displayed fine, but the screen is garbled
 which I don't think described my problem. Also, I did not need to
 specify --enable-widec.

That configure switch is not available in my branch.

 Please let me know if an update is needed to that page and I will make
 an account and attempt a change. However, since I do not know anything
 about this topic deeply I am hesitant to do anything without further
 confirmation.

I guess the wiki page is worth updating, with noting the version of
mutt. But, I am just a simple mutt user, so I don't feel to en- or even
discourage you doing so ;-)

Cheers,
-- 
Bastian


Re: mutt's counterpart feature to gmail's archive?

2015-04-17 Thread bastian-muttuser
On 16Apr15 22:11 +0200, Heinz Diehl wrote:
  Also the fcc is set to inbox so that I can see in threaded view the
  history of dialogs/threads.
 
 I'm doing virtually the same by specifying
 set record=+.INBOX

Exactly.

  To search the mailboxes I use mairix which I invoke inside mutt via a
  key-bind. Very quick and reliable by now. 
 
  If there is interest I'll share some config and scripts on the mairix
  setup.
 
 Please go ahead ;-)

There are two parts. The key-bind in muttrc and a script, which simply
fakes a cmd-line within mutt and executes mairix. Afterwards it
automatically switches the folder view to the search results.

You can find all the details on how to set it up here:

  https://pbrisbin.com/posts/mairix/



-- 
Bastian


Re: mutt's counterpart feature to gmail's archive?

2015-04-16 Thread bastian-muttuser
On 16Apr15 00:32 +0200, Quolick wrote:
 What is mutt's counterpart feature to gmail's archive? what is used
 here?  I don't want to delete messages, but I want to have them
 locally searchable, like gmail can do.
 What is the best practice? Just to move to another folder?


Plain and easy and comfortable:

I just have two main mailboxes: inbox and trash.

Also the fcc is set to inbox so that I can see in threaded view the
history of dialogs/threads.

To search the mailboxes I use mairix which I invoke inside mutt via a
key-bind. Very quick and reliable by now. 

The most notable benefit for me was to get rid of the trouble how to
sort mail into tons of mailboxes.
The virtual view of mairix creates a temporary mailbox of of the search
results.

If there is interest I'll share some config and scripts on the mairix
setup.


-- 
Bastian


Re: integration with mu (or similar programm)

2014-05-20 Thread Bastian
On 20May14 08:34 +1000, Cameron Simpson wrote:
 On 19May2014 21:08, Rejo Zenger r...@zenger.nl wrote:
 Any implementation of mu into mutt I have found or could think of
 requires a two step process. One that does the actual search and
 compiles a list of results, another to browse this list. [1]
 
 Now, I would like to do this more smoothly: only give one command (one
 shortcut), provide the search string and have the results returned
 immediately. Does anyone know if this is possible - other than hacking
 the code of mutt?
 
 [1] http://dev.mutt.org/trac/wiki/UseCases/SearchingMail
 
 My approach to this is twofold.

Some time ago I found a solution, which neatly integrates external
searching into mutt. It mimics the typical UI of mutt which enables the
user to enter the search string at the command line and then presents
the search results in the pager (a view on a read-only, temprary
folder).

I cannot find the original source which inspired me, so I just paste my
solution:

mairix_impl.sh
{{{
#!/bin/bash

CONFIG=$HOME/.mutt/mairixrc

base=$(grep '^base=' $CONFIG | cut -d\= -f2)
mfolder=$(grep '^mfolder=' $CONFIG | cut -d\= -f2)

# prevent rm / further down...
[[ -z $base/$mfolder ]]  exit 1

searchdir=$base/$mfolder

set -f  # disable globbing.
exec  /dev/tty 31  /dev/tty # restore stdin/stdout to the terminal,
# fd 3 goes to mutt's backticks.
saved_tty_settings=$(stty -g)   # save tty settings before modifying
# them

# trap Ctrl-G to cancel search
trap '
  printf \r; tput ed; tput rc
  printf / 3
  stty $saved_tty_settings
  exit
' INT TERM

# put the terminal in cooked mode. Set eof to return so that pressing
# return doesn't move the cursor to the next line. Disable Ctrl-Z
stty icanon echo -ctlecho crterase eof '^M' intr '^G' susp ''

set $(stty size) # retrieve the size of the screen
tput sc  # save cursor position
tput cup $1 0  # go to last line of the screen
tput ed  # clear and write prompt
tput sgr0
printf 'Mairix search for: '

# read from the terminal. We can't use read because, there won't be
# any NL in the input as return is eof.
search=$(dd count=1 2/dev/null)

# clear the folder and execute a fresh search
( 
  #rm -rf $searchdir
  mairix -f $HOME/.mutt/mairixrc -p
  mairix -f $HOME/.mutt/mairixrc --threads $search
) /dev/null

# fix the terminal
printf '\r'; tput ed; tput rc
stty $saved_tty_settings

# to be executed by mutt when we return
printf change-folder-readonly=$mfolderreturn 3
}}}

mairixrc
{{{
# where you keep your mail
base=$HOME/Maildir

# colon separated list of maildirs to index.
#
# I have two accounts each in their own subfolder. the '...' means there 
# are subdirectories to search as well; it's like saying GMail/* and 
# GMX/*
maildir=.:.trash...

# I omit gmail's archive folder so as to pevent duplicate hits
omit=

# search results will be copied to base/this folder for viewing in 
# mutt
mfolder=.mfolder

# and the path to the index itself
database=$HOME/.mutt/mailrix.db
}}}

muttrc [snippet]
{{{
# integrate mairix http://pbrisbin.com/posts/mairix
macro generic ,/ enter-commandset my_cmd = 
\`$HOME/.mutt/mairix_impl.sh\`returnenter-commandpush \$my_cmdreturn 
search messages via mairix
}}}


Ha, there is also the link to the original mairix integration at
pbrisbin.com.


BTW, in the same way there is an integration of a CheckAttach script
which is very much helpful to me :)
See the last entry here:
http://dev.mutt.org/trac/wiki/ConfigTricks/CheckAttach




Cheers,


-- 
Bastian


Re: search in sent

2014-02-27 Thread bastian-muttuser
On 27Feb14 07:40 +0100, vwf wrote:
 I may make a mistake, but I fail to search in my sent mailbox.
 In other mailboxes, by hitting '/' I can search the adress and subject
 fields. In sent this does not work. Are there search options I am
 unaware of, or is something else the matter? I use Maildir if important.

When beeing in search folder, what does ? show?
Is there a similar/same binding for / as in your other folders?

Like:
/search search for a regular expression



If not, I suspect you have some hook, which reconfigures your key
binding for the sent folder.

-- 
Bastian


Re: 100,000 messages, and counting.

2014-02-17 Thread bastian-muttuser
On 17Feb14 18:50 +, Alan Mackenzie wrote:
 My inbox has now reached the grand total of 100,000 messages (_exactly_
 100,000, coincidentally enough).   This is partly a result of me being
 subscribed to too many mailing lists, and partly of me not getting
 around to clearing things out.

mbox or maildir?

 (Yes, I know I could do clever things to split incoming messages amongst
 several mailboxes, but I don't _want_ to.)

I also have just two mailboxes.
inbox and trash! That's enough.
For sorting/splitting there is mairix (or plain mutt searching) :)

I started to use trash as my 2nd level mailbox, because startup of mutt took too
long.

Because deleting mails rewrote my entire mbox, I switched over to maildir, so 
no rewriting of the
mbox file is necessary.

Cheers,
Bastian


Re: auto reply to html-mails

2014-01-21 Thread Bastian
On 20Jan14 17:08 -0800, Will Yardley wrote:
 set 
 alternative_order text/plain text/enriched text/html

In addition to that I also use 

  auto_view text/html

which automatically inlines html content into the pager, by using the
.mailcap routine 

  text/html; /usr/bin/w3m -I %{charset} -T text/html -dump; copiousoutput;

So, no further anoying keystrokes are needed.


Questions compiling mutt

2014-01-06 Thread Bastian
Hello all,

I would like to ask for some comments on issues I have 
compiling/installing mutt in my $HOME.

I do this:

{{{
% hg sum 
parent: 6346:3306cb186f49 tip
 Merge stable into default
 branch: default
 commit: 1 modified, 3 unknown
 update: (current)


% ./configure --prefix=${HOME}/local --disable-pop --disable-imap \
--disable-smtp --enable-gpgme --with-curses --enable-external-dotlock

% make  make install
}}}


These are the problems I see at the moment:

A. 
  --enable-external-dotlock does not seem to be recognised.
  Not that important. I need a mutt_dotlock not changing EUID, because
  my Maildir is in an encfs mount. root cannot do anything in there.

B.
  compiling works, but installing stops at:
  chgrp: changing group of `${HOME}/local/bin/mutt_dotlock': Operation not 
permitted
  Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in 
the mail spool directory.

  I am not root, so I can't chgrp. The make install stops here. Maybe
  some more steps are missing.

C.
  my mutt version does not display UTF8 properly. Umlauts are not
  printed in the pager.
  Do I miss a configuration or a library?

  

Thanks,
Bastian



Here is the output of mutt -v:
{{{
% mutt -v
Mutt 1.5.22+18 (3306cb186f49) (2013-10-16)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 3.2.0-4-amd64 (x86_64)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
libidn: 1.25 (compiled with 1.25)

Compiler:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' 
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs 
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.7 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object 
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu 
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5) 

Configure options: '--prefix=${HOME}/local' '--disable-pop' '--disable-imap' 
'--disable-smtp' '--disable-external-dotlock' '--enable-gpgme'

Compilation CFLAGS: -Wall -pedantic -Wno-long-long -g -O2

Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL  -USE_FLOCK   
-USE_POP  -USE_IMAP  -USE_SMTP  
-USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSS  -HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  -USE_HCACHE  
ISPELL=/usr/bin/ispell
SENDMAIL=/usr/sbin/sendmail
MAILPATH=/var/mail
PKGDATADIR=${HOME}/local/share/mutt
SYSCONFDIR=${HOME}/local/etc
EXECSHELL=/bin/sh
-MIXMASTER
To contact the developers, please mail to mutt-...@mutt.org.
To report a bug, please visit http://bugs.mutt.org/.
}}}



Re: Questions compiling mutt

2014-01-06 Thread Bastian
On 06Jan14 12:37 +0100, LEVAI Daniel wrote:
my mutt version does not display UTF8 properly. Umlauts are not
printed in the pager.
Do I miss a configuration or a library?
 
 This is a long shot, but did you link with the wide-char ncurses lib?
 ie.: $ ldd ${HOME}/local/bin/mutt |grep curses
  is this cursesw?

Many thanks. Somehow only libcurses-dev was installed. 
Installing libcursesw-dev solved this issue.

 OTOH, if the character-woes are in the pager, then it is perfectly
 feasible that the character coding is wrongly set in the e-mail itself.
 Check the Content-type header; if that encoding should contain said
 character, then check the mutt options `charset', `assumed_charset'.

Just to precise, wrong characters were in pager and index..


Cheers,
Bastian


Re: set sender profile when replying depending on received message

2011-02-01 Thread Bastian
On 31.Jan.11 07:26 -0800, Michael Elkins wrote:
 alternates name-.*@domain
 set reverse_name

Thanks a lot, that is exactly what I want. 


set sender profile when replying depending on received message

2011-01-31 Thread Bastian
Hi all,

   I got stuck, while trying to get the following to work:

   . I am able to receive mails by local_part filtering, this means,
 name-topic1@domain, name-topic2@domain, ... 
 are automatically forwarded to name@domain
   . Now when I reply to a mail I have received e.g. on the address
 name-topic1@domain, I want mutt to take this address and put it
 into the From field (plus some additional config changes 
 like http://www.acoustics.hut.fi/~mara/mutt/profiles.html)
   . All -xx suffixes are arbitrary and nowhere configured,
 filtering is done by pattern matching.
   . I use mutt (1.5.18 debian) currently


   How could I implement the filtering?

   I faild using message-hook, which works in principle, because I did not
   get the clue how to pass a matched string to the executed command.

   After that, I tried a workaround. The message-hook runs a script,
   which writes the desired mutt commands to tmp file. Which could be
   sourced after piping:

  message-hook . push 
'pipe-message~/.mutt/message_hook.plentersource~/.mutt/message_hook.tmpenter'
   
   The message pipe works, but I am not sure if source is the right syntax 
   here, because From is not changed. Sourcing it manually works.


   Are there other, more suited, ways to implement this?
   E.g something like pipe message to a script and the output of the script is
   piped automatically by mutt?


   Thanks for reading

   Bastian