[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [noob] From: line config + thanks for a great client!



At Wed, 24 Nov 2010 13:56:11 +0800,
dlm wrote:
> 
> At Tue, 23 Nov 2010 23:11:20 -0600,
> Eric Larson wrote:
> > Here is a blog post that I found helpful when first starting with wl:
> > 
> >  http://emacs-fu.blogspot.com/2009/06/e-mail-with-wanderlust.html
>
> Oh yes, I did see that in some google search lists. blogspot.com is
> not available to me here in China, so unfortunately that page won't
> help me. (Proxies exist for Windows, but they're written by hackers
> and are a good way to get viruses. A free one I've used in the past
> seems like it's now blocked too.)
> 
> I did have another question. This is in my .emacs:
> 
> (setq wl-message-id-domain "smtp.gmail.com")
> 
> But I still get the warning window saying that I need to set the
> variable. Looks like I did it right, but wl doesn't recognize it
> anyway. (I'm starting wl by M-x wl, so Emacs should have processed
> .emacs completely before launching wl.)

See this thread:

http://thread.gmane.org/gmane.mail.wanderlust.general/2048/focus=2056

For the blog post, see below.

best, Erik

-- SNIP --
Earlier, I have written about how I am using mutt as my e-mailclient. I discussed running mutt inside emacs as well. Of course, mutt is an external program, which puts some limits on its integration with emacs. I did try various emacs-based clients, such as VM (ViewMail) and GNUS, but they always left me a bit unsatisfied.

To start with, it was rather hard to set these programs up – and I am an Emacs-user, I like tweaking things… Still, it was hard to get even simple things working. Maybe I have uncommon wishes, but my desired setup already sent me to the edges of the googleable universe.

But now I have found an emacs-based client that seems to work really well for me. It's called Wanderlust, and it's a fine piece of Japanese engineering. It can be a little bit intimidating to set up at first, even though I found it still much easier than the other emacs-based clients I tried. Anyway, I am sharing a very basic setup here, enough to get you going.

What about my setup? Well: I use maildirs – that is, I download my mail into a local ~/Maildir directory-tree, either with e.g. fetchmail or with offlineimap. It's a particulary nice setup for offline-usage: whenever there's a network connection, I suck up all the mails and have them available offline. I work like this since the days when there was only expensive dial-up access to the net, and later I found it very convenient when I was traveling with a laptop and had only occasional net-access.

So, Maildir access is pretty important for me, and I'll describe my setup for using Wanderlust with it here. If you're using IMAP instead of Maildirs, you might be interested in the Emacs with Wanderlust and GMail-article.
Getting started

So, how to get started with Wanderlust?

In short: install Wanderlust and put some stuff in two files (~/.wl and ~/.folders).

A little bit longer:

    * get wanderlist - I am using the wl-beta packages from Ubuntu/Debian, which makes this a painless process, but you can also use source packages;
    * put your Wanderlust-configuration in a special file: ~/.wl;
    * put a list of the mail folders you're interested in, in a file called

~/.folders. (yes, you can customize all this)

For the rest of the discussion, let's assume we have a Maildir which contains some folders:

    * inbox for incoming e-mail
    * bulk for incoming Mailing List mail
    * drafts for drafts
    * sent for sent e-mail
    * trash for junk email

All incoming mail is going to either inbox or bulk. I'm not going to discuss how to get the mails there – I assume you're already have these thing set up; otherwise, you can take a look at tools like fetchmail, retchmail, procmail and friends. Note that much of the discussion here applies as well if you're using Wanderlust with POP or IMAP.
What to put in ~/.wl?

So, how to setup Wanderlust to use this? Well, our configuration goes into a file called ~/.wl. There's a million more things you can set up here , but let's stick to the basics here. I'll discuss more tricks and extensions later.

;; mode:-*-emacs-lisp-*-
;; wanderlust 
(setq 
  elmo-maildir-folder-path "~/Maildir"          ;; where i store my mail

  wl-stay-folder-window t                       ;; show the folder pane (left)
  wl-folder-window-width 25                     ;; toggle on/off with 'i'
  
  wl-smtp-posting-server "localhost"            ;; put the smtp server here
  wl-local-domain "myhost.example.com"          ;; put something here...
  wl-message-id-domain "myhost.example.com"     ;; ...

  wl-from "Me <me@example.com>"                  ;; my From:

  ;; note: all below are dirs (Maildirs) under elmo-maildir-folder-path 
  ;; the '.'-prefix is for marking them as maildirs
  wl-fcc ".sent"                       ;; sent msgs go to the "sent"-folder
  wl-fcc-force-as-read t               ;; mark sent messages as read 
  wl-default-folder ".inbox"           ;; my main inbox 
  wl-draft-folder ".drafts"            ;; store drafts in 'postponed'
  wl-trash-folder ".trash"             ;; put trash in 'trash'
  wl-spam-folder ".trash"              ;; ...spam as well
  wl-queue-folder ".queue"             ;; we don't use this

  ;; check this folder periodically, and update modeline
  wl-biff-check-folder-list '(".todo") ;; check every 180 seconds
                                       ;; (default: wl-biff-check-interval)

  ;; hide many fields from message buffers
  wl-message-ignored-field-list '("^.*:")
  wl-message-visible-field-list
  '("^\\(To\\|Cc\\):"
    "^Subject:"
    "^\\(From\\|Reply-To\\):"
    "^Organization:"
    "^Message-Id:"
    "^\\(Posted\\|Date\\):"
    )
  wl-message-sort-field-list
  '("^From"
    "^Organization:"
    "^X-Attribution:"
     "^Subject"
     "^Date"
     "^To"
     "^Cc"))

What to put in ~/.folders?

So, that was the basic setup. Now we need to tell wanderlust about the folders we'd like to see in the user-interface: ~/.folders. Wanderlust does not automatically use all the folder in your ~/Maildir. The folder names in ~/.folders can refer to maildirs, newsgroups, POP-account, IMAP-folders and a couple of other ones. In particular, you can combine folders to show as aggregate folders in Wanderlust.

Wanderlust distinguishes the kind of folder something is by looking at a special prefix character. For maildirs, this is a dot ('.'), IMAP-folders get a '+', newsgroups get a '-' and so on. After the mailbox name, you can have a 'friendly name' in quotes, which is what will show up in the user-interface.

Something like this:

# WL folders (put the '#' always at the beginning of the line)
.inbox     "Inbox"
.bulk      "Mailinglists"
.drafts    "Drafts"
.sent      "Sent Mail"
.trash     "Junk"

Note, the little format has some more tricks; e.g., if you had some folders, you cold have something like:

# WL folders (put the '#' always at the beginning of the line)

# 'Lists' will be a tree node with three elements
Lists {
        .mailinglist1 "A mailinglist"
        .mailinglist2 "Another Mailinglist" 
        .mailinglist3 "Yet one more mailinglist"
}

# you make virtual folders from combined lists with the '*'
AllMyMailingLists  *.mailinglist1,.mailinglist2,.mailinglist3

Anyway, there's plenty of room for experimentation here…

Now, we're ready! Start Wanderlust with M-x wl. You will be greeted, and things are relatively easy from there on. You might want to use the menu at first at least, as the default keybindings are somewhat surprising (like a for reply, and w to compose a new message).
What's next?

As I said, there are 10E6 things to configure and to customize, but this should give you a reasonable setup to start with; you might want to change some details (like the folder names) to match your situation. Good luck!

As a true emacs-mailer, Wanderlust nicely integrates with e.g. BBDB (the addressbook) and org-mode. You can also use GPG (through mailcrypt), spamfiltering, and so on. I will discuss some of those things in the second part of the discussion of Wanderlust.
-- SNIP --