Hello. I'v finaly begun my endevour to learn mutt. Learn to email the
right way. I have an IMAP account set up. Mailing list threads. I have
too supply my passwaord only once to read and send. Great! I love it. I
feel liberated at last. But, I want more. I want multiple accounts.

I'm trying to migrate my working single account setup to one with hooks.
I think the problem is my quoting. The configs I've seen online seem to
vary in how values are quoted and I'm confused about when to use single
or double quotes. After reading the manual and other stuff, I was
figuring values that = a variable would be double quoted so they can be
expanded by the shell, otherwise use single quotes for strings with
special characters &:) spaces etc, and not needing further interpretation
by the shell. Does that sound kinda right? I'll under stand bash one
day.


With just one account this works:

~/.muttrc
# global IMAP settings
set imap_check_subscribed
set imap_keepalive=300
set mail_check = 120
set timeout = 300

# use headercache for IMAP (make sure this is a directory for performance!)
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

# IMAP account settings
set my_pass1=`read -s -p 'user1mail.net mail-password : ' mailpass ; echo 
$mailpass`

  set imap_user=us...@domain1.net
  set imap_pass=$my_pass1
  set hostname=host1.net
  set folder=imaps://$imap_user@mail.$hostname/
  set spoolfile=imaps://$imap_user@mail.$hostname/INBOX
  set postponed=imaps://$imap_user@mail.$hostname/Drafts
  set record=imaps://$imap_user@mail.$hostname/Sent
  set smtp_url=smtp://$imap_user:$smtp_pass@mail.$hostname:123
  set realname=User1
  set from='User1 <us...@domain.net>'



When I try to wrap it in hooks, mutt can't seem to find the mail box's or
something.



~/.muttrc
account-hook . "unset imap_user unset imap_pass"

account-hook 'imaps://us...@domain1.net' " \
  set imap_user='us...@domain1.net' ; \
  set imap_pass="$my_pass1" "

 folder-hook 'imaps://us...@domain1.net' " \
  set hostname='host1.net' ; \
  set folder="imaps://$imap_user@mail.$hostname/" ; \
  set spoolfile="imaps://$imap_user@mail.$hostname/INBOX" ; \
  set postponed="imaps://$imap_user@mail.$hostname/Drafts" ; \
  set record="imaps://$imap_user@mail.$hostname/Sent" ; \
  set smtp_pass="$my_pass1" ; \
  set smtp_url="smtp://$imap_user:$smtp_pass@mail.$hostname:123" ; \
  set realname='User1' ; \
  set from='User1 <us...@domain1.net>' "

I'm just working on one account at the moment. I figure if get one right
I can then use it is a template for more accounts. Should that work?
Just one account but using hooks instead of plain commands? Perhaps the
SMTP stuff shoud go in a send-hook? Any insight would be greatly
appreciated.

Thank you very much

Cinder

-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  

Reply via email to