set From: based on To:
Hi mutt-users, I have several addresses and when someone I don't know sends me an email, this one goes in my inbox (procmail default). Now if I hit 'r', the From header will be automaticaly set to my default email, which is sometimes not the preferred behaviour, I would like to use the email address the sender used. For example: I receive an email with: From: a...@example.com To: m...@foo.bar (I don't have any special settings for a...@example.com) I hit 'r' and I get: From: defa...@email.bar To: a...@example.com but I would like to have: From: m...@foo.bar To: a...@example.com How can I do this? Should I use a reply-hook? reverse_name? I'm a bit confused here. Many thanks in advance for your help. steve
How to obtain the fullname of current mailbox or use nickname?
Hi, I read from the reference that in the status bar, the variable %f indicating the full path of the current mailbox. But this is not always the way it should be, if I set default mailbox as ~/.mutt/inbox then if I enter mutt from the terminal, the %f is always =inbox. For local mailboxes it is not a big problem I can use different mailbox names. But this issue becomes quite annoying when I was trying to set up several imap accounts. T he mailboxes of these imap are something like imaps://url.com/inbox imaps://url1.com/inbox imaps://url2.com/inbox If I enter mutt for the first time, surprisingly %f now is imaps://url.com/inbox. But if I try to enter the second imap mailbox by c-->? then %f now is again =INBOX. Is it because I set anything wrong? Thanks Peng
Re: set From: based on To:
* steve [03-17-10 04:53]: > I receive an email with: > > From: a...@example.com > To: m...@foo.bar > > (I don't have any special settings for a...@example.com) > > I hit 'r' and I get: > > From: defa...@email.bar > To: a...@example.com > > > but I would like to have: > > From: m...@foo.bar > To: a...@example.com > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > confused here. I would choose, send-hook, but from TFM: 19. Change Settings Based Upon Message Recipients Usage: reply-hook [!]pattern command send-hook [!]pattern command send2-hook [!]pattern command These commands can be used to execute arbitrary configuration commands based upon recipients of the message. pattern is used to match the message, see Message Matching in Hooks for details. command is executed when pattern matches. reply-hook is matched against the message you are replying_to, instead of the message you are sending. send-hook is matched against all messages, both new and replies. Note reply-hooks are matched before the send-hook, regardless of the order specified in the user's configuration file. send2-hook is matched every time a message is changed, either by editing it, or by using the compose menu to change its recipients or subject. send2-hook is executed after send-hook, and can, e.g., be used to set parameters such as the $sendmail variable depending on the message's sender address. For each type of send-hook or reply-hook, when multiple matches occur, commands are executed in the order they are specified in the .muttrc (for that type of hook). Example: send-hook mutt "set mime_forward signature=''" Another typical use for this command is to change the values of the $attribution, $signature and $locale variables in order to change the language of the attributions and signatures based upon th
Re: Mark messages as replied
On Tue, Mar 16, 2010 at 05:53:10PM -0700, Gary Johnson wrote: > On 2010-03-17, Udo Hortian wrote: > > Dear mutt users, > > > > I am using mutt since years and love it. Still, sometimes it happens to > > me, that I am beginning to reply to a message, I save it as a draft, > > continue to edit it and send it at some moment. Then sometimes it > > happens that the message I am replying to is not marked as read. I am > > not sure about the exact circumstances when this happens. Still I would > > like to make mutt to mark these messages as ready automatically or to > > mark them as ready manually. Is there a way to mark messages as read > > manually? > > Yes. When in the Index Menu (the view that shows the messages in > the current mailbox) or in the Pager, type 'w' to set a status flag > or 'W' to clear a status flag. Each command shows the list of > available flags. You can find the meaning of the flags in the mutt > manual. In your case, you probably want to clear the 'N' (New) > flag. > > Alternatively, you can toggle the state of the New flag when you're > in the Index Menu by typing 'N'. > > You can get a list of these and other commands by typing '?' in any > menu. > > You can find out more about message status flags in the mutt manual > in the section "The Message Index" and in the table of "Message > status flags". Thank you for this tip! Using w with r afterwards works fine to set the replied flag of a message. But does anybody have an idea why mutt sometimes forgets to toggle the r-flag (i.e. replied) when I reply to a message storing this message first in drafts, then further edit it and finally send it? One situation in which this happens is if, when I resume to edit the message (the reply), I am in another folder then the message I am replying to. Maybe mutt is not able to notice that this is reply to a message lying in another folder?!
Re: set From: based on To:
On Wed, Mar 17, 2010 at 4:52 AM, steve wrote: > Hi mutt-users, > > I have several addresses and when someone I don't know sends me an email, > this one goes in my inbox (procmail default). Now if I hit 'r', the From > header will be automaticaly set to my default email, which is sometimes > not the preferred behaviour, I would like to use the email address the > sender used. For example: > > I receive an email with: > > From: a...@example.com > To: m...@foo.bar > > (I don't have any special settings for a...@example.com) > > I hit 'r' and I get: > > From: defa...@email.bar > To: a...@example.com > > > but I would like to have: > > From: m...@foo.bar > To: a...@example.com > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > confused here. > > Many thanks in advance for your help. > > steve > Hi, I am not sure if I am correct but if you just simply want From: m...@foo.bar To: a...@example.com Then simple set envelope_from ="yes" set reverse_name=yes alternates "m...@foo.bar|defa...@email.bar" should be enough. But usually this is not the good way because you surely don't want your realname, signature to be identical to default in general. So I would suggest you to use reply-hook. Notice don't forget to set default reply-hook at first. One thing more about the alternates: you should set your mta to be aware of m...@foo.bar. I have only had experience on msmtp and if m...@foobar is not an independent accout in msmtprc then msmtp will use the default account in msmtp to send the mail out. Peng
Re: set From: based on To:
Hi Patrick, Thanks replying to me. Le 17-03-2010, à 08:29:40 -0400, Patrick Shanahan (ptilopt...@gmail.com) a écrit : > * steve [03-17-10 04:53]: > > I receive an email with: > > > > From: a...@example.com > > To: m...@foo.bar > > > > (I don't have any special settings for a...@example.com) > > > > I hit 'r' and I get: > > > > From: defa...@email.bar > > To: a...@example.com > > > > > > but I would like to have: > > > > From: m...@foo.bar > > To: a...@example.com > > > > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > > confused here. > > I would choose, send-hook, but from TFM: Why use send-hook when it's only for replying to messages? When I'm in my default inbox and I hit 'm', I get the correct address. > > 19. Change Settings Based Upon Message Recipients > >Usage: > >reply-hook [!]pattern command > >send-hook [!]pattern command > >send2-hook [!]pattern command > > > >These commands can be used to execute arbitrary configuration commands > >based upon recipients of the message. pattern is used to match the > >message, see Message Matching in Hooks for details. command is executed > >when pattern matches. > > > >reply-hook is matched against the message you are replying_to, instead > >of the message you are sending. send-hook is matched against all > >messages, both new and replies. > I have already read that, I suppose I didn't express myself very well, please forgive me. My first idea was something like : reply-hook '~t ^...@foo.bar$' 'set from="m...@foo.bar"' but this doesn't work, I still get my default address in the From: header. And if it worked, I then should have to add as many lines as email addresses I have, only changing me1 with me2 and so forth, and this seems strange to me. Then I tried: reply-hook '~t ^...@foo.bar$' 'my_hdr From: m...@foo.bar' same thing. I'm missing something but I don't know what. Help would be highly appreciated. Thanks, s.
Re: VIM Color Syntax
On Tue, Mar 16, 2010 at 11:02:25AM -0400, Chuck Smith wrote: > I know this is a little off topic for this list, but my latest > update from Ubuntu resulted in color syntax in vim for reply > messages in Mutt to disappear. Now everything is the default > console green. Any ideas? Hi, Check that the filetype is correctly set when you edit a mail in Vim (:set ft?); it should give you mail. If it doesn't make sure that you have the following in your ~/.vimrc: filetype plugin on or filetype plugin indent on Hope this helps, Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9 pgpZoFaTCBFUN.pgp Description: PGP signature
Re: set From: based on To:
Le 17-03-2010, à 09:04:38 -0400, peng shao (shallp...@gmail.com) a écrit : > On Wed, Mar 17, 2010 at 4:52 AM, steve wrote: > > Hi mutt-users, > > > > I have several addresses and when someone I don't know sends me an email, > > this one goes in my inbox (procmail default). Now if I hit 'r', the From > > header will be automaticaly set to my default email, which is sometimes > > not the preferred behaviour, I would like to use the email address the > > sender used. For example: > > > > I receive an email with: > > > > From: a...@example.com > > To: m...@foo.bar > > > > (I don't have any special settings for a...@example.com) > > > > I hit 'r' and I get: > > > > From: defa...@email.bar > > To: a...@example.com > > > > > > but I would like to have: > > > > From: m...@foo.bar > > To: a...@example.com > > > > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > > confused here. > > > > Many thanks in advance for your help. > > > > steve > > > > Hi, Hi Peng, > I am not sure if I am correct but if you just simply want > From: m...@foo.bar > To: a...@example.com > > Then simple > > set envelope_from ="yes" > set reverse_name=yes > alternates "m...@foo.bar|defa...@email.bar" > > should be enough. well it's not here :-( > But usually this is not the good way because you > surely don't want your realname, signature to be identical to default > in general. So I would suggest you to use reply-hook. Notice don't > forget to set default reply-hook at first. I put reply-hook . 'unmy_hdr From:' reply-hook '~t m...@foo.bar' 'my_hdr From: m...@foo.bar' and it still doesn't work as expected... > One thing more about the alternates: you should set your mta to be > aware of m...@foo.bar. I have only had experience on msmtp and if > m...@foobar is not an independent accout in msmtprc then msmtp will use > the default account in msmtp to send the mail out. I use esmtp and I don't have any information regarding my addresses. Maybe that's the problem (but I doubt). In any case, thank you for your help Peng. Steve
Re: Mark messages as replied
On Wed, Mar 17, 2010 at 01:44:49PM +0100, Udo Hortian wrote: > [snip] > > But does anybody have an idea why mutt sometimes forgets to toggle the > r-flag (i.e. replied) when I reply to a message storing this message > first in drafts, then further edit it and finally send it? One situation > in which this happens is if, when I resume to edit the message (the > reply), I am in another folder then the message I am replying to. Maybe Hi, Yes, that's the problem. Mutt only sets the replied flag for a postponed message when you're in the same mailbox. > mutt is not able to notice that this is reply to a message lying in > another folder?! Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9 pgpTa5bfQHpWQ.pgp Description: PGP signature
Re: set From: based on To:
* steve [03-17-10 09:14]: > > > I receive an email with: > > > > > > From: a...@example.com > > > To: m...@foo.bar > > > > > > (I don't have any special settings for a...@example.com) > > > > > > I hit 'r' and I get: > > > > > > From: defa...@email.bar > > > To: a...@example.com > > > > > > > > > but I would like to have: > > > > > > From: m...@foo.bar > > > To: a...@example.com > > > > > > > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > > > confused here. > > > > I would choose, send-hook, but from TFM: > > Why use send-hook when it's only for replying to messages? When I'm in > my default inbox and I hit 'm', I get the correct address. What if you send a *new* message to a...@example.com? What do you mean "in my default inbox"? > My first idea was something like : > > reply-hook '~t ^...@foo.bar$" 'set from="m...@foo.bar"' if it is *to* you, set from *you* ??? reply-hook '^...@foo\.bar$ set from="m...@foo.bar"' > but this doesn't work, I still get my default address in the From: > header. And if it worked, I then should have to add as many lines as > email addresses I have, only changing me1 with me2 and so forth, and > this seems strange to me. > > > > Then I tried: > > reply-hook '~t^...@foo.bar$' 'my_hdr From: m...@foo.bar' reply-hook '~t m...@foo\.barr my_hdr From: "m...@foo.bar"' > same thing. I'm missing something but I don't know what. As I said earlier, I would use send-hook: send-hook . unmy_hdr From: send-hook me 'my_hdr From: ' send-hook m...@foo.bar set from="m...@foo.bar" send-hook m...@foo.bar 'my_hdr From: "m...@foo.bar"' -- Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535@ http://counter.li.org
Re: set From: based on To:
=- steve wrote on Wed 17.Mar'10 at 14:31:58 +0100 -= > Le 17-03-2010, à 09:04:38 -0400, peng shao (shallp...@gmail.com) a écrit : > > > I am not sure if I am correct but if you just simply want > > From: m...@foo.bar > > To: a...@example.com > > > > Then simple > > > > set envelope_from ="yes" > > set reverse_name=yes > > alternates "m...@foo.bar|defa...@email.bar" > > > > should be enough. > > well it's not here :-( Then "here" is messed up somehow. Try in a "clean" environment, see DebugConfig on the wiki for help. -- © Rado S. -- You must provide YOUR effort for your goal! EVERY effort counts: at least to show your attitude. You're responsible for ALL you do: you get what you give.
Re: set From: based on To:
Le 17-03-2010, à 09:51:24 -0400, Patrick Shanahan (ptilopt...@gmail.com) a écrit : > * steve [03-17-10 09:14]: > > > > I receive an email with: > > > > > > > > From: a...@example.com > > > > To: m...@foo.bar > > > > > > > > (I don't have any special settings for a...@example.com) > > > > > > > > I hit 'r' and I get: > > > > > > > > From: defa...@email.bar > > > > To: a...@example.com > > > > > > > > > > > > but I would like to have: > > > > > > > > From: m...@foo.bar > > > > To: a...@example.com > > > > > > > > > > > > How can I do this? Should I use a reply-hook? reverse_name? I'm a bit > > > > confused here. > > > > > > I would choose, send-hook, but from TFM: > > > > Why use send-hook when it's only for replying to messages? When I'm in > > my default inbox and I hit 'm', I get the correct address. > > What if you send a *new* message to a...@example.com? If I'm in inbox, the From: header is correct. > What do you mean "in my default inbox"? It's the folder where all non-sorted (by procmail) goes. If you send me a private email it will go there. > > > My first idea was something like : > > > > reply-hook '~t ^...@foo.bar$" 'set from="m...@foo.bar"' > > if it is *to* you, set from *you* ??? Perhaps I'm not reading that reply-hook correctly. I read: (sorry for the english, it's not my mother tongue, as you probably noticed it) For each mail addressed to m...@foo.bar, set the From header to m...@foo.bar when replying to it. > reply-hook '^...@foo\.bar$ set from="m...@foo.bar"' Mutt tells me that there is a syntax error; it doesn't complain anymore with the following line: reply-hook '^...@foo\.bar$' 'set from="m...@foo.bar"' But anyway, it doesn't do what is expected. > > but this doesn't work, I still get my default address in the From: > > header. And if it worked, I then should have to add as many lines as > > email addresses I have, only changing me1 with me2 and so forth, and > > this seems strange to me. > > > > > > > > Then I tried: > > > > reply-hook '~t^...@foo.bar$' 'my_hdr From: m...@foo.bar' > > reply-hook '~t m...@foo\.barr my_hdr From: "m...@foo.bar"' Sorry for the misspelling, but doesn't work either. > > same thing. I'm missing something but I don't know what. > > As I said earlier, I would use send-hook: > > send-hook . unmy_hdr From: > send-hook me 'my_hdr From: ' > send-hook m...@foo.bar set from="m...@foo.bar" > send-hook m...@foo.bar 'my_hdr From: "m...@foo.bar"' Ok I tried that (I don't really understand why the two last lines are needed *together*, but that's beside the point now) and still the same. Thank you for your help, but as Rado said in another message, I guess I've got a messed up configuration and I should figure out why (I'm sure it's not mutt's fault). I'm trying to fine-tune my configuration with several files in which I source other file(s) and surely I've missed lots of mutt's "finesse" (in french)... this one issue is already a long-lasting one, and I'm lacking energy and time to start the whole thing from the beginning (but I should, I know). Once more, thanks alot for your help! I love mutt, it's great, I'd love to master it totally (yes I also have strange dreams...:-)), but unfortunately I'm far from it :-( s.
Re: mutt and gpg not in tune
dear mutt-users, Probably my question was too imprecise. Jan-Herbert Damm wrote on 16.03.10: > hello all, > > gpg and mutt used to work fine. now mutt won't find any public keys anymore. I > have run the following tests: [...] now i have spent some additional hours on this problem which might turn out to be some idiot fault of the person behind the keyboard. I think i have narrowed it down a bit. For some reason mutt doesn't seem to call gpg at all - and it might have to do with this error message (which i get if i just want to sign but not encrypt a mail) /home/jan/.smime/keys/.index: No such file or directory (errno = 2) I don't remember ever having a directory .smime/. any hints are much needed... jan > > > beginn gpg-test--- > j...@herb:~$ cat test.txt > this is the content of test.txt > > j...@herb:~$ gpg -se -r Markus test.txt > > [prompted to enter my passphase] > > pub 2048g/0F663F56 2009-07-17 Markus Dxxx > > [...] > > j...@herb:~$ gpg -d test.txt.gpg > > [prompted to enter my passphase] > > gpg: verschlüsselt mit 2048-Bit ELG-E Schlüssel, ID 0F663F56, erzeugt > 2009-07-17 > "Markus Dxxx " > gpg: verschlüsselt mit 2048-Bit ELG-E Schlüssel, ID A9EEDA47, erzeugt > 2008-11-30 > "Jan-Herbert Damm (email-verschlüsselung) " > > this is the content of test.txt > > [...] > end gpg-tests > > Thus i reckon that gpg is working, though i am confused why i can decrypt the > testfile when i encrypted it with somebody elses pub-key. > > In my muttrc I have: > > ---beginn muttrc--- > set pgp_timeout=1800 > set pgp_replyencrypt=yes > set pgp_sign_as=FA5B6661 > set crypt_replyencrypt=yes > set crypt_replysignencrypted > source /etc/Muttrc.d/gpg.rc > end muttrc--- > > gpg.rc is is a standard ubuntu preinstalled file which has worked before. It > contains this line that seems to not be working correctly: > > set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd > 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u > %a? --armor --always-trust -- -r %r -- %f" > > I am at a loss of how to go about analyzing what's going wrong here. If > someone could tell me what else to try i am very grateful. > > jan > --
Need help on setting multiple accounts
Hi. I was trying to set up multiple accounts with pop3+imap combined but with no success, so I have to seek help here. Maybe we can discuss a simple case at first. Asssume I have two IMAP accounts from gmail and yahoo Then I may write the first few lines in my muttrc like: mailboxes imaps://imap.gmail.com/INBOX mailboxes imaps://imap.yahoo.com/INBOX account-hook . 'unset imap_pass imap_user ' account-hook imaps://imap.gmail.com/ 'set imap_user="my_gmail_name" imap_pass="abc" ' account-hook imaps://imap.yahoo.com/ 'set imap_user="my_yahoo_name" imap_pass="abc" ' then I am stuck because I don't know where I should put the spoolfile variable. The reason why I care this variable very much is because I want by pressing c-->tab to be able to view all folders under the spool such as the sent/drafts .. I tried put it in both account-hook or folder-hook and to load mutt by mutt -y but this had no effect. If I simply put set spoolfile=imaps://imap.gmail.com/ set spoolfile=imaps://imap.yahoo.com/ in muttrc, I then use yahoo as the default spool. I can enter the sent folder of yahoo, but if I enter google mailboxes the spool is still yahoo. Basically speaking I have already built a basic two-account muttrc. I just don't how know to set the spoolfile correctly to access sent folder in both these two accounts.(to add these two folders into mailboxese variable is not desired for me ) Thank you Peng
Re: mutt and gpg not in tune
I'm not an expert, but shouldn't mutt call /home/jan/.gnupg? -- "Nothing is ever so bad that it couldn't be worse, and if it could be worse than it is, then maybe its not so bad!"
Re: How to obtain the fullname of current mailbox or use nickname?
On Wed, Mar 17, 2010 at 5:17 AM, peng shao wrote: > Hi, I read from the reference that in the status bar, the variable %f > indicating the full path of the current mailbox. > But this is not always the way it should be, if I set default mailbox > as ~/.mutt/inbox then if I enter mutt from the > terminal, the %f is always =inbox. For local mailboxes it is not a big > problem I can use different mailbox names. > But this issue becomes quite annoying when I was trying to set up > several imap accounts. T > he mailboxes of these imap are something like > imaps://url.com/inbox > imaps://url1.com/inbox > imaps://url2.com/inbox > > If I enter mutt for the first time, surprisingly %f now is > imaps://url.com/inbox. But if I try to enter the second imap mailbox > by c-->? then %f now > is again =INBOX. Is it because I set anything wrong? Thanks > > Peng > This is due to carelessness that I forgot to unset folder before I define status_format. Sorry for spam. Peng
Re: mutt and gpg not in tune
Hello, Dale Raby wrote on 17.03.10: > I'm not an expert, but shouldn't mutt call /home/jan/.gnupg? Indeed! Unfortunately I have no idea how mutt generates the commands for encryption. In muttrc i can't find any hint to s/mime. The variable pgp_sign_command is set to a sensible gpg command. It is obviously not triggered. But Why?? jan (fighting with frustration)
Re: mutt and gpg not in tune
Dear Jan, On Wednesday, 17 March 2010, Jan-Herbert Damm wrote: > > gpg and mutt used to work fine. now mutt won't find any public > > keys anymore. I have run the following tests: > [...] > > now i have spent some additional hours on this problem which might > turn out to be some idiot fault of the person behind the keyboard. > > I think i have narrowed it down a bit. For some reason mutt doesn't seem to > call gpg at all - and it might have to do with this error message (which i get > if i just want to sign but not encrypt a mail) > > /home/jan/.smime/keys/.index: No such file or directory (errno = 2) > > I don't remember ever having a directory .smime/. > > any hints are much needed... Just to be sure. You are opening an e-mail that is signed/encrypted with PGP and not with S/MIME? Is the mime-type for the signature correct or is the PGP signature inline? -- Niels signature.asc Description: Digital signature
Re: mutt and gpg not in tune
On Wed, Mar 17, 2010 at 09:11:53PM +0100, Jan-Herbert Damm wrote: > Hello, > > Dale Raby wrote on 17.03.10: > > I'm not an expert, but shouldn't mutt call /home/jan/.gnupg? > Indeed! Unfortunately I have no idea how mutt generates the commands for > encryption. > > In muttrc i can't find any hint to s/mime. The variable pgp_sign_command is > set to a sensible gpg command. It is obviously not triggered. But Why?? > > > jan (fighting with frustration) I was looking around for a fix for you and found something interesting. Look at the Mutt User Manual in the section on PGP: http://wiki.mutt.org/?MuttGuide/UseGPG Look carefully at the this command: set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f" Notice the --encrypt-to portion. This is the only part that is different than what you are using. I am not sure it this is helpful or not. -- Chuck Smith signature.asc Description: Digital signature
Re: Need help on setting multiple accounts
On Wed, Mar 17, 2010 at 12:01 PM, peng shao wrote: > Hi. I was trying to set up multiple accounts with pop3+imap combined > but with no success, so I have to seek help here. Maybe we can discuss > a simple case at first. Asssume I have two IMAP accounts from gmail > and yahoo > Then I may write the first few lines in my muttrc like: > > mailboxes imaps://imap.gmail.com/INBOX > mailboxes imaps://imap.yahoo.com/INBOX > account-hook . 'unset imap_pass imap_user ' > account-hook imaps://imap.gmail.com/ 'set imap_user="my_gmail_name" > imap_pass="abc" ' > account-hook imaps://imap.yahoo.com/ 'set imap_user="my_yahoo_name" > imap_pass="abc" ' > > then I am stuck because I don't know where I should put the spoolfile > variable. The reason why I care this variable very much is because I > want by pressing c-->tab to be able to view all folders under the > spool such as the sent/drafts .. I tried put it in both account-hook > or folder-hook and to load mutt by mutt -y but this had no effect. If > I simply put > > set spoolfile=imaps://imap.gmail.com/ > set spoolfile=imaps://imap.yahoo.com/ > > in muttrc, I then use yahoo as the default spool. I can enter the sent > folder of yahoo, but if I enter google mailboxes the spool is still > yahoo. > > Basically speaking I have already built a basic two-account muttrc. I > just don't how know to set the spoolfile correctly to access sent > folder in both these two accounts.(to add these two folders into > mailboxese variable is not desired for me ) > > Thank you > > Peng > After many tests, I finally realize this is actually a problem of "current directory" rather than the folder variable, It looks like after I change folder the "current directory" does NOT change. I guess this is the supposed way. So I added the following line folder-hook 'imaps://imap.gmail.com' "push ?imaps://imap.gmail.com" into muttrc. And it works. Correspondingly I have to set the current directory for every mailboxes I defined. Thanks Peng
relation between folder-hook and push
I recently found the following interesting phenomenon: I included the following lines in my muttrc mailboxes ~/.MuttMail/inbox set spoolfile=~/.MuttMail/inbox folder-hook . 'push :default' folder-hook inbox 'push :inbox' This is the only four lines in the muttrc because I want to do a clean test. If the folder-hook is used to set variables then I was told by the manual http://www.mutt.org/doc/manual/manual-4.html that I should place the default hook EARLIER than the specific hook, as I did in the test. However, the result is is I enter mutt then I have :inbox:default at the bottom command area. It contradicts with my understanding to the folder-hook because the order is reversed compared to the manual. Is this a bug, or supposed way? Thanks