[Mutt] help on complicated per-folder or per-sender sending email hooks
maitra at email.com
maitra at email.com
Fri Nov 26 00:32:50 UTC 2021
On Wed Nov24'21 06:21:06PM, Mihai Lazarescu wrote:
> From: Mihai Lazarescu <mtlagm at gmail.com>
> Date: Wed, 24 Nov 2021 18:21:06 +0100
> To: mutt-users at mutt.org
> Subject: Re: [Mutt] help on complicated per-folder or per-sender sending
> email hooks
>
> On Wednesday, November 24, 2021 at 10:23:31 -0600, Ranjan Maitra wrote:
>
> > set smtp_url="smtp://yourusername@smtp.example.com:587/"
> > set smtp_pass="Your1!Really2 at AweSome3#Password"
> >
> > But what do I do about the work email that uses postfix?
>
> If you unset smtp_url mutt should connect to port 25 on localhost to send,
> where should listen postfix properly configured for work in your case.
>
> > 2. I want e-mails in a few folders (basically the ones attached
> > to mailing lists) to use a specific account. For example, I
> > have a folder called mutt, and I would like to be able to use
> > this email address that I am using to be my account whenever I
> > send emails from this folder. Otherwise, I would like emails
> > sent to a specific account also be responded to from that
> > account.
>
> I think you want to use folder-hook recipes, something like:
>
> folder-hook . 'unset smtp_url'
> folder-hook 'mutt' 'set from = maitra at email.com; set smtp_url="smtp://yourusername@smtp.example.com:587/"; set smtp_pass="Your1!Really2 at AweSome3#Password"'
Thanks very much for this. This was very helpful to understand and get started.
It turns out that I had to play around a bit more, and set ssl etc, but it looks like it is working. The following was helpful on this account: https://bbs.archlinux.org/viewtopic.php?id=159584.
I had a few more questions. Is it possible to have a hook based on where the email is coming to? So, if I am in this folder, then I use the above, but I am wondering if I can have a hook that says something like if the e-mail was sent to maitra at email.com then use the same account.
Also, how do I give multiple folders for a hook? So, in the above, if I am in mutt or R or fedora, etc, I can use that account? Or do I specify one hook for each folder?
Many thanks again for your help, Mihail!
Best wishes,
Ranjan
More information about the Mutt-users
mailing list