[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]  


Config

If you specify "case" blocks in your IM "Config" file, you can change actions of imget and imput. Suppose that the followings are specified in Config.

Imget.Src=pop/apop:kazu@mail.mew.org
User=kazu
FromDomain=Mew.org
case wide
Imget.Src=pop/rpop:robby@mx.wide.ad.jp
User=robby
FromDomain=wide.ad.jp
case iijlab
Imget.Src=imap:kazu@mailbox.iijlab.net
FromDomain=iijlab.net

By default, imget retrieves kazu's messages from mail.mew.org by APOP. And if the From: field doesn't exist in a message to be sent(e.g. when mew-from is set to nil), the user name "kazu" and Mew.org is concatenated with "@" then imput specifies it in the From: field.

If you specify --config=wide to imget, it retrieves robby's messages from mx.wide.ad.jp by RPOP. Also, imput chooses robby@wide.ad.jp for the From: field.

In this way, imget and imput selects valid case block according to the --config option. As you see above, with this feature, it is very convenient since you can change mailbox and your address.

When Mew boots up, it investigates case statements. If there are one or more kinds of case statements, `mew-config-list' is set. The block to be read when --config is not specified is represented as "default". In the case up above, '("default" "wide" "iijlab") is set to `mew-config-list'.

If you type `C' in Summary mode, you can complete the value to be specified with the --config option for imget, using `mew-config-list' as candidates. The default value is "default". If other value is selected, say "wide", `i' displays the following message.

Getting +inbox (wide)...

To specify case block to imput, you can use the Config: field in a messge to be sent. In Draft mode, you can complete the Config: field itself by `TAB' as described in See section Completions in a header. Also, you can complete its value by `TAB' using `mew-config-list' as candidates. Moreover, you can use circular completion of `mew-config-list' by `C-cTAB'.

However, you may think this is a boring job. You would want Mew to guess a value of Config: because Mew can guess refile folders. Of course, Mew supports this kind of guess feature. You can specify your guess rule to `mew-config-guess-alist'. Its syntax is exactly the same as `mew-refile-guess-alist' explained in See section Guess by user defined rules.

Let's look at one example:

(setq mew-config-guess-alist
   '(("To:"
      ("wide.ad.jp" . "wide")
      ("mew.org" . "mew"))))

In this case, if To: matches wide.ad.jp, "Config: wide" is inserted. If it matches mew.org, "Config: mew" is inserted.

There are three changes that you can insert the Config: field with this feature.

  1. When a draft is prepared if `mew-config-insert-when-prepared' is `t'.
  2. When a message is composed by `C-cC-m' if `mew-config-insert-when-composed' is `t'.
  3. Anytime when you type `C-cC-o'.

This is just for your information. If you want select Config: by hostname, put the following line in your ".emacs".

(setq mew-config-guess-alist
   (list (cons nil (system-name))))


[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]