On Thu, Feb 12, 2009 at 07:04:06PM +0800, bill lam wrote:
(I apologise that I once saw a thread on this subject but could not locate it,) I got several gmail accounts that have to be set up inside muttrc like: folder-hook "imaps://cfoobar@xxxxxxxxxxxxxx" '\ set from="cfoobar@xxxxxxxxx" ; \ set folder="imaps://cfoobar@xxxxxxxxxxxxxx" ; \ set spoolfile="+INBOX" ; \ set timeout=300 ; \ set mail_check=300 '
Drop the attached file in your $PATH as muttGmail or whatever, then change the big blocks like above to:
`muttGmail cfoobar` `muttGmail ifoobar`Mutt will run muttGmail with the given argument. muttGmail will take the argument and spit out the complete folder-hook. Mutt will then interpret the output as configuration commands, and you're all set up.
Ed
#/bin/sh email="$1" cat <<EOF folder-hook "imaps://${email}@imap.gmail.com" '\ set from="${email}@gmail.com" ; \ set folder="imaps://${email}@imap.gmail.com" ; \ set spoolfile="+INBOX" ; \ set timeout=300 ; \ set mail_check=300 ' EOF
Attachment:
signature.txt
Description: Digital signature