]> git.notmuchmail.org Git - notmuch-wiki/blobdiff - emacstips.mdwn
emacstips: fixing typos
[notmuch-wiki] / emacstips.mdwn
index 0e60086b5a5475c020e2ed20ad1f85cca165437a..fc9e9ddf424944f8ddfac113f2a7ff5688a26a57 100644 (file)
@@ -33,12 +33,12 @@ OK, messages are now in your maildir and they have the tags you want them to hav
 notmuch (the search view) and notmuch-folder are the 2 main views that can be used to navigate through your mail.
 The default notmuch "home" is a notmuch-search view with all all mail threads in which a message has been tagged as "inbox". Just navigate that page and read threads by hitting <RETURN> on one of them. This will open a notmuch thread view with all messages in this thread. Threads are a powerful construct in notmuch as a thread really represents a discussion around a single topic. In difference to other mail applications, you will often find very long threads in notmuch mail conversations, or people reviving very old threads with a reply.
 
-The second way of navigating notmuch mails, is by using the notmuch-folder view which you can invoke with `M-x notmuch-folder` (or using the F key if you applied the patch from mail id: 1265889583-25406-1-git-send-email-dme@dme.org (Feb 11st, 2010)). For information on how to customize your notmuch-folder views, see [here](#customize_notmuch_folder). This view provides you with "virtual folders" that allow you to browse all emails topic-by-topic. For example, if you want to browse all notmuch related mail every 10 minutes, but check out mails from your boss only once a day, this will be one convenient way to do it. It will also give you a nice overview of how many (unread) emails you have for each folder. Those folders are virtual in that a mail can easily be part of several folders at the same time and the folders will be upated on-the-fly every time you hit `=`.
+The second way of navigating notmuch mails, is by using the notmuch-folder view which you can invoke with `M-x notmuch-folder` (or using the F key if you applied the patch from mail id: 1265889583-25406-1-git-send-email-dme@dme.org (Feb 11st, 2010)). For information on how to customize your notmuch-folder views, see [here](#customize_notmuch_folder). This view provides you with "virtual folders" that allow you to browse all emails topic-by-topic. For example, if you want to browse all notmuch related mail every 10 minutes, but check out mails from your boss only once a day, this will be one convenient way to do it. It will also give you a nice overview of how many (unread) emails you have for each folder. Those folders are virtual in that a mail can easily be part of several folders at the same time and the folders will be updated on-the-fly every time you hit `=`.
 
 Last but not least, you can always search for a specific mail. Notmuch provides very powerful search possibilities which allows you to find mail threads easily without having to file them away into umpteenth mail folders as you might have been doing in your Thunderbird, Mail.app, or Outlook.
 
 ### search strategies
-__[TODO, describe s, f, t keys and some expemplary searches]__.
+__[TODO, describe s, f, t keys and some exemplary searches]__.
 __[TODO: describe common search strategies that notmuch users use]__
 
 ###Sending mail
@@ -73,7 +73,7 @@ As its name implies, notmuch isn't really doing that much (which is part of its
   not replies. So we need to get sane message-mode FCC figured
   out. Some investigation is still needed here.
 
-* <span id="customize_notmuch_folder">How to customize notmuch-folders</span>
+* <span id="customize_notmuch_folder">How to customize notmuch-folders</span>
 
   There's a "notmuch-folder" command available in the emacs client
   that displays a list of "folders" and the number of messages in
@@ -124,6 +124,35 @@ As its name implies, notmuch isn't really doing that much (which is part of its
   already running, it seems to shut down when the script exits. I
   don't know why."
 
+* msmtp, message mode and multiple accounts
+
+  As an alternative to running a mail server such as sendmail or
+  postfix just to send email, it is possible to use
+  [msmtp](http://msmtp.sourceforge.net/).  This small application will
+  look like /usr/bin/sendmail to a MUA such as emacs message mode, but
+  will just forward the email to an external SMTP server.  It's fairly
+  easy to set up and it support several account for using different
+  SMTP servers.  The msmtp pages have several examples.
+
+  A typical scenario is that you want to use the company SMTP server
+  for email coming from your company email address, and your personal
+  server for personal email.  If msmtp is passed the envelope address
+  on the command line (the -f/--from option) it will automatically
+  pick the matching account.  The only trick here seems to be getting
+  emacs to actually pass the envelope from.  There are a number of
+  overlapping configuration variables that control this, and it's a
+  little confusion, but setting these three works for me:
+
+   - mail-specify-envelope-from: t
+
+   - message-sendmail-envelope-from: header
+
+   - mail-envelope-from: header
+
+  With that in place, you need a .msmtprc with the accounts configured
+  for the domains you want to send out using specific SMTP servers and
+  the rest will go to the default account.
+
 * <span id="sync_maildir_flags">how to sync notmuch tags and maildir flags]</span>
 
   __[TODO: This is a wiki. write me!]__