Multiple accounts (using Gmail)
With two accounts I'm using an account-hook.
account-hook . \
'unset imap_user
unset imap_pass'
account-hook imaps://imap.example.com/ \
'set imap=user=bill
set imap_pass=password'
account-hook imaps://imap.gmail.com/ \
'set imap_user=user
set imap_pass=password'
This works ok for connecting and reading mail.
When I send mail from my normal account I want to send using my local
MTA (Postfix), and when sending from my Gmail email address I want to
use the Gmail SMTP server.
folder-hook . \
unset smtp_url
folder-hook imaps://imap.gmail.com/ \
set smtp_url=smtps://user@xxxxxxxxx:password@xxxxxxxxxxxxxx/
Is that the correct approach? Actually, seems I'd want to also base
that on which From: email address I use. send-hook looks at the
recipients according to the manual. What do I use for matching on the
From: header?
Now, I'm also having a problem with mailbox setup where the message
counts are not shown. I'm new to Gmail IMAP support so not 100% sure
this is correct:
mailboxes \
imaps://imap.gmail.com/INBOX \
"imaps://imap.gmail.com/[Gmail]/All Mail" \
imaps://imap.gmail.com/[Gmail]/Drafts \
"imaps://imap.gmail.com/[Gmail]/Sent Mail" \
imaps://imap.gmail.com/[Gmail]/Spam \
imaps://imap.gmail.com/[Gmail]/Stared \
imaps://imap.gmail.com/[Gmail]/Trashed
But, the mailbox view show these all with zero counts:
01 0 imaps://imap.gmail.com/[Gmail]/All Mail
02 0 imaps://imap.gmail.com/[Gmail]/Drafts
03 0 imaps://imap.gmail.com/[Gmail]/Sent Mail
04 0 imaps://imap.gmail.com/[Gmail]/Spam
05 0 imaps://imap.gmail.com/[Gmail]/Stared
06 0 imaps://imap.gmail.com/[Gmail]/Trashed
07 0 imaps://imap.gmail.com/INBOX
If I visit a mailbox (e.g. Spam), then the counts will later show up:
01 0 imaps://imap.gmail.com/[Gmail]/All Mail
02 0 imaps://imap.gmail.com/[Gmail]/Drafts
03 0 imaps://imap.gmail.com/[Gmail]/Sent Mail
04 598 imaps://imap.gmail.com/[Gmail]/Spam
05 0 imaps://imap.gmail.com/[Gmail]/Stared
06 0 imaps://imap.gmail.com/[Gmail]/Trashed
07 0 imaps://imap.gmail.com/INBOX
Is that expected?
Thanks,
--
Bill Moseley
moseley@xxxxxxxx
Sent from my iMutt