Re: Using a sendmail replacement?

2016-02-22 Thread Tim Gray

On Feb 21, 2016 at 02:03 PM +0100, Gabriel Philippe wrote:

On Sun, Feb 21, 2016 at 11:47 AM, Andreas Doll  wrote:

On 2016-02-21 at 12:59, li...@2ion.de wrote:

I am using msmtp[1] for this. You can keep its configuration entirely in $HOME.


I second that, msmtp works fine for me in the described setting. Note that it
only works online, for offline usage see [1].

[1]https://wiki.archlinux.org/index.php/MSMTP#Using_msmtp_offline


Thanks, I will test that. I need offline (and more generally I want
send-and-forget from mutt, without delay for DNS request, etc.).


Just another option to msmtp if you are looking for one:

Some years ago I started using putmail instead of msmtp.  As it is 
not actively developed, I forked it and cleaned up the queuing scripts.  
It can be found on my github page [1].  My mutt sendmail is set to a 
wrapper shell script that queues all messages passed to it 
automatically, and then immediately dequeues them if I have an active 
connection.  I have the dequeue script called in my crontab as well.  
I've been using it this way for it least 5 years with no problems.  

Configuration is in $HOME and it can be set to use multiple SMTP 
accounts based on your from address.


The wrapper around putmail (or msmtp) is nice because you can tee off 
the message to other utilities too if you need to, like one for 
collecting email addresses you've sent to.


[1]: https://github.com/tgray/putmail

Tim


Re: options for mutt + notmuch integration

2015-05-24 Thread Tim Gray

On May 24, 2015 at 05:55 PM -0400, Xu Wang wrote:

Assuming notmuch is the way to go, I have looked into options for
integrating mutt and notmuch.

I see the following possibilities:
(1) mutt-kz
(2) the python script.
(3) mutt-notmuch [1] (I understand this is deprecated, see [2])
(4) notmuch-mutt, which is integrated into notmuch (see [3])

Is there another possibility I should look into?


I've always meant to play around with the patched mutts that work with 
notmuch, but to be honest, I've been using mu (maildir utils) for years 
and it works pretty great.


http://www.djcbsoftware.nl/code/mu/

I use muttjump as a wrapper to do the searching and opening up found 
results.


https://github.com/weisslj/muttjump


sourcing output from a program

2015-01-01 Thread Tim Gray
I'm sure this has been covered before.  I want to source a set of 
aliases that are generated by a program I've written.  Right now I've go 
the following lines in my muttrc:


source `~/bin/script.sh  ~/.mutt/aliases; echo ~/.mutt/aliases`

This seems like a roundabout way to do things.  Is there some way to 
source the output directly instead of dumping it to a file and echoing 
the file name?


Thanks,
Tim


Re: sourcing output from a program

2015-01-01 Thread Tim Gray

On Jan 01, 2015 at 07:01 PM +0100, Francesco Ariis wrote:

Are you looking for `source '~/folder/script.sh|'` maybe?


Yes I am. Thanks!

Tim


Re: forgotten commands

2014-12-22 Thread Tim Gray

On Dec 22, 2014 at 12:12 PM -0700, Bob Holtzman wrote:

On Sun, Dec 21, 2014 at 05:06:26PM -0500, Patrick Shanahan wrote:

* Orm Finnendahl orm.finnend...@selma.hfmdk-frankfurt.de [12-21-14 16:36]:
Or w/o making a macro,
  switch to the folder
  T.  to select all
  ;N  to toggle the READ flag



On my machine T. selects all messages and ;N deletes the thread that
happens to be highlited.


Tag your messages however you want.  I usually use the 'tag-pattern' 
command, but you could also tag them manually.


A lot depends on how your key bindings are set up.  I'd toggle help while 
in the index and search for the following commands and see what their 
bindings are.


I think the commands you want to run (and others are suggesting) are:

'tag-pattern' - this will tag any messages that match the pattern. I 
have this bound to 'T'.


'tag-prefix' - this will run the next entered command on all the tagged 
messages.  I have this bound to ';'.


'clear-flag' - This will clear whatever flag is entered next.  In this 
case you want to clear 'N' for new.  I have this bound to 'W'.  So to 
clear the new flag, I would enter 'WN'.  I personally like the 
clear-flag command more than the toggle-new command for bulk message 
manipulation because the toggle-new will not only mark new messages as 
read, but read messages as new.


String this together and I get 'Tpatternenter;WN'.  This will set 
all the messages matching pattern to read.  If you already have 
messages tagged, ';WN' will suffice.  That is again assuming that your 
key bindings are the same as mine, which is probably unlikely.


Hope this helps.

Tim


Re: Viewing HTML in a real browser

2013-12-14 Thread Tim Gray

On Dec 14, 2013 at 08:27 PM +0800, Chris Down wrote:

My browser is Chromium, but I think any generic solution should be
adaptable.


I use Christian's script for complex html messages, particularly ones 
that have images attached in the email.  However, it's a bit slower 
sometimes then just opening up the html attachment via mailcap.  
I have two entries in my mailcap, one for viewing in Safari (on OS X) 
and one for viewing in mutt via w3m and the copious output setting.  
view-attach shows the w3m version in the pager and view-mailcap saves 
the html in a temp directory and opens it in Safari, using Eric 
Gebhart's view_attachment script.


text/html; /Users/me/bin/view_attachment %s html Safari ;
text/html; /usr/local/bin/w3m -dump %s; copiousoutput; nametemplate=%s.html


Re: TO: header

2013-09-15 Thread Tim Gray

On Sep 15, 2013 at 02:31 PM -0700, Robert Holtzm wrote:

You lost me. Use_from is set but I have no idea what or where $from is.
The way you use it it sounds like a file but I can't find it. The same
with $realname which only exists in .muttrc in connection with a
non-existent macro.


I set mine in ~/.mutt/muttrc.  You can also set it in ~/.muttrc.  I have 
the following in mine:


   set realname=Tim Gray
   set from=m...@address.com

Maybe I'm not understanding what you are getting at though...


Re: Encrypting postponed messages

2013-09-09 Thread Tim Gray

On Sep 09, 2013 at 11:47 PM +1000, Erik Christiansen wrote:

To have an unencrypted subject line, it's necessary to enter it in mutt,
prior to postponing. However, that's probably an asset if the subject
ought also be obfuscated, E.g. We go to war tomorrow might be safer as
Immediate plans. If encryption were provided in mutt, the same could
be done.


Well, encrypted messages that are actually sent don't have encrypted 
headers (or subjects), so while there might be security concerns with 
unencrypted subject lines, I don't see the need for them, nor does it 
appear to me that users of GPG or encrypted email have the capability 
for them.


I'm not sure what would happen if you added headers, subject or 
otherwise, prior to postponing but after writing the draft and 
encrypting in Vim (with Vim's builtin encryption).  Vim's encryption 
turns the file into what looks like binary data, so tacking on a line or 
two at the top of that looks like a recipe for disaster.



Would the postponed mail folder ever be placed remotely, when security
is the primary concern? (I don't use either of those, so my
understanding of them is limited.)


If security was the primary concern, probably not.  My larger point was 
that the encrypted file is no longer a valid file for the maildir 
structure.  Note, I haven't tried doing the outlined process with mutt 
set to use the mbox file format; I don't know how mutt stores drafts 
with that setting.


Honestly though, I don't see your question as overly pertinent.  If 
security is a primary concern, why are you sending (and storing) 
encrypted messages on a server to begin with?  I don't think that's for 
me to answer.  The way I look at it, a message in a drafts mailbox is a 
first class citizen under IMAP; it's just like any other message in 
terms of it's format for the most part.  So if you are going to store an 
encrypted message in your inbox, or an encrypted draft in your postponed 
folder, shouldn't they share the same format and shouldn't the mail 
client interact with them in the same way?*


With GPG encryption at least, the expectation is that the body text is 
encrypted, either as ascii armor or as a MIME attachment.  That would 
work perfectly fine in a drafts folder or as a sent/received message.  
Since mutt already has a mechanism and process for doing this with 
sent/received messages, it seems very convenient for the user to have 
the postponed draft system to work in the same way.



* Of course, with the obvious exception that a postponed message can 
have it's editing resumed at a later date.


Re: Encrypting postponed messages

2013-09-08 Thread Tim Gray

On Sep 09, 2013 at 02:31 AM +1000, Erik Christiansen wrote:

That would remove the editor choice restriction, and so would be more
universal once it exits. Added to that, draft encryption integrated
into mutt uses less keystrokes and requires less user concentration than
encryption provided by the editor.


I don't really have a dog in this fight, but I can say this.  I was 
playing around with encryption recently and tried out encrypting a mutt 
draft in Vim.  You encrypt it, then save the file, and once you are 
back in mutt, postpone the message.  It worked fine, as long as you are 
ok with all the mail headers being encrypted and thus inaccessible to 
mutt when you recall the draft.  I have no idea how offlineimap or isync 
would have dealt with the file, since it certainly wasn't in the right 
format for an email message.


I also concur, draft encryption in mutt would be easier to use.  It 
would also prevent having several types of encryption being used at the 
same time.


Re: Search utilities for use with mutt - I use mairix but it's not perfect

2013-05-07 Thread Tim Gray

On May 07, 2013 at 02:53 PM +0100, Chris Green wrote:

What other search programs work well with mutt?


I used mairix long ago.  I think notmuch [1] and mu [2] are superior.  
I used to think notmuch had more going for it compared to mu, but I've 
since settled on mu in the last year or two and have been very happy 
with it.


If you use screen, there is a nice script called muttjump [3] that you 
can bind to a key combo to find the original message.  It's pretty nice.  
The basic premise is that after you make a folder with your symlinked 
search results, you can run this script and it will find the original 
message in the original maildir.  Then it will open a new terminal in 
screen, load mutt, and take you to that maildir and message.


As some others have pointed out, I think there a program called grepmail 
that might be useful.  Personally, I have so many messages that running 
a live search like that would take forever, so I prefer to have my mail 
pre-indexed by mu.


[1]: http://notmuchmail.org
[2]: http://www.djcbsoftware.nl/code/mu/
[3]: https://github.com/weisslj/muttjump


Re: get-attachment

2013-05-01 Thread Tim Gray

On May 01, 2013 at 09:51 PM +0200, Suvayu Ali wrote:

On Wed, May 01, 2013 at 12:37:13PM -0700, Kevin J. McCarthy wrote:

It looks like it takes an existing attachment (e.g. ~/foo.txt) and makes
a copy of it to your $tmpdir.  The attachment is then replaced with your
tmpdir copy (/tmp/foo.txt).

Perhaps if you wanted to grab a snapshot of a file that may change, you
would use this command.  Others may have a better ideas for the use
case.


It might also be useful if you want to edit the attachment before
sending without modifying the original file.  An example would be to
remove private information from a log or settings file.


Thanks for the explanations and possible uses.  Makes a little more 
sense now.


get-attachment

2013-04-30 Thread Tim Gray
What exactly does the get-attachment command do?  The manual states 
'get a temporary copy of an attachment' but it's unclear to me what the 
use case might be.


Thanks.


Re: Searching for an email by sender's address

2013-04-27 Thread Tim Gray

On Apr 27, 2013 at 09:36 PM +0200, John Niendorf wrote:

How do you guys search for all messages from a particular sender?
When I do a search, it picks up words from the subject by ignores the 
sender's (or recipient's) address.


Try '~f'.  So limit, then `~f name`.



Re: Using Mac OSX addressbook groups

2013-04-23 Thread Tim Gray

On Apr 22, 2013 at 09:31 PM -0700, Trey Sizemore wrote:

Thanks.  I figured an alias file was the way to go, but wanted to see if
there was an alternative.


Not that I know of.  After all, alias files are the mutt way of dealing 
with group lists, right?



I'll check out the script.


I'm guessing that script needs pyobjc installed to work.  I'm not quite 
sure if OS X comes with that preinstalled and/or what versions of OS X 
have it.  So you might need to deal with that.


Re: Using Mac OSX addressbook groups

2013-04-22 Thread Tim Gray

On Apr 22, 2013 at 04:22 PM -0700, Trey Sizemore wrote:

Just curious if any Mac users on the list have found a way to select
'groups' they've created in their addressbooks when composing mail (To:,
CC:)?


Yup.  I've dumped the groups with members to an alias file that I 
source.  I don't actually use it for mailing people (you could) but more 
for hooks, like send hooks and save hooks.  That way I automatically 
reply to personal emails with my personal address and the messages get 
filed appropriately and differently from work related stuff.


I use this Python script to dump the groups to a file via a cronjob 
every night.  This is something I eventually hope to code up in a 
compiled command line program - I'm slowly working on that.


https://www.dropbox.com/s/o5a9ee9uqs145j7/export_to_alias.py


Re: Alternate Addresses

2013-02-11 Thread Tim Gray

On Feb 11, 2013 at 03:57 PM -0500, Ed wrote:

Of course I put the actual address in tha above. Where did I go wrong ?


I just have:

   alternates (addr...@example.com|t...@example.com)


Re: Ideas for saving mailing list mail with IMAP+Maildir

2013-02-10 Thread Tim Gray

On Feb 10, 2013 at 02:04 PM +, David Woodfall wrote:

So I'm just wondering how people here cope with organising mailing
lists with Maildir and any tips/tricks that may be a better way than 
my present way.


I do what others have said regarding Maildir/dovecot.  The 'layout=fs' 
option let's dovecot use file system directories as folders instead of 
the . separator (or something along those lines).  It seems to work with 
no problems when I actually access my mail store through dovecot.  
Normally I just use mutt on the same computer that the mail is stored 
and it has no problems with maildir.  I think I dynamically generate my 
mailbox list with a script that crawls through the directories and 
returns directories that contain cur, new, and tmp.


This isn't a Maildir specific hint, but it does pertain to managing 
mailing lists.  One thing that has helped make list management easier is 
a couple of simple scripts that read a text file with my subscribed 
mailing lists and the aliases I use for them.  I then source that list 
from .muttrc at various points where it automatically spits out the 
appropriate information.  For example, in my mailing_lists.txt contains 
the following line:


   muttmuttmutt-u...@mutt.org

I then have the following lines in .muttrc:

   source `getAliases.py  ~/.mutt/aliases-lists; echo \
   ~/.mutt/aliases-lists`
   subscribe `getLists.py`

The getAliases.py script (could easily use awk or whatever you are 
comfortable with) just spits out the 1st and 3rd columns of the file 
prefixed with 'alias', so 'alias mutt mutt-users@mutt.org'.  I don't 
recall why I don't just use `source getAliases.py|`.   I used to do 
that, but for some reason in the past switched to the line I have above.


getLists.py just spits out the 3rd column all in one line, so I get 
subscribed to all the list addresses I want to.  I haven't bothered with 
the logical third step of this system, which is to write a script that 
uses the second column (my folder names) to generate fcc- and save-hooks 
for all my mailing lists dynamically, all from a single easy to edit 
file.


Sorry if this is a long reply - I picked up this tip from someone on 
this mailing list a while ago...


Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?

2012-11-07 Thread Tim Gray

On Nov 07, 2012 at 02:15 PM +, Chris Green wrote:

I *don't* like procmail configuration files, they're one of the reasons
I wrote my own.

What does everyone else here do for collecting mail and filtering mail
with mutt?


I use getmail and dovecot deliver.  Getmail is great, fast, and 
flexible (and supports the OS X keychain, which I like).  Dovecot is a 
bit overkill for just a filtering solution since it's a full IMAP 
server.  However, I find dovecot deliver (which uses the sieve language 
for filtering) to be much more readable/writable than procmail.  An 
added bonus is that my main IMAP account has sieve on the server, so I 
can filter mail remotely there using the same syntax as I do with my 
other accounts using getmail.


I've looked into other solutions that are more compatible with 
offlineimap, like imapfilter (which I believe moves message server side, 
but is run from as a remote client) and a few other lesser known local 
solutions, like maildirproc, but in the end, sieve was the most straight 
forward for my setup.


Re: mutt on an IMAP-Server (dovecot): folder names and structure

2012-08-17 Thread Tim Gray

On Aug 17, 2012 at 02:52 PM +0200, martin f krafft wrote:

 - Andre suggested to use

  mail_location = maildir:%h/Maildir:LAYOUT=fs

   in dovecot, which I have yet to try. If this does what a web
   search suggests, then it will make dovecot use mutt's hierarchy
   instead of the standard IMAP-hierarchy, and that would solve my
   problem, I think: http://wiki2.dovecot.org/MailLocation/Maildir


I can confirm that running dovecot with a line in the conf file like the 
one above does work.  I use the following with dovecot when I want/need 
to access my mutt maildir store with clients that can't read directly 
from the file system.


mail_location = maildir:~/mail:INBOX=~/mail/Inbox:LAYOUT=fs

To be explicitly clear, my maildir structure has IMAP folders as 
directories on the file system and not encoded in the mailbox name with 
'.' or some other character:


mail/Inbox
mail/lists/mutt
mail/lists/offlineimap
etc.


Re: mutt on an IMAP-Server (dovecot): folder names and structure

2012-08-16 Thread Tim Gray

On Aug 16, 2012 at 08:29 PM +0200, martin f krafft wrote:

also sprach Christian Brabandt cbli...@256bit.org [2012.08.16.1937 +0200]:
I don't know my password. I use asymmetric authentication
everywhere, including IMAP, using a preauth-SSH-tunnel.


Out of curiosity, how do you implement this?


Re: mutt on an IMAP-Server (dovecot): folder names and structure

2012-08-16 Thread Tim Gray

On Aug 16, 2012 at 08:58 PM +0200, martin f krafft wrote:

http://git.madduck.net/v/etc/offlineimap.git/blob/HEAD:/.offlineimaprc#l45


I see.  Not something you'd probably be able to do if you didn't have 
login access to the IMAP server.


Off topic - you must be the same Martin Krafft who went to Swarthmore.  
If so, we went there the same year.




Re: Killfiling, anyone?

2012-07-25 Thread Tim Gray

On Jul 25, 2012 at 10:26 AM -0400, Mark H. Wood wrote:

Well, here's one vote for maildrop (from a former procmail user).
They're both good.

And, since I use exim, I keep telling myself that someday I'm going to
try its Sieve per-user filter support.


I use Sieve for this kind of thing.  Download my mail with getmail and 
send it to Dovecot's deliver sorts mail into maildirs based on the Sieve 
setup.




Re: mail relaying

2012-06-19 Thread Tim Gray

On Jun 19, 2012 at 11:47 AM -0700, jeremy bentham wrote:

What simple, head-smacking thing have I overlooked?


Not sure if I can help you, but a simple config line works for me with 
my SMTP server, when I use it directly from mutt:


set smtp_url=smtp://u...@smtp.example.com:587

Port 587 on my SMTP server is TLS.

I usually use putmail.py as my SMTP client.  msmtp is a similar and more 
popular alternative.


Re: Anyone using Mutt on a Mac?

2012-05-14 Thread Tim Gray

On May 12, 2012 at 06:51 PM -0500, Jim Graham wrote:

I'm going to be replacing my old, rapidly dying systems with a
Mac next month, and am wondering if anyone here has used Mutt
on Mac OS X (Lion).  I'm curious about how that's working out,
etc.  (I've never actually SEEN Mac OS X, so I don't know how
much of the Unix base is still there).


Yup, works fine, been doing it for years.  I'd recommend checking out, 
in no particular order:


- msmtp or putmail.py
- homebrew for a package manager - much more straight foward than 
  macports or fink in my mind
- iTerm, the newer one, as a replacement for Terminal.app.  Terminal.app 
  works, but iTerm is better.  You can also set up iTerm to handle 
  mailto: urls and open up a mutt instance automatically


If you are using the OS X address book app and/or keychain, there are 
some tips and tricks that enable reasonable integration.  I for one love 
the OS X address book because it works with my phone and syncs 
wirelessy.  As far as a speller, I compose my email in Vim and use the 
speller that is built in.  If using Vim, you might want to check out 
MacVim [1].  OS X comes with Vim, but MacVim is a lot nicer, has a gui 
if you want, and if you don't want a gui, you can just link the 
executable to /usr/local/bin or something.


[1]: http://code.google.com/p/macvim/


Re: Mutt/IMAP/filtering

2012-01-14 Thread Tim Gray

On Jan 13, 2012 at 03:38 PM -0600, Dan McDaniel wrote:

I tried this since I too have been looking for a solution to this kind
of problem. However, I am getting only partial success. I can tell it's
sourcing the profiles as I move between folders because the color of the
status bar changes, but it's not setting the From: or the signatures
that I have specified.


Not sure what to tell you.  I just made a bare bones muttrc to test 
things with to make sure I didn't have another setting that crucial to 
making this work.  It doesn't seem like I did.  This is *all* I had in 
the test file:


set realname=Tim Gray
set from=tg...@address1.com
set mbox_type=Maildir
set fast_reply
set editor=vim +8 -c 'set ft=mail'
set spoolfile = $HOME/mail/p/INBOX
set folder=$HOME/mail/p

folder-hook .* source ~/.mutt/profiles/proto
folder-hook $HOME/mail/p/work.* source ~/.mutt/profiles/swat

The profile files looked like before:

set realname=Tim Gray
set from=tg...@address2.com
set signature=~/sigfile1
color status black magenta

I do know the folder hooks have to be in the correct order.  The default 
one comes first.  Also, maybe there are other hooks that are 
interfering?


Re: Mutt/IMAP/filtering

2012-01-13 Thread Tim Gray

On Jan 13, 2012 at 08:41 AM +, Jamie Paul Griffin wrote:
Also $reverse_name will set the From: address to the right value 
depending on which address was used in the email you're replying to. 
You will need to set $alternates in the config file for that.


Ah yes, I left out that bit.


Re: Mutt/IMAP/filtering

2012-01-12 Thread Tim Gray

On Jan 12, 2012 at 02:02 PM -0800, Tracy Reed wrote:

I've been a mutt user for well over 10 years but more and more I am running
into limitations which I am having trouble solving.


I don't have exactly the same setup, but I do select a 'profile' 
depending on what folder I'm in.  I set up each profile in it's own 
file, like so:
 
set realname=Tim Gray

set from=tg...@address.com
set use_from=yes
set signature=~/.mutt/signatures/signature1
set use_envelope_from=yes
color statusblack   magenta

The other profiles look similar, just with different signature files or 
froms.  Then, set a hook like so (doesn't have to be a folder-hook, it 
could be a reply or send hook):


folder-hook work source ~/.mutt/profiles/work_profile

The key for me was to have this at the *top* of the other hooks:

folder-hook .* source ~/.mutt/profiles/default_profile

Basically, for *every* folder you enter, a profile needs to be sourced, 
otherwise you'll be stuck with the leftovers of some previous profile.  
The above hook sources the default profile for every folder that doesn't 
have a hook defined.


To be honest, your setup looks pretty close to mine.  I do notice I have 
'use_from' and 'use_envelope_from' set for some reason, but I don't 
remember why.  It might be to deal with the kind of issues you are 
having.  I seem to remember some trick like that because I originally 
did have some issues with this kind of setup.  I'm also really only 
dealing with two or three profiles.  If you are using a lot, you might 
want to have different muttrc's and just run separate instances of mutt.  
Maybe in screen.


As to the other filtering question, imapfilter might be helpful:
https://github.com/lefcha/imapfilter

Personally, I find it easier to forward *all* my email to one account and 
sync that with offlineimap or getmail.


Re: Mutt/IMAP/filtering

2012-01-12 Thread Tim Gray

On Jan 12, 2012 at 06:30 PM -0800, Tracy Reed wrote:

I can't forward all email to one account but pulling it all down to one
location with offlineimap is a possibility. I'm just concerned about not being
able to access my mail with my iphone if I pull it all down and delete it from
the server.


Offlineimap doesn't delete email from the server.  It's a bidirectional 
sync.  So you can still check it on your iPhone.  In fact, any changes 
you make to the account in mutt will propagate back to the server.


So you could use offlineimap for all of your accounts.  The advantage of 
offlineimap over using regular imap is that you have access to your mail 
when not connected to a network.  Any changes you make to your mail 
while your offline will be synced the next time you connect.


I guess it would also give you some ability to filter your mail if you 
use a program like maildirproc[1].  It's a bit fiddly but should work.  
However, I think imapfilter is more robust and has more features.


[1]: http://joel.rosdahl.net/maildirproc/


mutt not recognizing new mails

2012-01-09 Thread Tim Gray
I've been using mutt for a couple years, and something new just started.  
Not sure if it's mutt or another program, but I *think* it's mutt.  Then 
again, I just started noticing it and haven't built mutt since August (I 
build from the mercurial sources).  I'm currently running 
6196:b01d63af6fea.


Anyway, after a day or so of running, mutt stops recognizing when 
mailboxes get mail delivered to them.  I get no notification and if I 
look in the mailbox list, no boxes have an 'N' next to them to indicate 
new mail has arrived.  If I quit and restart, mutt notices boxes which 
have new mail in them again.


My mail is in maildirs that are populated through offlineimap and 
getmail.  getmail delivers the mail to dovecot, which filters the mail 
and actually puts it in the maildirs.  Offlineimap delivers the mails 
directly.


Like I said, I'm not sure when this started happening, because mutt 
works fine for some undetermined but longish amount of time before doing 
this.  Like a day, or several days.  I just noticed this about two weeks 
ago, but it could have been going on since August and I haven't noticed 
it.


Any ideas what might be going on here?


Re: Checking both locally delivered mail and remote IMAP server

2011-12-29 Thread Tim Gray

On Dec 28, 2011 at 07:54 PM +, josedavidmj-fo...@yahoo.es wrote:

Does anyone have any idea of how to achieve this goal?


Try this:

set folder = ~/.maildir
mailboxes !
mailboxes imaps://imap.gmail.com:993/INBOX

You just need to add the IMAP mailboxes individually.  You can do 
fancier things with reseting folder inbetween, but the easiest way is to 
just add them individually.


Re: Intelligent/Word-Sensitive Wrapping in Pager?

2011-12-27 Thread Tim Gray

On Dec 27, 2011 at 05:14 PM +, Michael Graham wrote:

 I’ve been playing with the pager’s wrapping so that it doesn’t
wrap to the width of my terminal, but rather to 72 characters wide.  In
my .muttrc I’ve set “set wrap = 72”, but it doesn’t intelligently break:
it breaks in the middle of words sometimes, which is not what I want.


Mutt wraps at word breaks for me.  Then again, I've got:

set wrap=80
set smart_wrap

Do you have smart_wrap set?


Re: Address Book/Contacts utilities that work (well) with mutt - what's out there?

2011-12-10 Thread Tim Gray

On Dec 10, 2011 at 02:55 PM +, Chris Green wrote:

So, does everyone here use abook, or nothing, or just have all their
E-Mail addresses in mutt aliases, or what?  Any suggestions would be
very welcome.


This isn't going to be very useful to you since you are using Linux and 
I'm on OS X, but it might give you some ideas.  I use the OS X built in 
Address Book app.  It's got a goofy GUI, but now that Apple has released 
iCloud (for free!), my contacts sync wirelessly automatically between my 
phone, my computer, and Apple's iCloud web mail (not that I use that).  
The syncing between my phone and computer are the big features for me.  
It is also nice that it keeps track of physical addresses, phone 
numbers, IM names, etc - all of which my phone can utilize I might add.  
Lastly, lot's of apps on OS X tap into the Address Book database, so 
having my contacts in there makes using OS X generally a nicer 
experience.


I also use lbdb in mutt.  There's a helper that queries the OS X address 
book, so I can run a query by hitting ^T and search the address book.  I 
have lbdb setup to also scrape addresses from outgoing messages and 
store them.  So when I run the ^T query, not only does it search the OS 
X address book, but it also checks the outgoing address list.  One could 
also run searches against LDAP if you desired.


I also use a simple mutt alias file for my most commonly used addresses 
where I want to define a nickname to use.  Like 'mom' or 'mike'.  I have 
many Mike's I correspond with, including both my brother and my boss.  You can 
imagine I send completely different types of correspondences to those 
two, so I want to make sure I have no mix ups.  I've defined 'mike' as 
my brother and 'boss' as my boss.


The last bit of glue I use is a python script that dumps the OS X 
address book into mutt alias format.  This happens nightly via a cron 
job.  I do this so I can quickly use tab completion when typing in 
addresses and also to access the groups I have defined in the OS X 
address book.  This way I can define hooks in mutt based on those 
groups.


It all sounds much more complicated than it actually is in use.  When 
getting a new contact, I enter it in my phone if on the road, or add it 
to the Address Book app.  When composing emails, I start typing who I 
want to address an email to and hit tab.  If that alias doesn't come up 
either from my commonly used alias file or from the Address Book dump 
alias file, I hit ^T and query lbdb.


Re: Address Book/Contacts utilities that work (well) with mutt - what's out there?

2011-12-10 Thread Tim Gray

On Dec 10, 2011 at 05:38 PM +, Chris Green wrote:

lbdb is good to know about, thank you.  It means that I can choose
almost any program for my address book and can link it to mutt.


lbdb is the glue which makes it all happen really.  It's a great 
program.


Re: fcc-save-hook for multiple recipients

2011-12-08 Thread Tim Gray

On Dec 08, 2011 at 10:39 PM +0100, Eric Smith wrote:

So if it is a mail from one of three names and the other two names are
in ~C (To: or Cc:), then it is a match.
What is the smartest way to specify this logic with an
fcc-save-hook?


If I understand correctly, the following should do it.  It's a hook 
that has all three recipients in the To: or CC: fields which sets the 
fcc/save folder to 'project_folder', followed by three individual hooks 
for the separate people.


fcc-save-hook '~C foo ~C bar ~C baz' project_folder
fcc-save-hook '~C foo' foo_folder
fcc-save-hook '~C bar' bar_folder
fcc-save-hook '~C baz' baz_folder

It's in the order it is because hooks are matched in the order they 
appear in the file.  So you want your group hook to match before the 
individual ones... otherwise the 'foo' hook would match both 'foo' only 
messages and the group ones.


Re: fcc-save-hook for multiple recipients

2011-12-08 Thread Tim Gray

On Dec 08, 2011 at 08:15 AM -0500, Tim Gray wrote:

On Dec 08, 2011 at 12:08 PM +0100, Eric Smith wrote:

Thanks Tim but the condition is AND not OR.
All three addresses need to be present in random order in the To: or


Oops.  Just take that the |'s then.  If you just place several search 
modifiers together, a logical AND is assumed.


I realized I had a typo here.  It should read:
Just take out the |'s then.  


Re: fcc-save-hook for multiple recipients

2011-12-08 Thread Tim Gray

On Dec 09, 2011 at 12:05 AM +0100, Eric Smith wrote:

But this will not match if the mail is From: foo and To: bar, baz


You'll just need to add a couple more hooks to catch all the cases.  
It's really all explained in the manual.


fcc-save-hook '~f foo ~C bar ~C baz' project_folder
fcc-save-hook '~f bar ~C foo ~C baz' project_folder
fcc-save-hook '~f baz ~C foo ~C bar' project_folder

The above three rules would be needed in addition to the previous set.  
Obviously, you join the above rules into one giant hook, but readability 
might go down a bit.


You could probably also use the ~L modifier and catch all these cases, 
assuming I'm reading the manual correctly.  It defines it as messages 
either originated or received by EXPR.


fcc-save-hook '~L foo ~L bar ~L baz' project_folder


Re: mark_old=yes does not work for IMAP folders

2011-12-08 Thread Tim Gray

On Dec 09, 2011 at 08:59 AM +0700, Victor Sudakov wrote:

Have I asked something weird or does nobody use IMAP?


I think a lot of us use offlineimap.  At least I do.


I clearly remember IMAP messages becoming O in mutt-1.4.2.3_4, and I
miss the feature very much. I wonder, where mutt could have stored the
O flag on the IMAP server and why it doesn't do it now.


Might be a change on the server?


Re: mark_old=yes does not work for IMAP folders

2011-12-08 Thread Tim Gray

On Dec 09, 2011 at 12:45 PM +0700, Victor Sudakov wrote:

I have been quite happy with mutt alone as an IMAP client.


I would be happy with the IMAP support, but I find offlineimap is more 
graceful in handling me putting my laptop to sleep throughout the day as 
I move about.



Absolutely not. It's a change in the mutt version.


Don't know then.


Re: fcc-save-hook for multiple recipients

2011-12-05 Thread Tim Gray

On Dec 05, 2011 at 10:23 PM +0100, Eric Smith wrote:

If a sent or received mail has a certain list of email addresses in
the To: and Cc:, then I want to automatically save to a specific
folder.


Well, you can either string together a bunch of criteria with 'ors' and 
use the ~C pattern:


fcc-save-hook '~C name1 | ~C name2 | ~C name3' foler_name

or you can put all the addresses in a group and just use the %C pattern:

fcc-save-hook '%C groupname' folder_name

The first is probably more direct.



maildir_trash questions

2011-12-01 Thread Tim Gray
I'd like to have maildir_trash=yes.  I'm running mutt pointed at local 
maildirs.  When I set the above option to yes, I can flag deleted 
messages just fine; the T flag gets set on the file.  However, I can't 
seem to actually purge them by any means.  Syncing the mailbox has no 
effect, even though I'm asked if I'd like to purge the deleted messages.  
Does anyone have any suggestions?  The only thing I can think of is to 
make a macro to move T flagged messages to a 'trash' box that I can 
clear out with a cron script.  However, it'd be nice if mutt could 
unlink T flagged messages itself...


Re: 'important' flagged messages mutt and offlineimap

2011-11-24 Thread Tim Gray

On Nov 24, 2011 at 02:58 PM +, Matt Ford wrote:

I've seen a couple of internet posts about how starred mails are not
propagated upwards from mutt to gmail, this looks to be the same thing.
Unfortunately I didn't see a fix.


Just to note that I do use mutt and offlineimap.  Flags set in mutt do 
appear to propagate to the server.  Flags set elsewhere also come back 
through offlineimap to mutt.  I tried it turning flags on and off in 
mutt, webmail, and on my phone and they all seemed to work ok.


I did seem to have a problem once in a while though.  If I added a flag 
remotely, offlineimap didn't always pick it up immediately.  If I made 
another change in my mailbox in mutt, locally, that needed to be synced, 
offlineimap would resync that box, sending the local change out and 
pulling in the previously made remote change as well.  Sounds like 
something I should investigate and send off to the offlineimap list.  
That being said, it doesn't strike me as a huge annoyance because I 
rarely flag things anywhere but mutt, and even if I did flag something 
on my phone, the next time I got a new message in my inbox, the flag 
would be pulled in as well by offlineimap.


Note, some of this might have to do with the 'quick' setting in 
offlineimap.  The notes for that setting say:



Ignore any flag updates on IMAP servers


As far as your IMAP server goes, if you are using gmail, who the hell 
knows what works and what doesn't.  All of the above is with regards to 
a non-gmail server.  I've weened myself off of gmail over the years 
precisely because it doesn't play well with others.


pgpGatGXu9THT.pgp
Description: PGP signature


IMAP timeout

2011-11-09 Thread Tim Gray
I've been using mutt over IMAP on my laptop and I had a question for the 
list.  When I put my laptop to sleep or disconnect it from the internet, 
clearly my IMAP connection is broken.  When I resume my connection at a 
later time, like the next morning, mutt is often in a 'frozen' state.  
After about 2 minutes, it finally warns me the connection was lost.  At 
this point in time I can reopen the mailbox and everything is fine.


Is there anyway to shorten the timeout time?  It doesn't seem like 
$timeout or $connect_timeout have any effect.


As a side note, I'm already aware of offlineimap as an alternative.


Re: Named tags/lables?

2011-11-07 Thread Tim Gray

On Nov 04, 2011 at 05:25 PM +0100, Jostein Berntsen wrote:

If you use mu search you can easily save your search to a new search folder by
just changing the folder path. Standard mu search:

mu find --clearlinks --format=links --linksdir=~/mail/search search term


Good idea.  I never thought of changing the results folder on the fly.


Re: Named tags/lables?

2011-11-04 Thread Tim Gray

On Nov 03, 2011 at 03:43 PM -0500, David Champion wrote:

If you use X-labels heavily and are comfortable building
mutt from source I encourage you to take a look at
https://bitbucket.org/dgc/mutt-dgc/qseries and apply at least up to the
complete-pattern-y patch.


I wouldn't mind trying this out, but I'm a little unclear how to apply 
the patches.  I normally build mutt from the hg sources...


Furthermore, what would really add to mutt in my mind is some 'smart 
folder' capability.  Anyone who uses a Mac and is on OS X 10.7 should 
take a look at the new Mail.app.  The smart folders (saved searches) are 
pretty nice in my opinion and are very fast.  Coupled with a labels 
scheme such as the one you wrote about, you have something that competes 
with gmail/notmuch/sup without fooling around with IMAP standards or 
running an email client from within emacs.


Re: displaying tagged files in browser

2011-09-27 Thread Tim Gray

On Sep 27, 2011 at 01:37 PM +0200, Rado Q wrote:

You want folder_format.


Thanks.  I couldn't find that before even though I was looking for it in 
the manual.  I also see that I set folder_format long ago and took out 
some of the file system info (# of hardlinks, user, group, etc.) and 
must have accidentally left off the tag status.


Thanks!


displaying tagged files in browser

2011-09-26 Thread Tim Gray
When I want to attach multiple files to an email message, it's 
convenient to tag all of them in the file browser, and then hit return 
to attach them all at once.  However, there's no visual indication in 
the file browser as to which files are tagged.  Is there anyway to set 
this?  I didn't see a browser_format option or anything like that in the 
manual.


Thanks


Re: displaying tagged files in browser

2011-09-26 Thread Tim Gray

On Sep 26, 2011 at 05:18 PM -0400, Patrick Shanahan wrote:

in my ~/.muttrc I have:
 color index  magentadefault  ~T # Tagged

look in tfm for flags and tagged.


I actually have this in my .muttrc:

color index yellow  default ~T

Works in the message index display, but not the file browser.  I'll see 
if I'm clearing that command somehow without realizing it. 


Re: Subscribe.. similar function from Thunderbird to Mutt

2011-09-21 Thread Tim Gray

On Sep 20, 2011 at 08:47 PM -0600, Aaron Toponce wrote:

How can I do this with Mutt? It's not in the folder list, and I can't
change to it manually. Any ideas?


In the mutt manual, look up 'imap_check_subscribed' and 
'imap_list_subscribed'.  I would imagine that mutt will only check 
mailboxes you have listed manually if you have it set NOT to look at 
subscribed folders.  If you have Mutt has the ability to toggle the 
subscribed status of a folder too in the mailbox list view.  Over here, 
'T' toggles subscription, and 's' and 'u' subscribe or unsubscribe.


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


pgp9JPtKganJY.pgp
Description: PGP signature


Re: Mac Command Line and mutt

2011-09-13 Thread Tim Gray

On Sep 13, 2011 at 10:06 AM -0400, Tom Baker wrote:

If I could solve this problem, then presumably I could configure the Mac to
open mutt when I click on a file such as important-email-exchange.mbox in
the Mac Finder.

I have tried everything I could think of, even looked into Emacs's Rmail, but
I'm not sure I understand the system well enough to know where to look for the
answer.  Would one need to write an Apple script?  Can anyone suggest an
approach?


There is probably some way to do with with apple script and/or iTerm.  

I'm sure you could do it with an applescript and Terminal/iTerm.  Have 
the applescript receive the link, either by associating it with a custom 
URL scheme (instead of file:///path/to/box, maybe try 
x-mbox:///path/to/box) or by getting the selection as a file path or 
something.  Then parse the input (URL or file path) for the mbox's file 
path.  Then open up a Terminal/iTerm window and run the command mutt 
command with the mbox path as an argument.


Alternately, you might be able to do it with no applescript if you use 
iTerm, since iTerm can be associated with specific URL schemes, like 
mailto:.  Then in the profile command box, instead of having it 
start a login shell, you can enter a command with a placeholder for the 
URL, like so:


/usr/local/bin/mutt $$URL$$

Thus, when I click on a mailto: link, iTerm handles it and runs mutt 
with the contents of the link.  I think you could modify that somehow to 
run `mutt -f $$URL$$` as long as the URL was a file path.  Of course, 
you wouldn't want to pollute the mailto URL scheme, so you'd have to 
pick another one.  Looking at iTerm's preferences right now, the allowed 
choices are: https, ftp, gopher, mailto, news, nntp, telnet, wais, 
whois, x-man-page.  No custom options.  However, the iTerm developer is 
pretty responsive and might add in the capability to handle custom 
x-stuff schemes.


Just some thoughts.  There's probably a better way to do what you 
want...


Re: Mac Command Line and mutt

2011-09-13 Thread Tim Gray

On Sep 12, 2011 at 04:39 PM -0800, Tim Johnson wrote:

Ah! Package systems, that is valuable info.


I'd definitely recommend homebrew over the others.  A lot less messy and 
easier to install and manage in my mind.


As far as installing mutt, even though I have a lot of stuff installed 
with homebrew, I find it more customizable to compile mutt by hand.  I 
have a shell script that updates my hg repository of mutt, sets my 
configure options, and compiles it.  Though homebrew does have 1.5.21 
with tokyo-cabinet.  It has the following selectable patches: sidebar, 
trash, slang, ignore-thread, and PGP verbose mime.


Everything else should be more or less like what you have on Linux.  If 
you use vim or emacs for composing, you are set for editors.  If you 
wish to use one of the Mac text editors (which you most likely won't 
since you are coming from Linux), you can use a wrapper shell script to 
call them.  I used BBEdit for composing mail with mutt for a couple years 
and had a script that wrapped my text for format flowed and did some 
other things.  Now I use Vim.  Check out MacVim if you are a vim user.  
You can use it from the terminal, but the gvim that comes with MacVim 
has been modified for OS X in some nice ways.


I'd also recommend checking out iTerm.  I never really liked it enough 
to move away from Terminal in the last 10 years until very recently.  
Terminal has gotten better, but the latest versions of iTerm are very 
nice.  Especially if you use mutt - you can set up iTerm to handel 
mailto URLs pretty easily.


Re: Quirks using format:fixed

2011-06-06 Thread Tim Gray

On Jun 06, 2011 at 05:20 PM +0200, Christian Brabandt wrote:

I use a formatoption script, that uses a custom formatoption setting
depending on the region the cursor is on. This allows to have different
formatoptions for e.g. Header lines, quotes, code, etc.)


Very cool.  I'll have to digest this a bit later but it sounds very 
useful.  Any chance we could see your customized version?


Tim


Re: Quirks using format:fixed

2011-05-17 Thread Tim Gray

On May 17, 2011 at 12:25 PM -0600, Aaron Toponce wrote:

Or, I could just set tw=0 for vim, and enable format:flowed in my
~/.muttrc. That would probably be the easiest route.


It's unclear from your message whether or not you realize this, but 
setting f=f in your muttrc doesn't actually do diddly-squat to the 
actual formatting of your message.  It just sets a header to let 
recipients know that the message body is expected to be f=f.  I think it 
also does another step (space stuffing), but it does NOT add the proper 
trailing spaces to paragraphs which should be wrapped.  That needs to 
occur in the editor or in a wrapping script.


I hope I have the above correct.

For what it's worth, I have no problems with my format=flowed email in 
any of the mail clients I've used, including on my iPhone - it wraps it 
just like it should even though it displays only something like 55 
characters per line.  I haven't tried any ancient mail clients, but I 
would suspect they'd be ok with mail that is hard wrapped at 72 
characters anyway.


pgpsWYQ3Z9ZXa.pgp
Description: PGP signature


Re: Quirks using format:fixed

2011-05-17 Thread Tim Gray

On May 12, 2011 at 02:28 PM -0600, Aaron Toponce wrote:

Is there are way to tell Vim not to wrap the headers, even though I wish to
wrap the body?


I hardly ever edit the headers in my editor, vim or otherwise.  I do 
that all from the mutt interface.  I have Vim (and my other editor) set 
up to not mess with lines I don't edit.  So they don't munge headers.


As far as wrapping my paragraphs in my message body, you need to have 
your vim options set correctly.  I have the following set for when I 
edit mail in vim.  You could get away with a subset of these.


setlocal formatoptions=wtcqrn
setlocal tw=72
setlocal noai
setlocal nosi

I set text wrapping to 72 columns (tw).  I turn off auto indenting 
(noai) and smart indenting (nosi).  The format options are explained in 
vim's help under 'fo-table'.  But the short story on them is the 
following:


- t - autowrap text using textwidth
- c - autowrap comments using textwidth - add comment leader
- q - allow formatting comments with 'gq' command
- r - auto insert comment leader after hitting enter in insert mode 
  while in a comment

- n - recognize numbered lists while formating
- w - trailing white space indicates a paragraph continues to the next 
  line.  a line that ends in a non-white character ends the paragraph.


The 'w' option is the pertinent one if you set format=flowed.

The way the above settings works is that as I type long wrapped 
paragraphs, vim automatically adds line breaks and a trailing space on 
those lines (satisfying the requirements of f=f).  Lines that I don't 
edit don't get line breaks added.  If I edit a wrapped paragraph, I 
usually have to manually run 'gq' on that paragraph to get it formatted 
correctly - if you don't want to have to do that, you can look into 
adding the 'a' option to the formatoptions.  You also might be 
interested in the 'v', 'b', and'l' options, which control how vim wraps 
lines depending on their lengths, content, and how you edit the line.  
For example, I should enable the 'l' option...


Hope this helps.  And if you already knew this stuff, please disregard.


pgpEZyLC5cxRc.pgp
Description: PGP signature


Re: Quirks using format:fixed

2011-05-15 Thread Tim Gray

On May 15, 2011 at 02:51 PM +0200, Richard wrote:

I was wondering if anyone has a script to convert normal mail messages
to format flowed stuff and back? Could be used as an editor wrapper script
instead of trying to reimplement the functionality in every editor.


I did something like this a couple years ago using Python.  I was using 
BBEdit as my editor for mutt.  Now I'm using vim so I haven't been using 
the script.  However, I can post it online if someone is interested.  
Most of the heavy lifting was done with the textwrap module.


Re: ispell with vim

2011-05-15 Thread Tim Gray

On May 15, 2011 at 05:30 PM -0700, Robert Holtzman wrote:

Mutt is compiled with ispell. The documentation I found only talks about
it's use with emacs. Being a confirmed vi/vim user, I'm somewhat at a
loss. I'm primarily interested, at this point, in adding words to the
list. Any pointers appreciated.


I don't use ispell but I do use vim.  Vim 7.3 has a spell checker built 
in, and it's easy to add words to it too.  Might be worth checking out.


pgp6qwA1rCjBS.pgp
Description: PGP signature


Re: mairix search

2011-05-08 Thread Tim Gray

On May 08, 2011 at 11:09 AM +0200, Richard wrote:

indeed wrong;
 mairix j...@joe.com
 mairix j...@joe.com work order
will do exactly what most people would think it would do. It has some
special treatment of email addresses in addition to that.


Good to know.  Though I still do find the search syntax easier with 
notmuch (and mu).  Not saying everyone that that's true for everyone.


Again, the difference on the time it took to re-index was probably the 
real eye-opener for me.


Yes, notmuch and mu don't work on mbox.


Re: mairix search

2011-05-08 Thread Tim Gray

On May 08, 2011 at 09:21 PM +0200, Richard wrote:

I have just done a re-index with mairix and have no reason to complain:)


In my experience, on my system, mairix was slower.  I seem to recall 
times of around 15-20 minutes to go through a couple hundred thousand 
messages looking for new ones.


I think my mu database is still kicking around, but as I don't have GTK 
installed on this system anymore, I can't build mu anymore.  It's 
probably not worth my effort to resurrect it all just to time things, 
which I had done previously in my switch from mu to notmuch.


As far as mairix goes, I'll run those tests now.  I just built 0.22 and 
will report back in a couple of hours.


On the other hand, if what you are using works, then by all means 
continue to use it.



As of search operators most people are happiest if they don't need them
at all.


Agreed.


Re: mairix search

2011-05-08 Thread Tim Gray

On May 08, 2011 at 10:47 PM +0200, Christian Ebert wrote:

$ time mairix -v -p


I bet that was my problem.  I don't think I ever used -p, so there were 
a lot of dead messages floating around in my db.  

The times I'm getting now are pretty good.  Notmuch seems to be faster, 
but the times are all low enough that I don't have a problem with any of 
them.


mairix -v -p

real0m17.682s
user0m4.911s
sys 0m8.524s

notmuch new
---
real0m5.152s
user0m0.067s
sys 0m0.261s

Searches for the two showed a similar gap.  Again, neither was slow 
enough for me to lose any sleep over.


mairix: 0m3.044s
notmuch: 0m0.410s

This is an interesting discussion though.  I might play around with 
mairix a bit more again.  I still see mu and notmuch having a major 
advantage of being built on proper database tools.  I get a lot of 
errors about messages not being indexed by mairix, and that whole 
recommended dance of removing the lock file before a search, etc. is 
annoying as well.  Furthermore, the thing that excites me about notmuch 
that the others don't have is the fact that it's built as a library.  An 
enterprising developer could integrate it into a mail client (other than 
the emacs thing they have going on) and it would be pretty great in my 
mind.  Remember, notmuch isn't just an indexing tool - it also lets you 
tag messages and search on tags, etc.


Re: Sending in bulk mode from draft folder

2011-05-06 Thread Tim Gray

On May 06, 2011 at 02:38 PM +0200, Jose M Vidal wrote:

is there any way to send all the messages without the need to open
them one by one?


As someone else mentioned, running a local smtp server like postfix will 
do this automatically.


I've been using putmail[1] instead.  It's a lightweight smtp client like 
msmtp is, but written in Python.  It has a companion script which queues 
things.  I wrapped all of this with a simple shell script that checks my 
network connection and dequeues mail when I'm up.  Though the details 
are unimportant, all sent mail is queued and automatically dequeued when 
I am connected, so I never worry about losing a message.  I also have 
some logic in place so that I can go into 'offline' mode and queues 
messages without sending them even if I am connected.


[1]: http://putmail.sourceforge.net/home.html


Re: offlineimap much slower than gmail-imap

2011-05-05 Thread Tim Gray

On May 05, 2011 at 01:43 PM +0100, Nick Jones wrote:

For reference, mutt (1.5.20) on my machine currently takes 11 seconds to
open my offlineimap'd Gmail 'All Mail' folder which contains 17,418
messages.  It then takes a further 6 seconds to close the mailbox, write
any changes, and then switch back to my Inbox (for example).


I've had different experiences with different folders on my Macbook (no 
SSD).  Some large folders with 10-20k messages open up in seconds.  
Others can take a long time.  I'm not sure what the issue is.  I sent a 
message to the list about it a couple months ago but no one had any 
ideas.  I don't know if the header/body caches are cleaned out properly 
or what, but the one time I nuked my cache, things really sped up for a 
couple weeks.


This is all on local maildirs.


Re: offlineimap much slower than gmail-imap

2011-05-05 Thread Tim Gray

On May 05, 2011 at 08:52 AM -0600, John J. Foster wrote:

My header cache (tokyo cabinet) seems to get slow on certain mailboxes
every few weeks. I just blow away that mailboxes cache and let it
rebuild and all is well again. I ALWAYS blow away the entire cache
whenever I pull a new version of mutt from mercurial and whenever tokyo
cabinet gets updated (Mac OSX).


Maybe I'll try doing that more often.  I'm using tokyo cabinet as well.  
It's strange - my inbox which usually only has ~200 messages in it opens 
slower than some mailing list boxes with 1000's of messages.  However, 
there's a lot more turnover in my inbox; it's rarely the same 200 
messages.


Re: mairix search

2011-05-05 Thread Tim Gray

On May 06, 2011 at 05:17 AM +0200, Sebastian Tramp wrote:

This is indeed an interesting feature. Do you use it instead of lbdbq?


Maybe I'm missing something.  Is it really that useful of a feature if 
you already use lbdb and feed it with your outgoing mail?


One of the other things I like about notmuch is that I feel it has a 
much more intuitive syntax.  I could never remember which switches I 
needed to use with mairix and mu.  With notmuch, if I want to find an 
email from j...@joe.com with a subject of 'work order', I can usually 
just search 'joe work order' and get the correct email.  Correct me if 
I'm wrong, but don't mu and/or mairix require to use a from: of f: tag 
and only match on complete addresses?


Re: mairix search

2011-05-05 Thread Tim Gray

On May 06, 2011 at 05:24 AM +0200, Sebastian Tramp wrote:

Does notmuch have a similar feature to mu's cfind? I did not find
it in the docu -- but the project name is policy also in terms of
documentation :-)


See my other email - I'm not exactly sure what cfind does.  It's pretty 
easy to search for an email from someone if you remember parts of their 
name and/or address.  Once you find the email, you could just use 
mail2muttalias.py to extract the address and stick it in your alias 
file.


I can't remember ever actually needing to do this though.  I feed lbdb 
with my outgoing mail to scrape addresses, in addition to being hooked 
into the OS X address book and my mutt alias files.


Re: mairix search

2011-05-03 Thread Tim Gray

On May 03, 2011 at 08:39 AM +0200, Jostein Berntsen wrote:

I use mairix, but it seems like mu is being quite actively developed:


Yes, mu is quite actively developed.  I liked it a fair amount.  I just 
have a feeling that notmuch has a brighter future.


Re: mairix search

2011-05-03 Thread Tim Gray

On May 03, 2011 at 08:47 AM +0200, Sebastian Tramp wrote:

Sounds interesting. do you think, notmuch is faster than mairix (not that
I have a problem with mairix speed, just for our information)


It's been a while since I've used mairix.  I forget exactly how long it 
took to index things initially.  I do remember however that I would only 
reindex to look for new mail once or twice a day because it took a fair 
amount of time and cpu power.


I'm currently indexing about 260,000 messages across many maildirs.  For 
unimportant reasons, I just reindexed them all from scratch last night.  
It took 1 hour and 10 minutes.  I did this while I was video chatting a 
friend.  This was an 'initial' index.  Subsequent indexing, looking for 
newly delivered messages, takes between 20-40 seconds, so I can run it 
every time I check for mail.  Which I do - I have it in my getmail 
script.  You can run it any time you want with the command `notmuch 
new`.


The other thing that I liked about notmuch infinitely more than mairix, 
and a fair bit more than mu, is that the search syntax just feels more 
natural to me.  Your mileage may vary.



Can you share your config parts regarding notmuch / mutt integration?
(or do you use it via emacs?)


I don't use it via emacs.  The mutt integration is very similar to what 
you'd do with mairix or mu.  A couple of bindings that just run the 
command line 'notmuch' program with your search terms following.  You do 
need to do a bit of command line piping to turn the filenames that 
notmuch outputs as search results into symbolic links.  Then you jump to 
a maildir with the results.


Though you can run it directly like this, I wrote a little python script 
that I call instead which gives me readline search history and cleans 
out the search results automatically when I make a new search.  I've 
attached the script 'notmuch-mutt.py'.  I started building in support 
for notmuch's tagging features but kind of lost interest.  You could 
also write an option if you want to *not* clear out the previous search 
results; then you could build up results incrementally if you desired.


I have a couple bindings defined.  I'll try to list them below; 
hopefully they don't get too jumbled up since they are kind of long (I 
don't break up my bindings definitions into separate lines in my muttrc 
- hopefully the \'s I put in break things appropriately).


This one just changes to the search results folder:
macro index,pager .r change-folder-readonly \
  ~/.notmuchmutt/search enter 


This on runs a search:
macro index,pager .s enter-commandunset wait_keyenter \
  shell-escape~/bin/notmuch-mutt.py -penter \
  change-folder-readonly~/.notmuchmutt/searchenter \
  enter-commandset wait_keyenter

This on runs a search and includes the full thread in the results.  You 
can also run it on a search result to reconstruct the thread from the 
message of interest.

macro index,pager .t enter-commandunset wait_keyenter \
  pipe-message~/bin/notmuch-mutt.py - --threadenter \
  change-folder-readonly~/.notmuchmutt/searchenter \
  enter-commandset wait_keyenter

This runs muttjump on the current message (see below).  I don't do all 
the screen stuff that muttjump can do.

macro generic .o enter-commandpush pipe-messagemuttjump \
  enterenter jump to original message

notmuch also has python bindings, so you can access the library 
directly.  For some reason on OS X, they don't work right for me, so my 
python script just calls the command line utility directly.


I also use the awesome 'muttjump' script [1].  It takes you to the 
parent mailbox of a message in the search results.


Hopefully I didn't forget any important bits.  The actual notmuch config 
file is very simple as there aren't a lot of relevant options.  You just 
set the directory to your maildir, and define your user name and address 
(I think this is used only if you are running it in emacs or vim as a 
full mail client).  Lastly, you can set which tags get set for new 
messages and whether or not you want imap flags (read, flagged, etc.) 
that are set in notmuch synchronized back to the maildir files.  Again, 
the last option is mostly for the full notmuch client.


[1]: https://github.com/weisslj/muttjump
#!/usr/bin/env python

__author__ = Tim Gray
__version__ = 1.0

import sys
import os
import optparse
import subprocess as sb
import shlex
import email
import readline

cfgdir = '~/.notmuchmutt'
cfgdir = os.path.expanduser(cfgdir)
searchdir = os.path.join(cfgdir, search/)
searchhist = os.path.join(cfgdir, 'search-history')
taghist = os.path.join(cfgdir, 'tag-history')
if os.path.isdir(cfgdir):
cfgFlag = True
else:
print 'must run with --config first to set up directory'
sys.exit(10)

class notmuch():
def __init__(self):
self.nm = '/usr/local/bin/notmuch'

def runCmd(self, query):
Runs the given command.
cmd

Re: mairix search

2011-05-02 Thread Tim Gray

On Apr 29, 2011 at 01:56 PM +0200, Sebastian Tramp wrote:

Is searching / indexing with mairix state of the art or is there a
better solution available? I am quite happy with that, just wanted to
ask ;-).


I found that mairix was a lot better for me than nmzmail.  I used mairix 
for quite a bit.  I then found mu (and figured out how to compile it on 
OS X).  I liked that even more.


Now however, I'm running notmuch as just an indexer.  It's pretty fast.  
I really like it.  It's also being actively developed.  And the best 
part in my mind is that it's developed as a library with a command line 
utility.  So my secret dream is that some enterprising developer hooks 
notmuch directly into mutt.  That would be awesome.


Re: Wrapping non-wrapped e-mail when replying

2011-04-27 Thread Tim Gray

On Apr 27, 2011 at 07:07 PM +0200, Marco Giusti wrote:
Take a try with this line. First reply to this email, move the cursor 
to this line an press consecutively Vgq. V select the whole line while 
gq wraps it.


`gqq` also wraps the currently selected line.  Might be faster than 
`Vgq`, though the latter is certainly useful when you want to select 
several lines.


Furthermore, if you use the mail vim script [1], you get some other 
useful mail related macros to use.  I think it is included with newer 
versions of vim automatically.


[1]: http://www.vim.org/scripts/script.php?script_id=813


Re: text_flowed in send-hook?

2011-04-11 Thread Tim Gray

On Apr 08, 2011 at 01:39 PM +0200, Richard wrote:

I wanted to have text_flowed enabled for certain recipients which would
seem easy enough using send-hook, so tried


I guess I'm not clear about why you wouldn't just send format=flowed text to 
every recipient and avoid this altogether.  If your mail body is properly 
formatted for format=flowed text (f=f), it will be hard wrapped at column 80 and 
should display perfectly fine in mail clients that can't handle f=f mail.  If 
they do handle f=f mail, then their client should reconstruct the original 
unbroken lines and rewrap according to the mail client display preferences.


As I understand it, setting $text_flowed doesn't actually change the content 
of your mail at all; it only changes a header alerting the recipients to the 
fact that the message is f=f, *even if it's not*.  The actually act of 
providing the proper formatting is done in the editor you compose in.  Are you 
also toggling that per recipient?


Re: text_flowed in send-hook?

2011-04-11 Thread Tim Gray

On Apr 11, 2011 at 10:44 PM +0200, Richard wrote:

yes, I am also modifying editor per recipient. At least I did it for
this and some other experiments. Often I call the editor through some
content/formatting wrapper.


Ahh ok.


Other than that I have little understanding what and how text_flowed really
does, used to do, is supposed to do and what other mailers are doing - other
than getting complaints from people whose client can not handle the one or the
other setting.


The way it's supposed to work is to hard wrap your text at 80 characters (or 
78 or 79, but this is a detail - it should probably be a character or two less 
then 80).  That way normal clients see a nice block of of email that has 
already had line breaks inserted into it, instead one gigantic line.


The magic sauce though is that there is a space at the end of each line that 
is part of the same paragraph.  This, in conjunction with the format=flowed 
header, let's mail clients reconstruct paragraphs into unwrapped single lines.  
Which they can then softwrap for display.


Supposed I like my emails wrapped at 90 characters for display and your prefer 
110 or to the edge of the window.  With regular hard wrapped text we can't 
change that.  But with format=flowed text, we can.


The beauty of it is that it's encoded in normally wrapped text, so the default 
fallback is a block of text wrapped at 80 characters, which shouldn't cause 
problems for anyone.  It also facilitates doing some smarter things with 
quoted text - your email program can take quote 's into account when it wraps 
the text.  It pulls them out, wraps the text, and sticks them back in, so you 
don't end up with a mess of odd quoting characters in the body of a quote.


Of course, that preference in mutt only sets the header.  It's up to you to 
use an editor that actually does the right thing.  If you use vim, you can do:


set fo+=w

for the right behavior.  

I'm sure mail clients on the receiving end can screw this up, but I'm guessing 
we'd need more details.


Here's a FAQ on it that someone wrote:
http://joeclark.org/ffaq.html


Re: Viewing HTML mails with images

2011-04-02 Thread Tim Gray

On Apr 02, 2011 at 02:11 PM +0100, Christian Ebert wrote:

If you're not afraid of Python you can try out viewhtmlmsg from
my muttils package:


Thanks for reminding me about these.  I had installed them awhile ago and 
never remember to use them.  Works great!


Re: delete local mail into local trash folder

2011-03-06 Thread Tim Gray

On Mar 07, 2011 at 12:05 AM +0800, chris M. sprite wrote:

   # folder-hook .  'macro index d save-message=trashenter'
   # folder-hook =trash 'macro index d delete-message'


I'm using essentially the above code:

folder-hook .   'macro pager,index d 
save-message=trashenter'
folder-hook =trash  'macro pager,index d delete-message'

Note, I've added 'index' to the macro definition because I'd like to be able 
to delete messages to the trash from the box index listing as well as from 
the pager.


Tim


Re: unified inbox

2011-02-24 Thread Tim Gray

On Feb 24, 2011 at 02:34 PM -0600, Puneet Kishor wrote:

As is, with mutt, I am constantly flipping between one account to another,
and even though I have mapped the F1 and F2 keys to the inboxes for the two
accounts, it is a pain in the derierre. Everytime mutt has to scan through
the cache and rebuild the index view.


I don't have a real answer for you.  What I do is to keep my two inboxes 
open in separate tabs of my terminal.  One is a work account and the other 
is personal.  A unified inbox would be cool, but this works just as well for 
me.  I can quickly go back and forth between tabs with a key combo.


Re: conversation view

2011-02-24 Thread Tim Gray

On Feb 24, 2011 at 02:38 PM -0600, Puneet Kishor wrote:

I just sent an email about unified inbox. In the same vein, another
thing I miss is the conversation view of other mailers. In that, I see
not just incoming emails in a thread, but also the replies that I sent
out. That way a complete conversation makes sense, and I don't have to
flip between inbox and sent mail. Once again, it can be a virtual index,
in that the emails can (should) actually stay in their respective
folders, but just show up in a view, and be tagged with the name of the
folder in which they reside.


This I can help you with.  You just need to change your fcc to the current 
mailbox.  I think the following command in your rc file will do it:


folder-hook =.* 'set record=^'

It sets the record to the current mail box ('set record=^') any time you 
enter any folder ('folder-hook=.*').  If I have a problem with the above 
command, maybe someone will correct me.


Tim


Re: Mutt on Mac Mini

2011-01-27 Thread Tim Gray

On Jan 27, 2011 at 02:47 PM -0900, Tim Johnson wrote:

I currently use mutt on ubuntu 10.04. I am considering getting a Mac
Mini - I believe that the OS is 'OS X Snow Leopard'. Is anyone aware
of any issues compiling and running mutt on this OS?


Just to pipe in, I run mutt on OS X just fine as well.  I compile from hg. 
I use BBEdit as my editor, running through a python script to clean up 
formatting.  It works fine with vim as well, which is preinstalled.


Re: Iphone antics

2011-01-24 Thread Tim Gray

On Jan 24, 2011 at 08:51 PM -0600, llwy...@suddenlink.net wrote:

Is there anyway to setup my mail account so I can check my mail with the
Iphone? Or is that beyond the purview of this email list?   :)


I do it all the time with an IMAP account.  Either access it through mutt's 
IMAP or use something like offlineimap (what I do).


Re: libiconv and mailbox reading speed

2010-11-17 Thread Tim Gray

On Nov 17, 2010 at 02:27 PM +0100, Christian Ebert wrote:

Shot in the dark: Especially under MacOS 10.4 I sometimes
improved things by:

$ tar cjf slow-maildir.tar.bz2 slow-maildir
$ mv slow-maildir slow-maildir-bak
$ tar xjf slow-maildir.tar.bz2


I'll give it a try.  But I really did see a huge performance increase when I 
had mutt compiled with no libiconv support.


On a side note, if anyone is interested in this issue, I can make available 
the big ass mailbox that is giving me problems.  It's just a mailing list so 
it's nothing personal...


Re: libiconv and mailbox reading speed

2010-11-15 Thread Tim Gray

On Nov 08, 2010 at 12:49 AM +, Christian Ebert wrote:

Maybe you have to rebuild the databases now that you're using
iconv. FWIW, for me the combination with tokyocabinet is
lightning fast, but I'm still on a pure 32bit MacOS 10.5.8. A
threaded mailbox with over 75000 messages opens in about 2
seconds here.


Sorry was out of town for a bit.  Nope, things are still slow.  One big 
mailbox of about 35k messages is pretty slow on opening.  So is on 
particular small mailbox of only about 1000 messages, all from forum 
notifications.  Something about the particular structure of those emails 
maybe?


Re: improper decoding

2010-11-07 Thread Tim Gray

On Nov 05, 2010 at 01:00 AM -0400, Tim Gray wrote:
I recently rebuilt mutt from the hg repository (on Oct. 25th or 
thereabouts).  I've noticed I've been having a lot of problems with 
properly displayed emails with non-ascii codings.  Mainly with windows-1252 
(and maybe iso-8859-1, I forget).  Anyway, I haven't had any problems with 
this until just recently.  It's also interfering with replies, both with my 
homemade script that assumes utf-8 input (which always worked in the past) 
and vi, which isn't displaying the non-ascii characters in a useful way.


I don't *think* I changed anything else other than a new build of mutt. 
Maybe I did.  Has anything changed recently in the source that would screw 
up decoding of different character sets?  For complete info, I'm running 
mutt on Mac OS X 10.6.


Ok, so clearly no one else has this problem.  Let me ask this question then. 
How does mutt prepare the message when you hit reply?  Assuming a message is 
in iso-8859-1 encoding.  Does mutt decode that and make a new text file with 
UTF-8 encoding that it then passes off to your editor?  Or does it make a 
new text file in the messages original encoding?


Re: improper decoding

2010-11-07 Thread Tim Gray

On Nov 07, 2010 at 09:43 AM -0500, Tim Gray wrote:
Ok, so clearly no one else has this problem.  Let me ask this question 
then. How does mutt prepare the message when you hit reply?  Assuming a 
message is in iso-8859-1 encoding.  Does mutt decode that and make a new 
text file with UTF-8 encoding that it then passes off to your editor?  Or 
does it make a new text file in the messages original encoding?


Answer - it uses libiconv.  I finally realized this newest version of mutt 
had been built without libiconv support.  I had previously built a new 
version of libiconv and installed it in /usr/local.  Even using the 
`--with-libiconv-prefix=/usr` option to build with the system iconv, somehow 
the copy in /usr/local was being picked up and mutt didn't like that. 
Removing it from my system so only the system version in /usr/ was picked up 
fixed everything.


I'm guessing this has to something to do with x86_64 and i386 versions of 
the library.  The Apple provided one has both architectures while the one I 
was building was only x86_64.


libiconv and mailbox reading speed

2010-11-07 Thread Tim Gray
In another thread I had a conversation with myself about libiconv and 
encoding problems.  That is all fixed now.


There was also thread the other week about header caching and I had 
commented that even though I used header caching, things were slow.  I also 
stated I had upgraded tokyo cabinet and I noticed a huge speed increase in 
the initial read of a mailbox when I opened it.  What I didn't realize at 
the time was that I had also rebuilt mutt with the iconv error at the same 
time, so mutt wasn't using iconv.


Now that I've fixed mutt+iconv, I see I am back to my older, slower mailbox 
opening.  So it appears that iconv slows down mailbox opening by quite a 
bit.  I could be wrong though.  Is there any way to speed this up?


improper decoding

2010-11-04 Thread Tim Gray
I recently rebuilt mutt from the hg repository (on Oct. 25th or 
thereabouts).  I've noticed I've been having a lot of problems with properly 
displayed emails with non-ascii codings.  Mainly with windows-1252 (and 
maybe iso-8859-1, I forget).  Anyway, I haven't had any problems with this 
until just recently.  It's also interfering with replies, both with my 
homemade script that assumes utf-8 input (which always worked in the past) 
and vi, which isn't displaying the non-ascii characters in a useful way.


I don't *think* I changed anything else other than a new build of mutt. 
Maybe I did.  Has anything changed recently in the source that would screw 
up decoding of different character sets?  For complete info, I'm running 
mutt on Mac OS X 10.6.


Re: Switching index view from thread to by date

2010-10-26 Thread Tim Gray

On Oct 26, 2010 at 09:08 AM -0700, emmanuel_mays...@lynceantech.com wrote:
To change the index view in mutt, from by-thread to by-date I can change 
the

.muttrc
But how can I change it when the session is open?
Is there a keyboard combination I should know about?


The 'sort-mailbox' command.  I have it bound to 'o'.  Not sure what the 
default binding is.


Re: header cache not so useful when new messages added to Maildir?

2010-10-25 Thread Tim Gray

On Oct 26, 2010 at 09:42 AM +0900, Dan Drake wrote:

Is there any way to optimize this? It seems a bit silly to need to
reread all 700 messages when a single new message has been added. Is
there a way to make this work better, or to get Mutt to intelligently
combine the existing cache while reading in the small number of new
messages?


I'll be interested to hear the responses.  I've been using hcache (why 
wouldn't you, right?) and have experienced something similar.  However, for 
me it's only in boxes that are quite large, 1000's of messages, or one 
particularly box that I have of about 1000 messages all from the same 
source.  Maybe it's something specific about the content/structure of those 
messages that causes a slowdown.


I was using tokyo cabinet as my db backend, version 1.4.27.  I just 
installed version 1.4.46 today and it is SO MUCH faster.  I also upgraded 
mutt to the most recent source from the repository.  Previously I was 
running whatever was in the repository about 2 months ago.  I don't know if 
either or both of these upgrades is the root of the speed up, or if it's 
something else...


Re: Do many here still use abook or are there better alternatives now?

2010-10-23 Thread Tim Gray

On Oct 23, 2010 at 12:19 PM +0100, Chris G wrote:

Or are there alternative ways of maintaining the mutt alias list (and
maybe an addressbook as well) nowadays?


I use lbdb and the Mac OS X Addressbook.  Obviously, if you aren't on OS X, 
that's not very useful to you.  But maybe something similar is available in 
your environment?  A GUI program that has a command line interface that you 
can use to query from lbdb?


Basically, I keep 'important' permanent addresses in Addressbook.  These 
also get synced to my phone.  Other addresses that I only need periodically 
end up in one of several alias files, for example, the mutt-users address. 
Lastly, I have every address I send to is added to lbdb.  The combination of 
these three gives me all of the functionality I need.  I also dump the OS X 
Addressbook down to a mutt alias file via a command line program to give me 
immediate access with tab completion to those addresses without querying 
lbdb.  It's also has groups defined as set in Addressbook that I can match 
against them with hooks.


The only real thing I can't do is add and address to Addressbook directly 
from mutt.  I'm sure I could make some kind of script that did this, but 
it's pretty easy just to copy and paste it into an entry.


Re: Open a specific message from the command line

2010-09-29 Thread Tim Gray

On Sep 27, 2010 at 11:59 AM +0200, Jostein Berntsen wrote:

If you install the mu search utility, you can open mails directly with
the mu view file path command. To find the file path for a specific
mail you can use mu find search criteria --fields l, d, f, s to
get this displayed on stdout.

http://www.djcbsoftware.nl/code/mu/#features


Hmm. All paths lead back to this.

I'd like to install it but am on OS X, so there some difficulties with 
glib...


I'll give it another go.


Open a specific message from the command line

2010-09-24 Thread Tim Gray
Is there anyway to open a specific message in a maildir from the command 
line?  Any official method or any workaround that people can think of?


Thanks


Re: offlineimap + mutt

2010-09-14 Thread Tim Gray

On Sep 14, 2010 at 01:22 PM -0400, Thaddeus Morgan wrote:

Any suggestions on how I can get offlineimap working? Anyone have any
.offlineimaprc files they can share?


Right off the bat, I see you have:

[Account GP]
localrepository = LocalGP
remoterepository = RemoteGP

yet your two repository names are:
[Repository LocalGP]
[Repository RemoteML]

I would think you'd want to change that RemoteML to RemoteGP.

Don't know about the tunneling stuff, since I've never used that.

You'll also likely get more help over on the offlineimap list.


Re: converting from pine to mutt

2010-09-12 Thread Tim Gray

On Sep 12, 2010 at 11:37 AM -0400, Thaddeus Morgan wrote:

1) What is the best method of converting a large number of mbox folder
into Maildir folders? I've read that mutt's -f and -e options are
suitable for doing this. Is there a best practice I should follow?


Mutt can do it.  I think I converted a couple boxes by setting mutt's 
preferred format to Maildir, then open the mbox's in mutt, and copy the 
messages to a new location.


Alternately, if you are comfortable with something like procmail, you could 
pipe your mbox files through it into maildirs.  That was what I did for the 
bulk of my email if I recall.



2) What is the best way to store local copies of all messages? I'd
like to read, sort, and compose responses to my mail while offline and
I'd like to have a local copy of all my mail in case something goes
horribly wrong with the server and its backups. I've read that
fetchmail and offlineimap can accomplish this. Can mutt do this on its
own? Again, is there a best practice to follow?


I've been using offlineimap for the last year or so.  Recently I toyed 
returning to pure IMAP by letting mutt connect to the server directly, but 
am back to offlineimap.  I have some questions about mutt's IMAP 
capabilities that maybe someday I'll get around to asking.  However, 
offlineimap lets you do what you need to do.  Local copy for backup purposes 
and offline reading.  Syncing works perfectly for me.  I don't sync all of 
my emails - quite a bit is not stored on the IMAP servers.


Personally, I use getmail instead of fetchmail for some of my other boxes. 
It was very easy to set up.


For SMTP, you can use mutt's internal capabilities, or something like msmtp 
or putmail.  I used msmtp for a long time but liked putmail a bit better.


Re: 1.5.20 and sidebar

2010-08-30 Thread Tim Gray

On Aug 30, 2010 at 09:00 AM -0700, fe...@crowfix.com wrote:

I have maildirs, a bunch of them, all under ~/Maildirs.  I was hoping
to be able to use something like this:


I use a Python script to list my boxes.  I'm sure you could do the same with 
a shell script of shell command, but I'm more comfortable with Python.


In my muttrc, I have:
mailboxes `~/bin/listbox.py ~/Maildirs`

I've attached listbox.py.  It has a list defined, ignore, that lets you 
ignore certain folders if you wish.  It works for Maildirs.  I cleaned up 
the code a bit for public consumption and removed some extra stuff that I 
have it do.#!/usr/bin/env python


__author__ = Tim Gray
__version__ = 1.0

import os, sys

try:
fpath = sys.argv[1]
except:
sys.exit(1)

tmp, parentdir = os.path.split(fpath)
# path to boxes to ignore, relative to input file path  
ignore = ['.DS_Store', 'boxes', 'to', 'remove']

s = os.path.expanduser(fpath)
s1, s2 = os.path.split(s)
os.chdir(s1)

dirs = []
for root,wdirs,files in os.walk(s2):
if 'cur' in wdirs:
wdirs.remove('cur')
wdirs.remove('tmp')
wdirs.remove('new')
dirs.append(root)

# remove dirs to ignore
for i in ignore:
removedir = parentdir + '/' + i
if removedir in dirs:
dirs.remove(removedir)

# print out dirs
for i in dirs:
print '+%s' % i,



Re: Deleting messages trash-can-style

2010-08-23 Thread Tim Gray

On Aug 22, 2010 at 08:11 PM +0200, Michael Ludwig wrote:

If not, you might want to look
at doing this:

  macro   index   d   save-message=.Trash\n
  macro   pager   d   save-message=.Trash\n

That should work, but you'll want to change .Trash to something else,


That works great, thanks! I think what save-message does is a combo of
copy-message and delete-message. Exactly what I want.


I take this a step further.  I have a cronjob that goes through my Trash 
maildir and moves files older than 30 days to special maildir in my system 
Trash directory (I run OS X).


Anything I delete ends up in the mail Trash but I never have to routinely 
clean it out since it eventually gets cycled to my real Trash.  If I had to 
find something older than 30 days, I can use mutt to open up the special 
maildir in the system trash and look for the message I want.  I only empty 
my system trash every couple months, so I have a second level of trash 
safety net.


Re: sending email to txt

2010-08-03 Thread Tim Gray

On Aug 03, 2010 at 12:00 AM -0800, rog...@sdf.org wrote:
Maybe the reason for your delay was your smtp relays?  Might not have been 
your

person relay, but another one in between (ie. Big city)


Who knows.  I just tried both addresses now and they both came right 
through.


Re: sending email to txt

2010-08-03 Thread Tim Gray

On Aug 03, 2010 at 12:00 AM -0800, rog...@sdf.org wrote:
Maybe the reason for your delay was your smtp relays?  Might not have been 
your

person relay, but another one in between (ie. Big city)


Sorry for the additional email.  Forgot to add this:

The mms address preserved my from email address.  The txt address did not - 
the txt I received on my phone was from 1-410-000-002 and it also had From: 
Tim Gray in the body of the text message.


Re: sending email to txt

2010-08-02 Thread Tim Gray

On Aug 01, 2010 at 10:26 PM -0800, rog...@sdf.org wrote:

Nope.  Doesn't work here.


I don't know.  It worked the other day for me.  Here's the complete list 
from wiki:

http://en.wikipedia.org/wiki/List_of_SMS_gateways


Re: sending email to txt

2010-08-02 Thread Tim Gray

On Aug 02, 2010 at 08:27 AM -0400, Tim Gray wrote:

On Aug 01, 2010 at 10:26 PM -0800, rog...@sdf.org wrote:

Nope.  Doesn't work here.


I don't know.  It worked the other day for me.  Here's the complete list 
from wiki:

http://en.wikipedia.org/wiki/List_of_SMS_gateways


To follow up on this, I sent two emails this morning to my phone, one to 
each of the addresses.  The mms message came through about 5 mins after I 
sent it.  The txt address message came through about an hour and 15 mins 
after I sent it.  But both did come through.


Re: sending email to txt

2010-08-01 Thread Tim Gray

On Aug 01, 2010 at 09:56 PM -0600, Scott Jones wrote:

I have tried sending to 'num...@txt.att.net' and it just bounces back,
without delivery.


I think num...@mms.att.net works.


Re: sending email to txt

2010-08-01 Thread Tim Gray

On Aug 01, 2010 at 10:20 PM -0600, Scott Jones wrote:

Thanks Tim. That worked, but I received my test text as an mms
message, instead of just txt.. but 'num...@txt.att.net' didn't work..
I just hope in sending an mms message I am not billed differently.


Don't know.  I do know that they txt address used to work, but recently my 
brother texted my email address by accident and it came through with the mms 
address instead.


We have unlimited texting and mms'ing, so it doesn't really matter for us. 
Hope you don't get hit with a silly bill.


group command syntax

2010-07-27 Thread Tim Gray
I have two questions about groups.  Up until now, I've created all of my 
groups while creating aliases.  I now realize there is a distinction between 
the two, and don't really need most of the aliases for the groups, just the 
group definitions themselves.  Whereas before I would write:


alias -group groupname groupname member1, member2, member3

now I should write:

group -group groupname -addr member1 member2 member3

correct?

As long as that is right, it doesn't seem to work for me.  I can add members 
to a preexisting group defined with an alias command, remove the alias for 
the group, and then match agains the group, but I can't define a group from 
scratch with the above command.


My second question is why does the group command need the -group switch 
after it?  Wouldn't:
group groupname -addr member1 member2 be more sensible?  Or is there 
something I'm missing?


Thanks!


Re: sending to a list of undisclosed recipients

2010-07-27 Thread Tim Gray

On Jul 27, 2010 at 03:29 PM -0500, Derek Martin wrote:

Hmmm... Seems like you're wrong after all (Mutt 1.5.20hg
(2009-08-27)).  Mutt may well write out the Bcc line on the message
that is sent out.


It's probably dependent on the SMTP agent, no?  I did a test earlier today 
using putmail as my local SMTP agent.  If I sent a message with no 
recipients other than a BCC to myself with write_bcc on, I got the email 
with NO addresses displayed.  This is the desired behavior.  When I turned 
write_bcc off, the message never arrived.  I'm guessing putmail strips out 
the bcc field for me, and when it never got one in the second email, it (or 
the remote SMTP server) didn't have a destination for the email.


Re: Add header automatically

2010-06-27 Thread Tim Gray

On Jun 27, 2010 at 12:50 PM -0400, Ed Blackman wrote:
I have my $editor set to a Perl script that manipulates the incoming 
message in various custom ways before handing it off to my real editor. 
Adding a new header would be trivial.


The only disadvantage is that I have lost the Aborted unmodified message 
detection, which I could fix if I ever was bothered enough to figure out 
how mutt detects unmodified messages (file timestamp?)


I do something similar with a python script.  I got around the problem you 
mention above by making two temp copies of the message file.  I then send 
one copy to my editor for writing the message.  After the editor returns, I 
compare the two temp copies.  If they are the same, I delete them and exit. 
The original file from mutt has never been touched at this point and it 
picks up on the fact that it's unmodified and aborts.  If the two temp 
copies are different, remove the original mutt file and replace it with the 
modified file.  Then remove the temp files.


I'm sure there's an easier way to do this.  I'm also sure you could do it 
with only one temp file and not the two, but when I wrote the script the 
other year, I had some reason for doing it the way I did.  Oh yeah, I have a 
step that strips signatures before I start editing, so I can't compare to 
the file directly out of mutt, since that can still have a sig.


It would be easy to add a blank attachement line, and then after you get 
done editing, strip it out if it had a dummy value, like 'blank.txt'. 
Personally, I find it easy enough to hit the 'a' key in the compose screen 
and just drag my file into my terminal.  OS X picks up on the file path and 
pastes it in for you.


Tim


Re: Privacy considerations when using mutt

2010-05-10 Thread Tim Gray

On May 10, 2010 at 11:00 AM -0500, Kyle Wheeler wrote:
I used to do that, until I discovered the power of gpg to decode things on 
the fly. Now I have an encrypted mutt config file that is sourced by the 
main mutt config file, like this:


source gpg -d .muttrc.secure.gpg|


Do what?!?  That's awesome.  Thanks for the tip.  Not sure if I'll use it, 
but it's a great thing to keep in the bag of tricks.


  1   2   >