reddit / emacs

Setting up mu/mu4e with multiple email aliases? (Ie, multiple Fastmail addresses in one account)

New-Yogurt-61 · 2022-11-14 21:53
So I’ve finally gotten a gmail setup working (mysync,mu4e), next step mu4e contexts and adding my Fastmail. But none of the walkthroughs and tips I’ve found online awknowledge multiple Fastmail addresses on a single account. TL;DR: One Fastmail account, but several aliases/virtual addresses. So myemail@fastmail.com has addresses coolguy@mydomain.com and supercool@mydomain.com and wow@mydomain.com. The Fastmail client has a drop down for send from, and automatically sends email from the right alias when I reply. How do I duplicate this? I see no reference to send from or reply-to in any of the setups. Manually editing the from: line when sending from mu4e does nothing… the from and reply lines are just overwritten to whatever I have set for sending email. Thanks for any help or pointing me to appropriate resources. (Setting up on Mac now, but will be xplat). —————- UPDATE: two issues seemed to have “fixed” it (but clearly just hiding a bigger issue) - in my .msmtprc file I had a comment ## after the user line in the Fastmail section, that comment was getting sent around in the user somehow. - changing the .msmtprc default line from the gmail to the Fastmail causes the from line of email to not get overridden. Apparently when gmail is the default it triggers all sending to get clobbered somehow. If this sparks ideas for further inquiry from anyone please let me know.
twleo · 2022-11-14 22:42
Are you sure? Editing the `From:` in the `mu4e:compose` windows works for me. Also a FastMail user here.
New-Yogurt-61 · 2022-11-14 23:39
Editing it to something you set up somewhere else in a config? Or just change the from to whatever@test.com works?
twleo · 2022-11-14 23:48
`whatever@test.com` works as long as that is in your FastMail send identities. Part of my config if you need it ```emacs-lisp (make-mu4e-context :name "private" :enter-func (lambda () (mu4e-message "Switch to the Private context")) ;; leave-fun not defined :match-func (lambda (msg) (when msg (s-starts-with? "/fastmail" (mu4e-message-field msg :maildir)))) :vars '((user-mail-address . "user@domain") (user-full-name . "name") (smtpmail-smtp-user . "user@domain") (smtpmail-local-domain . "domain") (mu4e-drafts-folder . "/fastmail/Drafts") (mu4e-sent-folder . "/fastmail/Sent") (smtpmail-smtp-server . "smtp.fastmail.com") (smtpmail-smtp-service . 465) (smtpmail-stream-type . ssl) (message-send-mail-function . smtpmail-send-it) (send-mail-function . smtpmail-send-it) (mu4e-sent-messages-behavior . sent) (smtpmail-auth-supported . (cram-md5 plain login)) (mu4e-compose-signature . "Best regards\nName") (smtpmail-debug-info . t) (smtpmail-debug-verb . t) (starttls-use-gnutls . t) )) ```
thriveth · 2022-11-14 23:53
Sounds like you should set up contexts. In my setup, when I want to compose an e-mail, it will ask me which context I want to send from, with a single-letter keypress to choose. I can see if I can find the relevant setup snippet later.
New-Yogurt-61 · 2022-11-15 03:27
Thanks. I will try to parse this when I’m back at PC. I’ve only tested jacking with from on gmail… so maybe Fastmail will behave differently. My limited understanding is if I setup different contexts for every would-be alias then I’ll reget those emails. But maybe not… will see what specific issue I get when I setup contexts.
New-Yogurt-61 · 2022-11-19 21:09
Is the Fastmail your default in msmtprc? Try making a gmail default and see if the behavior changes.
twleo · 2022-11-19 21:16
I don't use `msmtp` in my setup.
twleo · 2022-11-19 21:19
Some articles I found https://tushartyagi.com/blog/configure-mu4e-and-msmtp/ I think you miss the `--read-envelope-from` things
ImportanceFit1412 · 2022-11-20 03:46
Same boat here. I set my mail-signature to different strings in each of my contexts....and then when I check it in the compose window it's set t, with the previous value being the one set from the context. So... something clobbering but have no idea.