[neomutt-users] *-hook settings. I'm confused

Chris Bennett chris at bennettconstruction.us
Tue Aug 6 06:45:11 CEST 2019


On Mon, Aug 05, 2019 at 09:47:30PM -0400, Andrew Sullivan wrote:
> I shorten neomutt to mutt below,
> because it's easier to type.

alias mutt='neomutt', sometimes, alias mutt='env EDITOR=vim neomutt'
Same reason

To add in, this email is neomutt using mbox on this server.

> > Right now, I am using Maildir on OpenBSD with OpenSMTPD.
> > I am going to setup Dovecot.
> 


> So, you have one mailbox there (which later might be IMAP, but is now
> just a mailspool)?
> 

OK, let me explain much better. Right now, nothing anywhere is using
IMAP. Just spool files.
Everything on the experimental server is getting emails that I can live
without.
Thus I can safely try to get it right in the "real world", but safe to
experiment with. I want to essentially duplicate getting the mailing
lists and other types of emails that I get here, but using Maildir and
IMAP.
I would like to (possibly) use a different email address for each
mailing list, forum, personal and business email.
I have no objections to getting IMAP from any or all of the three
servers I have right now.

> > With several different users, I've got different configs, with or
> > without extra mailboxes. I can't get anything to go into INBOX.
> 
> I totally don't understand the above, so I'm sorry to ask stupid
> questions:
> 
> 	1.  Do you have different users of the same mutt installation?

different email addresses sent with SMTP aliases file to a single user.

> 
> 	2.  Are you using one mutt for multiple mail accounts?

Yes, in the sense of changing the headers to match the expected
subscriber to a list or forum or even a person. Which is sorta like the
incoming side getting routed to one user.
> 
> 	3.  What is the "extra mailboxes" bit of which you speak?

I have been using different real users to get each mailing list.
I don't really like that. Clunky.
So I would like to have an INBOX
OpenBSD.misc
OpenBSD.ports
OpenBSD.tech
OpenSMTPD.misc

and so forth. Preferably with different email addresses, but not
mandatory.

Can I get this to work off of a spoolfile with Maildir?
Do I need to add-in the IMAP to make this work?
Working IMAP and Maildir is the goal, so if let's skip the just off the
spoolfile part is best, not a problem.

> Sorry about the hip replacement.

I'm going in for a catherterization and angiogram for my heart tomorrow
morning. I should feel much better in a few days.
Then the hip! :)

Feel free to point out any of my confusing communication. That trait is
one I have always had. My dad says I expect people to guess half of what
I am saying. I take no offense!

Thanks,
Chris Bennett

> What I have is a .mailboxes file that says something like this:
> 
> mailboxes imaps://server.example/INBOX imaps://server.other.example
> set spoolfile=imaps://server.other.example
> 
> Then I have a file with credentials in it that reads something like this:
> 
> account-hook . 'unset imap_user; unset imap_pass; unset tunnel;'
> account-hook imaps://server.example/ 'set imap_user=[login] imap_pass=[pass]'
> account-hook imaps://outlook.office365.com 'set imap_user=[login] imap_pass=[pass]'
> 
> folder-hook 'imaps://server.example/*' 'set hostname=[]; set smtp_url=[]; set reverse_name; set from=[]; set folder=[]; set record="=sent-mail-`date +%Y-%m`"
> 
> Now, mote the record thing above.  It allows every mail sent to go to
> sent-mail-[current date here].  This is an old trick that's in an old
> mutt faq I saw -- I've been using it at least since the late 90s.
> This is part of why the hook system is so cool.
> 
> Do something similar with folder-hook for all your accounts.
> 
> Similarly, for sending:
> 
> send-hook '~f [yourregexhere]' 'set signature=~/.mutt/.somesig; set smtp_url="smtp://user@place:[pass]@server/"; set folder="imaps://server.com/"'
> 
> HTH!
> 
> A
> 
> 
> -- 
> Andrew Sullivan
> ajs at anvilwalrusden.com


More information about the neomutt-users mailing list