0

I get emails from mail lists such as best-h@list.ayy.com. I don't want them to my inbox, I want them to a new inboxes that I can only read when I select them or basically move all mails like this to a file that I can read in some way. How can I do it?

  • How is mail delivered to your inbox? Do you manage the SMTP server or do you know the person who does? Are you able to use mail filtering tools to handle final delivery for you? – D_Bye Sep 16 '14 at 8:42
  • notmuch with Mutt works for mail filtering and indexing; it integrates perfectly. – jasonwryan Sep 16 '14 at 9:03
  • @D_Bye I have the server in my maintenance or better shared server and we have a support people. Mail filtering tools sounds the right thing -- I don't know anything about them. Can you explain more? – hhh Sep 17 '14 at 10:21
1

If you have administrative control over your SMTP server, or know those who do, you can arrange for email to be delivered by a program such as procmail or maildrop (you could also achieve this using your ~/.forward file to send mail through a pipe to procmail or maildrop, which your mail server probably supports). Both of these tools look for a config file usually located in your home directory which contains rules specifying how a matching message should be handled. You can set up rules that look at the sender address, for example, and place matching messages in the appropriate mail box, and then using mutt or any other MUA you can read and dispose those messages just as you would any other.

maildrop supports delivering to Maildir style mail folders, so is a good choice if you use an IMAP server that expects that format. I haven't used procmail in such a long time that I don't recall whether or not it handles Maildir.

In addition to setting up a mail delivery agent like maildrop or procmail, you should also update your mutt configuration so it knows that a particular address belongs to a mailing list and that you are subscribe to it.

subscribe best-h@list.ayy.com
list different-list@list.ayy.com

The first line tells mutt that best-h@list.ayy.com is a mailing list address and that you are subscribed to the list. The second tells mutt that different-list@list.ayy.com is a mailing list to which you are not subscribed. Both will enable mutt's features for handling mailing lists for any matching messages. The documentation at mutt.org will give you a description of what these features are.

  • list command does not work in my .muttrc?! – hhh Sep 18 '14 at 9:25
  • What do you mean by "does not work"? What error message do you receive? – D_Bye Sep 18 '14 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.