Re: [SPAM?] mutt deletes temporary HTML file before I can view it
** Xu Wang <xuwang...@gmail.com> [2016-06-22 10:07]: > Hello, > > I would like to be able to do > 'v' and then 'm' to open an HTML email in my browser. I can succeed in > this regard by having the following entry in ~/.mailcap: > text/html; chromium-browser %s; description=HTML Text; > > However, mutt will be unresponsive until I exit the browser. This is > not my work style. So I added & to detach. This is good in the sense > that mutt now does not wait for the browser. However, by the time my > browser opens, mutt has already deleted the .html temporary file > because after adding & the command returned immediately? > > Has any one come across this situation and has a similar desire? > > Is there a setting I can choose to ask mutt to not delete the > temporary files? They are stored in /tmp and space is cheap so I would > like to ask mutt to not worry about them. > > Kind regards, > > Xu ** end quote [Xu Wang] There are several solutions to this of varying levels of complexity, but I use a simple one liner to fix this. I always ensure that the browser is running first, but even when it is the deletion of the temporary file isn't uncommon so I make the following change to /etc/mailcap # - User Section Begins - # text/html; /usr/bin/sensible-browser %s; description=HTML Text; nametemplate=%s.html; needsterminal # - User Section Ends - # You don't need to add the comments above and below, but I've included them to emphasis that this goes in the user section at the top so that it is not deleted automatically. All this does is make Mutt wait until a key is pressed to return to normal operations and thereby delays the file deletion. Since you always have to do that anyway on returning it is just a double press instead of a single one. -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: Can one do something to an E-Mail without even opening/seeing it in mutt?
** Chris Green <c...@isbd.net> [2016-05-17 11:09]: > On Tue, May 17, 2016 at 10:25:39AM +0100, Paul Tansom wrote: > > ** Chris Green <c...@isbd.net> [2016-05-17 08:31]: > > > On Mon, May 16, 2016 at 04:37:52PM -0700, Ian Zimmerman wrote: > > > > On 2016-05-16 08:31 +0100, Chris Green wrote: > > > > > > > > FWIW, after using procmail and sieve, and my own module libraries for > > > > both perl and python for a long time, this is exactly what I do now: I > > > > have my own python script driven by a JSON file to do the job. I find > > > > this the most flexible and liberating way ever, and besides the script > > > > has grown complex enough that I can show it as example code for job > > > > applications :) > > > > > > > Mines not that complex but does what I need, adding what I asked for > > > originally won't be all that difficult. > > > > > > I wrote mine to simplify the operation of joining a new mailing list, > > > I just subscribe to the list and add one line to my configuration > > > file. That routes the list messages to a specific destination and > > > adds a short alias for sending mail to the list. > > > > > ** end quote [Chris Green] > > > > For comparison my line from my Sieve configuration for automatically filling > > mail into my list folder is: > > > > if header :contains ["List-Post"] ["mutt-users@mutt.org"] { > > fileinto "lists.mutt"; stop; } > > > > and in Mutt I just use L to reply to the list. Of course this relies on the > > list being setup properly. I have other versions for some lists (mainly > > using > > List-Id instead of List-Post) and some based on subject for my own automated > > mails from cron jobs. If I wanted to send the mail on to another acount I > > could > > just use something like: > > > > if header :contains ["List-Post"] ["mutt-users@mutt.org"] { > > redirect "u...@domain.com"; stop; } > > > > As with most things it is a combination of what you are used to and your > > personal setup that dictates the best solution! > > > My configuration file (which is all that changes if I add/remove a > mailing list) just has lines like:- > > audacityLi audacity-us...@lists.sourceforge.net > Audacity-users > > The first field becomes my alias for sending messages to the list and > is also the destination mailbox for received messages. The second > column is the directory the mailbox is in (there's an In and a Tm as > well as Li). The third field (obviously) is the full list E-Mail > address and the fourth (optional) field is text to be removed from the > subject line if it's found there between []. > > The muttrc configuration also automatically uses the above > configuration file to set the 'lists', 'subscribe' and 'mailboxes' > entries. It's this that tools like procmail (and sieve?) can't do. ** end quote [Chris Green] This is where an off the shelf package can never match a custom coded script, if you have the knowledge, time and inclination to write one. You know exactly what combination of software you are using and on what platform and code to suite that, where off the shelf ends up being much more unweildy as it will have to handle a show multitude of different scenarios. Time is my issue, I really must get around to sorting out something to allow management of Sieve configuration for holiday away messages, mainly for people on Outlook, but I doubt it will end up that specific. Personally I just dive in and edit the .dovecot.sieve file by hand, but then I have full root access to the server and am comfortable using Vim to do this :) -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: Can one do something to an E-Mail without even opening/seeing it in mutt?
** Chris Green <c...@isbd.net> [2016-05-17 08:31]: > On Mon, May 16, 2016 at 04:37:52PM -0700, Ian Zimmerman wrote: > > On 2016-05-16 08:31 +0100, Chris Green wrote: > > > > FWIW, after using procmail and sieve, and my own module libraries for > > both perl and python for a long time, this is exactly what I do now: I > > have my own python script driven by a JSON file to do the job. I find > > this the most flexible and liberating way ever, and besides the script > > has grown complex enough that I can show it as example code for job > > applications :) > > > Mines not that complex but does what I need, adding what I asked for > originally won't be all that difficult. > > I wrote mine to simplify the operation of joining a new mailing list, > I just subscribe to the list and add one line to my configuration > file. That routes the list messages to a specific destination and > adds a short alias for sending mail to the list. > ** end quote [Chris Green] For comparison my line from my Sieve configuration for automatically filling mail into my list folder is: if header :contains ["List-Post"] ["mutt-users@mutt.org"] { fileinto "lists.mutt"; stop; } and in Mutt I just use L to reply to the list. Of course this relies on the list being setup properly. I have other versions for some lists (mainly using List-Id instead of List-Post) and some based on subject for my own automated mails from cron jobs. If I wanted to send the mail on to another acount I could just use something like: if header :contains ["List-Post"] ["mutt-users@mutt.org"] { redirect "u...@domain.com"; stop; } As with most things it is a combination of what you are used to and your personal setup that dictates the best solution! -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: Can one do something to an E-Mail without even opening/seeing it in mutt?
** Joel Buckley <m...@spam.joelbuckley.com.au> [2016-05-15 12:39]: > On Sun, May 15, 2016 at 10:30:49AM +0100, Chris Green wrote: > >As per the subject is it possible for mutt to do something to an > >E-Mail in its inbox without the user seeing/doing anything at all? > > > >E.g. is there some sort of hook that can, for example, reply to or > >delete an E-Mail from a specific address without any user interaction? > > > No, that's not what mutt does. What you're looking for is a mail delivery > agent (MDA). > > Look at something like procmail or Maildrop, which integrate with your mail > transfer agent (MTA). > ** end quote [Joel Buckley] I tend to use Sieve for this sort of thing now. I've used IMAP for mail for what must be around 20 years now (initially with Netscape at the client and server side, later Exim and Cyrus, and now Exim and Dovecot). I used to use Procmail, but now I use Sieve and find it much easier to work with, probably mainly because it is integrated into the mail server. This does rely on either control of the mail server being used, or at least being given control of your own Sieve scripts. -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: status_format per account-hook or folder-hook
** Paul Tansom <p...@aptanet.com> [2015-09-26 17:43]: > ** Cameron Simpson <c...@zip.com.au> [2015-09-26 12:58]: > > On 26Sep2015 08:00, Cameron Simpson <c...@zip.com.au> wrote: > > >The muttrc is read just once at startup. It looks like you want to source > > >your per-domain files on folder switch. I'd be inclined to prepend "set > > >imap_user = p...@domain1.com" to your muttrc.domain1.com file, and write > > >the hooks like this: > > > > > >account-hook imaps://em...@domain1.com@imap.localdomain.com 'source > > >~/.mutt/muttrc.domain1.com' > > >account-hook imaps://em...@domain2.com@imap.localdomain.com 'source > > >~/.mutt/muttrc.domain2.com' > > > > > >and so forth. That way the _entire_ domainX.com setup is sources on folder > > >switch. > > > > I've been doing some tests (and swanking up my muttrc config). And reading > > the Fine Manual: > > > > http://www.mutt.org/doc/devel/manual.html#account-hook > > > > It seems that the account-hooks are only consulted when mutt needs to access > > a remote folder (IMAP, etc). It is consulted not just when you visit an IMAP > > folder but also whe mutt polls a remote folder, etc. So anything in an > > account-hook might be run at any time, depending on your config. > > > > By contrast the folder-hooks are used reliably for every folder entry. > > > > So I've now got the following in my setup (somewhat edited here): > > > > set my_cs='c...@zip.com.au' > > set my_cs_iphone='email-which-delivers-to-my-phone@blah' > > set my_cs_clipboard='email-which-delivers-a-shared-folder@glargh' > > set my_local_mail="$HOME/mail" > > > > folder-hook . 'set my_account_email=$my_cs; set folder=$my_local_mail' > > folder-hook 'imaps://my-phone-imap/' 'set my_account_email=$my_cs_iphone' > > folder-hook 'imaps://the-clipboard-imap/' 'set > > my_account_email=$my_cs_clipboard' > > folder-hook . 'set status_format="$my_account_email [Msgs:%?M?%M/?%m%?n? > > New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? > > Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)"' > > > > account-hook . 'unset imap_user; unset imap_pass; unset tunnel' > > account-hook 'imaps://my-phone-imap/' 'source "cs-mutt-imap-settings > > cs-iphone-cc |"' > > account-hook 'imaps://the-clipboard-imap/' 'source "cs-mutt-imap-settings > > clipboard |"' > > > > The folder-hooks run on every folder entry, including the last one which > > sets a per-folder $status_format. The account-* files set only usernames and > > passwords, sucked from my .fetchmailrc. > > > > You might find it useful to move your status_format into folder-hooks and > > keep the account-hooks purely for passwords. > ** end quote [Cameron Simpson] > > Looks interesting, I'll have to explore further. I've been tidying my config > too. Initially removed some folder-hook lines at the bottom that seemed to > duplicate everything that was in the source files for my account-hook lines > (a legacy from earlier configs I think). Having looked at your previous email > I experimented with moving the imap_user into the source'd file and it did > allow the config to modify the status_format. > > There were a few downsides to this: > > Firstly, the tab completion of the accounts when changing directory vanished; > I used to be able to start with im for imaps:// and tab complete from there. > > Secondly, once all accounts were modified it stalled on sorting mail; this > was fixed by putting an imap_user in for the default account. > > Thirdly, once I manually type account details in (imaps://... etc.) and > switch to a different account the performance nose dives and everything > pauses before each action, even when I switch back to the main account > performance is poor - likely due to the fact that using = hasn't switch to > referring to the main account. I've also just noticed I've lost my signature. > > Clearly this needs more work, and I'm learning quite a bit in the process. It > is amazing how long you can get along using some software without fully > understanding everything about it. I started using Mutt back in 2001 I think. ** end quote [Paul Tansom] I think I've got it sorted. I've had a bit of fun with my muttrc and will probably experiment further as I'm sure I could tidy and improve things more. My account-hook lines now just have the imap_user line with them and everything else that was in the file sourced has moved to matching folder-hook lines. For a while I had these in separate
Re: status_format per account-hook or folder-hook
** Cameron Simpson <c...@zip.com.au> [2015-09-26 12:58]: > On 26Sep2015 08:00, Cameron Simpson <c...@zip.com.au> wrote: > >The muttrc is read just once at startup. It looks like you want to source > >your per-domain files on folder switch. I'd be inclined to prepend "set > >imap_user = p...@domain1.com" to your muttrc.domain1.com file, and write > >the hooks like this: > > > >account-hook imaps://em...@domain1.com@imap.localdomain.com 'source > >~/.mutt/muttrc.domain1.com' > >account-hook imaps://em...@domain2.com@imap.localdomain.com 'source > >~/.mutt/muttrc.domain2.com' > > > >and so forth. That way the _entire_ domainX.com setup is sources on folder > >switch. > > I've been doing some tests (and swanking up my muttrc config). And reading > the Fine Manual: > > http://www.mutt.org/doc/devel/manual.html#account-hook > > It seems that the account-hooks are only consulted when mutt needs to access > a remote folder (IMAP, etc). It is consulted not just when you visit an IMAP > folder but also whe mutt polls a remote folder, etc. So anything in an > account-hook might be run at any time, depending on your config. > > By contrast the folder-hooks are used reliably for every folder entry. > > So I've now got the following in my setup (somewhat edited here): > > set my_cs='c...@zip.com.au' > set my_cs_iphone='email-which-delivers-to-my-phone@blah' > set my_cs_clipboard='email-which-delivers-a-shared-folder@glargh' > set my_local_mail="$HOME/mail" > > folder-hook . 'set my_account_email=$my_cs; set folder=$my_local_mail' > folder-hook 'imaps://my-phone-imap/' 'set my_account_email=$my_cs_iphone' > folder-hook 'imaps://the-clipboard-imap/' 'set > my_account_email=$my_cs_clipboard' > folder-hook . 'set status_format="$my_account_email [Msgs:%?M?%M/?%m%?n? > New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? > Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)"' > > account-hook . 'unset imap_user; unset imap_pass; unset tunnel' > account-hook 'imaps://my-phone-imap/' 'source "cs-mutt-imap-settings > cs-iphone-cc |"' > account-hook 'imaps://the-clipboard-imap/' 'source "cs-mutt-imap-settings > clipboard |"' > > The folder-hooks run on every folder entry, including the last one which > sets a per-folder $status_format. The account-* files set only usernames and > passwords, sucked from my .fetchmailrc. > > You might find it useful to move your status_format into folder-hooks and > keep the account-hooks purely for passwords. > > Cheers, > Cameron Simpson <c...@zip.com.au> ** end quote [Cameron Simpson] Looks interesting, I'll have to explore further. I've been tidying my config too. Initially removed some folder-hook lines at the bottom that seemed to duplicate everything that was in the source files for my account-hook lines (a legacy from earlier configs I think). Having looked at your previous email I experimented with moving the imap_user into the source'd file and it did allow the config to modify the status_format. There were a few downsides to this: Firstly, the tab completion of the accounts when changing directory vanished; I used to be able to start with im for imaps:// and tab complete from there. Secondly, once all accounts were modified it stalled on sorting mail; this was fixed by putting an imap_user in for the default account. Thirdly, once I manually type account details in (imaps://... etc.) and switch to a different account the performance nose dives and everything pauses before each action, even when I switch back to the main account performance is poor - likely due to the fact that using = hasn't switch to referring to the main account. I've also just noticed I've lost my signature. Clearly this needs more work, and I'm learning quite a bit in the process. It is amazing how long you can get along using some software without fully understanding everything about it. I started using Mutt back in 2001 I think. -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: status_format per account-hook or folder-hook
** Cameron Simpson <c...@zip.com.au> [2015-09-25 09:22]: > On 24Sep2015 12:22, Paul Tansom <p...@aptanet.com> wrote: > >Is there a way to change the status_format when you change folders / > >accounts? > > > >I currently have lines similar to: > > > >set status_format = "-%r-Mutt: aptanet.com %f [Msgs:%?M?%M/?%m%?n? > >New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? > >Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---" > > > >in my main muttrc, and then my folder-hook and/or account-hook sections, but > >it > >never changes on the display. All the other changes I've got in there seem to > >work fine. > > Can you show us the account-hook lines, perhaps with private information > obscured? > > It looks like account-hook should do the trick for you but I don't have an > myself at present. There are examples here just in case you haven't looked > at them: > > http://www.mutt.org/doc/devel/manual.html#account-hook ** end quote [Cameron Simpson] In my main muttrc file I have: account-hook imaps://em...@domain1.com@imap.localdomain.com 'set imap_user = p...@domain1.com' source ~/.mutt/muttrc.domain1.com account-hook imaps://em...@domain2.com@imap.localdomain.com 'set imap_user = p...@domain2.com' source ~/.mutt/muttrc.domain2.com account-hook imaps://em...@domain3.com@imap.localdomain.com 'set imap_user = p...@domain3.com' source ~/.mutt/muttrc.domain3.com account-hook imaps://em...@domain0.com@imap.localdomain.com 'set imap_user = p...@domain0.com' source ~/.mutt/muttrc.domain0.com The last one seems to end up as the default one you log into and then it cycles through from the top. Not quite sure why. Then the additional muttrc.domanX.com files are something like: folder-hook imaps://em...@domain1.com@imap.localdomain.com \ 'set realname = "Paul Tansom" set hostname = domain1.com set status_format = "-%r-Mutt: domain1.com %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---" my_hdr From: Paul Tansom <p...@domain1.com> my_hdr Sender: Paul Tansom <p...@domain1.com> my_hdr Envelope_from: Paul Tansom <p...@domain1.com> set folder = imaps://p...@domain1.com@imap.localdomain.com/ set spoolfile = imaps://p...@domain1.com@imap.localdomain.com/ set record = imaps://p...@domain1.com@imap.localdomain.com/Sent set postponed = imaps://p...@domain1.com@imap.localdomain.com/Drafts set signature = ~/.mutt/sig.domain1' mailboxes = imaps://p...@domain1.com@imap.localdomain.com/ mailboxes = imaps://p...@domain1.com@imap.localdomain.com/news mailboxes = imaps://p...@domain1.com@imap.localdomain.com/jobs mailboxes = imaps://p...@domain1.com@imap.localdomain.com/cron mailboxes = imaps://p...@domain1.com@imap.localdomain.com/rkhunter All was working fine until I added the set status_format line. To be fair it still is, it just hasn't changed anything (except for the new set status_format line in the main muttrc which always gets used). -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
status_format per account-hook or folder-hook
Is there a way to change the status_format when you change folders / accounts? I currently have lines similar to: set status_format = "-%r-Mutt: aptanet.com %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---" in my main muttrc, and then my folder-hook and/or account-hook sections, but it never changes on the display. All the other changes I've got in there seem to work fine. All I'm trying to do is put something in there to let me know which account I'm in, so if there's an easier way to do this I'm open to that too. -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Offline hcache access
Is there a way to start Mutt and use the local hcache contents for viewing mail that has been cached locally? So far my attempts to search for this have only yielded details on setting up offlineimap which isn't quite what I'm looking to do. Clearly this would solve the problem, but I'd rather not have everything from all my accounts sync'd to my various desktops just for the few times I want to look at a recent mail without internet access. -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 = Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP
Re: Multiple Accounts / Same IMAP Server
** Rado Q list2r...@gmx.de [2012-06-05 19:04]: =- Malte Detlefsen wrote on Tue 5.Jun'12 at 12:48:31 +0200 -= Still got a problem with my multiple account setup, although I narrowed it down to the following: Someone in the irc channel then suggested that I, while working with hooks, should better use something like user[at]server instead of server. That was I. Since the DebugConfig points out the possibility of misunderstanding hooks, I could understand a hooks related problem in my case. But to be honest: I don't know, what I exactly have to change, since all my tries ended in errors. I hope some of you might know, what to do! account-hook imaps://imap.gmx.com 'set imap_user = whl...@gmx.de imap_pass = ' #account-hook imaps://imap.gmx.com 'set imap_user = d...@gmx.de imap_pass = ' Match on user@server for user-specific settings (like imap_pass, but not imap_user, since it's already part of the match), match server-only for user-unspecific settings (like IMAP-Server-params), Then change-folder to user@server, maybe use folder-hooks, but then always match for user@server, otherwise how should mutt know which user you want to talk to? For your case of multi-user on same-host setup the word account-hook is misleading, or rather you must keep in mind the match on server alone is not enough, but must always match user@server. ** end quote [Rado Q] Good point, I avoided copying and pasting my config and missed that in the example I put in, which should have been: account-hook imaps://whl...@gmx.de@imap.gmx.com 'set imap_user = whl...@gmx.de imap_pass = ' source ~/.mutt/account.whllnd account-hook imaps://d...@gmx.de@imap.gmx.com 'set imap_user = d...@gmx.de imap_pass = ' source ~/.mutt/account.drsp The double @ doesn't cause a problem as I use that myself. When you want to change to the INBOX of an account use 'c' to change folder and then put the full imap string in as the folder, eg: imaps://whl...@gmx.de@imap.gmx.com with sub folders just carry on down the path from there. You will find that '=' takes you to the inbox of the primary account, which is the last one listed in the config. I've not gone further into the config to see if I can make it easier than this. Things like setting = to be the current account automatically may be nice, and an easier incantation for changing between accounts than the full imaps string would be good - particularly as I have 10 accounts on my server to switch between!! -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple Accounts / Same IMAP Server
** Rado Q list2r...@gmx.de [2012-06-06 15:26]: =- Paul Tansom wrote on Wed 6.Jun'12 at 12:50:24 +0100 -= I've not gone further into the config to see if I can make it easier than this. Things like setting = to be the current account automatically may be nice, and an easier incantation for changing between accounts than the full imaps string would be good - particularly as I have 10 accounts on my server to switch between!! a) too many accounts, b) folder-hooks to (re-)set '=' c) MACROS Again ask yourself: how should mutt know what you want when you don't tell it? It can't read your mind... ;) ** end quote [Rado Q] Yes, definately too many accounts. I try to keep my domains separated though. Some are largely dormant email wise (i.e. 4 are aptanet.* domains - although I do use .net for my server admin logs, etc.), and one is purely a sub domain to archive mail to. Things got messy when I tried to manage all the domains together with filters. I have no doubt I can craft a Mutt config file to do what I want, I've just not managed to get the right incantation yet. I've not mastered macros yet. I must take another look at it, and track down a decent how-to document or suitable other documentation! -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple Accounts / Same IMAP Server
** Malte Detlefsen malte.detlef...@gmx.de [2012-06-01 21:35]: Hello! Still got a problem with my multiple account setup, although I narrowed it down to the following: When loading mutt, mutt shows the INBOX of the account, which in the .muttrc is the last one. So I figured it's got to do something with mutt not being able to distinguish the accounts, which share the same IMAP server. Someone in the irc channel then suggested that I, while working with hooks, should better use something like user[at]server instead of server. I tried that one, but couldn't get it to work either. Since the DebugConfig points out the possibility of misunderstanding hooks, I could understand a hooks related problem in my case. But to be honest: I don't know, what I exactly have to change, since all my tries ended in errors. I hope some of you might know, what to do! Here's my .muttrc the way I thought it should work: folder-hook imaps://imap.gmx.com 'source ~/.mutt/account.whllnd' #folder-hook imaps://imap.gmx.com 'source ~/.mutt/account.drsp' source ~/.mutt/account.whllnd macro index f2 'sync-mailboxenter-commandsource ~/.mutt/account.whllndenterchange-folder!enter' macro index f3 'sync-mailboxenter-commandsource ~/.mutt/account.drspenterchange-folder!enter' account-hook imaps://imap.gmx.com 'set imap_user = whl...@gmx.de imap_pass = ' #account-hook imaps://imap.gmx.com 'set imap_user = d...@gmx.de imap_pass = ' set timeout = 30 set editor = vim set check_new = yes set charset = utf-8 set locale = `echo ${LC_ALL: -${LC_TIME: -${LANG}}}` set send_charset = us-ascii: iso-8859-15: utf-8 set file_charset = us-ascii: iso-8859-15: utf-8 set sendmail = /usr/bin/msmtp ** end quote [Malte Detlefsen] I do this with quite a few accounts on the same server. I have my set commands at the top of the .muttrc file, not sure whether this would impact anything. The main difference I have is separate files for each account-hook, in which I have my folder-hook and mailbox, etc.. I also keep everything in a directory called .muttrc (so no need for the . on indifidual files and it keeps things together). So how about: muttrc: set timeout = 30 set editor = vim set check_new = yes set charset = utf-8 set locale = `echo ${LC_ALL: -${LC_TIME: -${LANG}}}` set send_charset = us-ascii: iso-8859-15: utf-8 set file_charset = us-ascii: iso-8859-15: utf-8 set sendmail = /usr/bin/msmtp macro index f2 'sync-mailboxenter-commandsource ~/.mutt/account.whllndenterchange-folder!enter' macro index f3 'sync-mailboxenter-commandsource ~/.mutt/account.drspenterchange-folder!enter' account-hook imaps://imap.gmx.com 'set imap_user = whl...@gmx.de imap_pass = ' source ~/.mutt/account.whllnd account-hook imaps://imap.gmx.com 'set imap_user = d...@gmx.de imap_pass = ' source ~/.mutt/account.drsp then move the rest into the source files with: account.whllnd folder-hook imaps://imap.gmx.com account.drsp folder-hook imaps://imap.gmx.com I also have a batch of set statements to sort out outbound email addresses, etc. when I change folders. As an aside, you don't need to use msmtp as Mutt now supports direct SMTP traffic using: set smtp_url=smtp://smtp.home.aptanet.com:25/ set smtp_pass= replacing with your SMTP server, and password, of course :) -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: mutt, html and chrome
** Luis Mochan moc...@fis.unam.mx [2012-05-15 21:24]: Very recently I started having a curious situation when I open the html version of messages with mutt. My default browser is 'chrome'. Typically, in mutt I press 'v', I find the html message from the list, I press return and the message is displayed in a new window in my running 'chrome'. Nevertheless, I sometimes get the error message 'No webpage found for the web address: file:///tmp/mutt.html'. If I insist enough times, the message eventually is successfully displayed in my browser. My guess is that there is some kind of race condition which becomes apparent only when my computer is busy, as if the browser tries to read the temporal file before mutt finishes writing and closing it. My system is debian/stable and I am using the mutt package from the distribution. Any idea/suggestion will be appreciated. ** end quote [Luis Mochan] A bit late to the party here, but I get the same with Chromium on Ubuntu. I never have the same problem with Firefox though, and since I always get fed up with Chromium quite quickly and go back to Firefox it doesn't worry me. It will be interesting to have a play with the suggestions though. I've sort of assumed it is down to the way Chrome handles it tabs and sub-processes compared to Firefox - either passing off to another sub-process causing Mutt to delete the file, or the first process trying to access the file too quickly. I've always found the interface annoying on Chrome and, unlike many people I know, found it slow and a bit of a memory hog compared to Firefox! I'm running more modern hardware now, so perhaps time to see if that has switched the tables! -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Open html messages with Firefox
** Gabriel Chavez gaboma...@gmail.com [2011-02-02 17:31]: On Wed, Feb 02, 2011 at 04:46:40PM +, Paul Tansom wrote: ** Gabriel Chavez gaboma...@gmail.com [2011-02-02 16:21]: I've been looking around for a way to open my html emails with Firefox but I still don't know how to do it. Is there a way to do it? ** end quote [Gabriel Chavez] I was sure I had a configuration in my .muttrc directory (I've split into multiple files in a directory), but I must be mis-remembering! It works out of the box on my Ubuntu install, and the magic looks to be in the mailcap configuration file in /etc, although you can also do it with a local .mailcap in your home directory. The relevant line in my config is: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html although you could specify Firefox directly if you like, rather than using the system default. My default is Firefox, except when Chrome updates and I have to put some of the settings back (regular enough that I have a script for it!). I tried but it doesn't not work. I read the mutt documentation and tried also: text/html; firefox -remote 'openURL(%s)' ; test=RunningX But it does not work. I get the following error message: mailcap entry for type text/html not found I don't get if I use command-line program like lynx. Maybe it's a problem with the display variable? I'll keep looking. ** end quote [Gabriel Chavez] Try: text/html; /usr/bin/firefox -remote 'openURL(%s)' ; test=test -n $DISPLAY I've not tested without the full path to firefox (and check yours is the same). using: test=RunningX failed for me because I didn't have that utility, which seems to be a separate downloadable C program. -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Open html messages with Firefox
** Gabriel Chavez gaboma...@gmail.com [2011-02-02 16:21]: I've been looking around for a way to open my html emails with Firefox but I still don't know how to do it. Is there a way to do it? ** end quote [Gabriel Chavez] I was sure I had a configuration in my .muttrc directory (I've split into multiple files in a directory), but I must be mis-remembering! It works out of the box on my Ubuntu install, and the magic looks to be in the mailcap configuration file in /etc, although you can also do it with a local .mailcap in your home directory. The relevant line in my config is: text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html although you could specify Firefox directly if you like, rather than using the system default. My default is Firefox, except when Chrome updates and I have to put some of the settings back (regular enough that I have a script for it!). -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple accounts at same privider
** J. Prendick saftsec...@googlemail.com [2010-06-30 07:55]: I'm wondering if it is possible, to manage multiple accounts at the same e-mail provider. First let's say I have one account at a.com, another at b.com. Then in my .muttrc I have account-hook 'imaps://a.com' 'set imap_user=... etc.' folder-hook 'imaps://a.com' 'set folder=... etc.' I'm doing this, although with my own server not a separate ISP. What I've done is put the account information into the account-hook and folder-hook info: account-hook imaps://p...@domain2.com@imap.domain.com 'set imap_user = p...@domain1.com... ' folder-hook imaps://p...@domain2.com@imap.domain.com 'set ... ' account-hook imaps://p...@domain2.com@imap.domain.com 'set imap_user = p...@domain2.com... ' folder-hook imaps://p...@domain1.com@imap.domain.com 'set ... ' I use full email addressing as my login details. The only problem is the lengthy references when moving between folders or filing mail, but the tab completion helps. At the moment I have to type 'imaps:tab' before each (the tab only saves typing the '//') then the login name, etc. with tabs to save typing. and the analogue for b.com. Via macro index f1 change-folderimaps://imap.a.com macro index f2 change-folderimaps://imap.b.com I can switch between them. I've not managed to get my head around macros yet, but it is on my list of things to do - one day, I've only been using Mutt about 10 years!! If now a equals b we do have a problem. I could for example change the macro-lines to macro index f1 change-folderimaps://user1:passwo...@a.com macro index f2 change-folderimaps://user2:passwo...@a.com which enables me to switch between the accounts, but e.g. from=, pgp_sign_as=, ... are not beeing set correctly. Does anyone have any idea how to solve that problem? ** end quote [J. Prendick] -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Sponsor me in the Moonlit Memories Walk for Rowans Hospice A 12 mile walk along Southsea seafront starting midnight 19th June Visit: http://www.justgiving.com/MoonlitTansom2010 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
** Peng shallp...@gmail.com [2010-03-20 22:31]: On 21:18 Sat 20 Mar , Paul Tansom wrote: ** Brendan Cully bren...@kublai.com [2010-03-20 20:53]: Brilliant, thanks, that's exactly what I was looking for. It's my own fault for having so many mail accounts that it now takes a while to connect to them all!! Actually you may find this frustrating sometimes if your internet connection is not very good ** end quote [Peng] That's not too much of a problem here, since the connection is to a Dovecot IMAP server on my local LAN mostly, and I SSH in to check mail remotely. That said I am connecting to 10 accounts for various reasons at the moment! -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Multiple IMAP accounts
I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. Another thing I'll be looking at is a means to save me typing in the full details of each mail account in order to switch between them. I'm particularly keen on this since they are all on the same server and each account name is the email address and things get quite long winded even with tab completion! I'm thinking that something along the lines of a macro or a bind line in my muttrc file should do the trick here, but since I'm typing if anyone has a pointer it may save me some time :) -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
** Brendan Cully bren...@kublai.com [2010-03-20 20:53]: On Saturday, 20 March 2010 at 18:01, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. unset $imap_passive to automatically connect to any mailbox you've added to the mailboxes list with the 'mailboxes' command. Brilliant, thanks, that's exactly what I was looking for. It's my own fault for having so many mail accounts that it now takes a while to connect to them all!! There's so many things you can do with Mutt that in spite of having started using it some time in 2000, there's still plenty to discover :) Another thing I'll be looking at is a means to save me typing in the full details of each mail account in order to switch between them. I'm particularly keen on this since they are all on the same server and each account name is the email address and things get quite long winded even with tab completion! I'm thinking that something along the lines of a macro or a bind line in my muttrc file should do the trick here, but since I'm typing if anyone has a pointer it may save me some time :) yes, binding a macro should help here. e.g., macro index I 'change-folderimap://f...@bar/INBOX' I shall have to have a play and see what I can come up with to save some typing. ** end quote [Brendan Cully] -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU
Re: Multiple IMAP accounts
** Jan Kadijk flappie1...@gmail.com [2010-03-20 19:33]: On Sat, Mar 20, 2010 at 06:01:19PM +, Paul Tansom wrote: I've been using Mutt for a good few years now, but only started using it over IMAP a year or so ago and now I've started using multiple IMAP accounts with it. Setting this up was straight forward enough, and I can cycle through mailboxes with new mail in quite happily, but only if I have already checked mail once. What I'm trying to do, and haven't yet worked out how, is connect to all the IMAP mail accounts when I first start Mutt, so Mutt knows which ones have new mail in without having to manually change into each one first. Can anyone point me to some good references for this, I've not managed to spot what I'm looking for with Google or on the Mutt Wiki so far. snip The best solution I know of, is to use OfflineIMAP. It can sync multiple IMAP accounts to Maildirs. It works great for me. Google for a tutorial :) ** end quote [Jan Kadijk] I've looked at that for backup, but given the number of different machines I connect from it could cause a few problems for my setup, particularly with disk space since between the accounts I have in excess of 6G of mail folders (mostly archives) that I connect to. -- Paul Tansom | Aptanet Ltd. | http://www.aptanet.com/ | 023 9238 0001 == Registered in England | Company No: 4905028 | Registered Office: Crawford House, Hambledon Road, Denmead, Waterlooville, Hants, PO7 6NU