Skip to content

Latest commit

 

History

History
115 lines (78 loc) · 4.52 KB

memacs_mumail.org

File metadata and controls

115 lines (78 loc) · 4.52 KB

memacs-mumail

Please report any problems you find opening a new issue or writing an email to [email protected]

Options

  • -q, --query, mu search query
  • -m, --me, space separated list of mail addresses that belongs to you
  • -d, --delegation, adds NEXT or WAITING state to flagged messages

Data Source

This memacs module will parse your emails after they are indexed by mu. Clickable links have just been tested with mu4e (an emacs-based e-mail client based on mu) as frontend.

Look here for how to set up mu4e with offlineimap.

Example Invocation

Basic Invocation

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir'" -m "[email protected]"

The -m param with your email address will check if the mail ewas from or to you.

An entry with an email from you will look like this:

** <2011-11-03 Do 13:31> F: [[mailto:[email protected]][Sender Name]]: [[mu4e:msgid:1554232683.7822665.1320323516478.JavaMail.fmail@mwmweb024][subject]]
  :PROPERTIES:
  :TO:         Your Name <[email protected]>
  :FROM:       [[mailto:[email protected]][Sender Name]]
  :ID:         638a689e6e40abe4f3ae1da6834da42f44082577
  :END:

An entry with an email to you will look like this

** <2012-07-05 Do 21:21> T: [[mailto:[email protected]][Recipient Name]]: [[mu4e:msgid:[email protected]][Re: subject]]
  :PROPERTIES:
  :TO:         Recipient Name <[email protected]>
  :FROM:       [[mailto:[email protected]][Your Name]]
  :ID:         591a0dcf4bf83c8b508324c7c954d2e7b1a0b822
  :END:

Advanced Invocation

You can use the -q param with every input for mu find that is supported by mu. Check out Mu Cheatsheet and ubuntu manuals mu.

Unread emails

For people using the agenda a lot, it could be nice to see new (unread) emails directly on the agenda. The following invocation will list just all unread mails in your Maildir

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir' and flag:unread" -m "[email protected]"

To see the emails on your agenda add the -o param and include the selected .org-file (not .org_archive) to your org-agenda-files.

Flagged emails

Do you know this: You check your mails on the road, but you do not have time to reply and when you are at home you forget it?

With this option flagged mails will appear on your agenda:

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir' and flag:flagged" -m "[email protected] -d"

If you add the param -d, messages in your INBOX that are flagged will be marked as NEXT and messages in your Sent folder will be marked as WAITING.

Entry for a flagged email in your INBOX

** NEXT <2011-11-03 Do 13:31> F: [[mailto:[email protected]][Sender Name]]: [[mu4e:msgid:1554232683.7822665.1320323516478.JavaMail.fmail@mwmweb024][subject]]
  SCHEDULED: <2011-11-03 Do>
  :PROPERTIES:
  :TO:         Your Name <[email protected]>
  :FROM:       [[mailto:[email protected]][Sender Name]]
  :ID:         638a689e6e40abe4f3ae1da6834da42f44082577
  :END:

Entry for a flagged email in your Sent folder

** WAITING <2012-07-05 Do 21:21> T: [[mailto:[email protected]][Recipient Name]]: [[mu4e:msgid:[email protected]][Re: subject]]
  SCHEDULED: <2012-07-05 Do>
  :PROPERTIES:
  :TO:         Recipient Name <[email protected]>
  :FROM:       [[mailto:[email protected]][Your Name]]
  :ID:         591a0dcf4bf83c8b508324c7c954d2e7b1a0b822
  :END:

To see the emails on your agenda, add the -o param and include the selected .org-file (not .org_archive) to your org-agenda-files.

To get both unread and flagged emails use the following invocation

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir' and flag:flagged or maildir:'/YourMaildir' and flag:unread " -m "[email protected]"

Using a catch-all domain

When you are using a catch-all domain, you can use the following invocation to check whether the email was sent from or to you.

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir'" -m "@domain.org"

For the case that you are using a catch-all domain (e.g. as subdomain) and another address at the same time you can use:

$ memacs_mumail.py -q "mu find maildir:'/YourMaildir'" -m "[email protected] @sub.domain.org"