* wl-vars.el (wl-message-id-use-wl-from): New variable.
[elisp/wanderlust.git] / samples / en / dot.wl
1 ;;; dot.wl -- sample setting file for Wanderlust        -*- emacs-lisp -*-
2
3 ;; [[ Requirement Setting ]]
4
5 ;; Following must be included in ~/.emacs
6 ;; (No need if installed as XEmacs package.)
7 (autoload 'wl "wl" "Wanderlust" t)
8 (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
9
10 ;; Icon directory
11 ;; (No need if installed as XEmacs package.)
12 ;(setq wl-icon-directory "/usr/local/lib/emacs/etc")
13
14
15 ;; [[ SEMI Setting ]]
16
17 ;; Disable inline display of HTML part.
18 ;; Put before load `mime-setup'
19 (setq mime-setup-enable-inline-html nil)
20
21 ;; Don't split large message.
22 (setq mime-edit-split-message nil)
23
24 ;; If lines of message are larger than this value, treat it as `large'.
25 ;(setq mime-edit-message-default-max-lines 1000)
26
27
28 ;;; [[ Private Setting ]]
29
30 ;; Header From:
31 ;(setq wl-from "Your Name <e-mail@example.com>")
32
33 ;; User's mail addresses.
34 (setq wl-user-mail-address-list
35       (list (wl-address-header-extract-address wl-from)
36             ;; "e-mail2@example.com"
37             ;; "e-mail3@example.net" ...
38             ))
39
40 ;; Subscribed mailing list.
41 (setq wl-subscribed-mailing-list
42       '("wl@lists.airs.net"
43         "apel-ja@m17n.org"
44         "emacs-mime-ja@m17n.org"
45         ;; "ml@example.com" ...
46         ))
47
48 ;; If (system-name) does not return FQDN,
49 ;; set following as a local domain name without hostname.
50 ;; ((system-name) "." wl-local-domain is used as domain part of Message-ID
51 ;; and an argument of HELO in SMTP.
52 ;(setq wl-local-domain "example.com")
53
54 ;; Specific domain part for message-id.
55 ;(setq wl-message-id-domain "hostname.example.com")
56
57 ;; Use wl-from for generating message-id.
58 ;; wl-message-id-use-wl-from precedes wl-local-domain and wl-message-id-domain.
59 ;(setq wl-message-id-use-wl-from t)
60
61 ;;; [[ Server Setting ]]
62
63 ;; Default IMAP4 server
64 (setq elmo-imap4-default-server "localhost")
65 ;; Default POP server
66 (setq elmo-pop3-default-server "localhost")
67 ;; SMTP server
68 (setq wl-smtp-posting-server "localhost")
69 ;; Default NNTP server
70 (setq elmo-nntp-default-server "localhost")
71 ;; NNTP server name for posting
72 (setq wl-nntp-posting-server elmo-nntp-default-server)
73
74 ;; IMAP authenticate type setting
75 (setq elmo-imap4-default-authenticate-type 'clear) ; raw
76 ;(setq elmo-imap4-default-authenticate-type 'cram-md5) ; CRAM-MD5
77
78 ;; POP-before-SMTP
79 ;(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
80
81
82 ;;; [[ Basic Setting ]]
83
84 ;; Default folder for `wl-summary-goto-folder'.
85 ;(setq wl-default-folder "+inbox")
86
87 ;; Default string for folder name completion.
88 ;(setq wl-default-spec "+")
89
90 ;; Folder Carbon Copy
91 ;(setq wl-fcc "+outbox")
92
93 ;; Confirm before exitting Wanderlust.
94 (setq wl-interactive-exit t)
95
96 ;; Confirm before sending message.
97 (setq wl-interactive-send t)
98
99 ;; Create opened thread.
100 ;(setq wl-thread-insert-opened t)
101
102 ;; Keep folder window beside summary. (3 pane)
103 ;(setq wl-stay-folder-window t)
104
105 ;; Truncate long lines.
106 ;(setq wl-message-truncate-lines t)
107 ;(setq wl-draft-truncate-lines t)
108 ;; Following line is needed for XEmacs older than 21.4.6.
109 ;(setq truncate-partial-width-windows nil)
110
111 ;; Open new frame for draft buffer.
112 ;(setq wl-draft-use-frame t)
113
114 ;; Don't limit indent for thread view
115 ;(setq wl-summary-indent-length-limit nil)
116 ;(setq wl-summary-width nil)
117
118 ;; Divide thread by change of subject.
119 ;(setq wl-summary-divide-thread-when-subject-changed t)
120
121 ;; Change format of thread view
122 ;(setq wl-thread-indent-level 2)
123 ;(setq wl-thread-have-younger-brother-str "+"
124 ;      wl-thread-youngest-child-str      "+"
125 ;      wl-thread-vertical-str            "|"
126 ;      wl-thread-horizontal-str          "-"
127 ;      wl-thread-space-str               " ")
128
129 ;; display first message automatically.
130 ;(setq wl-auto-select-first t)
131
132 ;; goto next folder when exit from summary.
133 ;(setq wl-auto-select-next t)
134
135 ;; skip folder if there is no unread message.
136 ;(setq wl-auto-select-next 'skip-no-unread)
137
138 ;; jump to unread message in 'N' or 'P'.
139 ;(setq wl-summary-move-order 'unread)
140
141 ;; notify mail arrival
142 ;(setq wl-biff-check-folder-list '("%inbox"))
143 ;(setq wl-biff-notify-hook '(ding))
144
145
146 ;;; [[ Network ]]
147
148 ;; cache setting.
149 ;; (messages in localdir, localnews, maildir are not cached.)
150 ;(setq elmo-archive-use-cache nil)
151 ;(setq elmo-nntp-use-cache t)
152 ;(setq elmo-imap4-use-cache t)
153 ;(setq elmo-pop3-use-cache t)
154
155 ;; Enable disconnected operation in IMAP folder.
156 (setq elmo-enable-disconnected-operation t)
157
158 ;; Store draft message in queue folder if message is sent in unplugged status.
159 (setq wl-draft-enable-queuing t)
160 ;; when plug status is changed from unplugged to plugged,
161 ;; queued message is flushed automatically.
162 (setq wl-auto-flush-queue t)
163
164 ;; offline at startup.
165 ;(setq wl-plugged nil)
166 ;; change plug status by server or port at startup.
167 ;(add-hook 'wl-make-plugged-hook
168 ;         '(lambda ()
169 ;            ;; Add or Change plug status for SERVER and PORT.
170 ;            (elmo-set-plugged plugged(t/nil) server port)
171 ;            ;; When omit port, SEVERS all port was changes.
172 ;            ;; (Can't add plug status without PORT)
173 ;            (elmo-set-plugged plugged(t/nil) server)
174 ;            ))
175
176
177 ;;; [[ Special Setting ]]
178
179 ;; open unread group folder after checking.
180 ;(add-hook 'wl-folder-check-entity-hook
181 ;         '(lambda ()
182 ;            (wl-folder-open-unread-folder entity)
183 ;            ))
184
185 ;; Change summary display function.
186
187 ;; Set extra field use with `elmo-msgdb-overview-entity-get-extra-field'.
188 ;; And use with auto-refile.
189 (setq elmo-msgdb-extra-fields
190       '("newsgroups"
191         "list-id" "x-ml-name" "mailing-list"
192         "x-mail-count" "x-ml-count" "x-sequence"))
193
194 ;; ML message displays ML name and ML sequence number in subject.
195 (setq wl-summary-subject-function 'my-wl-summary-subject-func-ml)
196 (defun my-wl-summary-subject-func-ml (subject-string)
197   (let ((folder wl-summary-buffer-folder-name)
198         (subj subject-string) (sequence) (ml-name) (ml-count))
199     (setq sequence (elmo-msgdb-overview-entity-get-extra-field
200                     entity "x-sequence")
201           ml-name (or (elmo-msgdb-overview-entity-get-extra-field
202                        entity "x-ml-name")
203                       (and sequence
204                            (car (split-string sequence " "))))
205           ml-count (or (elmo-msgdb-overview-entity-get-extra-field
206                         entity "x-mail-count")
207                        (elmo-msgdb-overview-entity-get-extra-field
208                         entity "x-ml-count")
209                        (and sequence
210                             (cadr (split-string sequence " ")))))
211     (if (string-match
212          "^\\s(\\(\\S)+\\)[ :]\\([0-9]+\\)\\s)[ \t]*"
213          subject-string)
214         (progn
215           (setq subj (substring subject-string (match-end 0)))
216           (if (not ml-name) (setq ml-name (match-string 1 subject-string)))
217           (if (not ml-count) (setq ml-count (match-string 2 subject-string)))))
218     (condition-case nil
219         (if (and ml-name ml-count)
220             (if (string= folder wl-default-folder)
221                 (format "(%s %05d) %s"
222                         (car (split-string ml-name " "))
223                         (string-to-int ml-count)
224                         subj)
225               (format "#%05d %s"
226                       (string-to-int ml-count) subj))
227           subj)
228       (error subj))))
229
230 ;; imput asynchronously.
231 ;; (utils/im-wl.el is needed to be installed.
232 ;;  Don't forget setting ~/.im/Config (Smtpservers).
233 ;;  note that wl-draft-enable-queuing is not valid.)
234 ;(autoload 'wl-draft-send-with-imput-async "im-wl")
235 ;(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
236
237
238 ;; non-verbose User-Agent: field
239 ;(setq wl-generate-mailer-string-function
240 ;      (function
241 ;       (lambda ()
242 ;        (concat "User-Agent: "
243 ;                (wl-generate-user-agent-string-1 nil)))))
244
245
246 ;;; [[ Template ]]
247
248 ;; template
249 ;(setq wl-template-alist
250 ;      '(("default"
251 ;        ("From" . wl-from)
252 ;        ("Organization" . "organization for default")
253 ;        (body . "Hello, this is XXX \n")) ; body
254 ;       ("report"
255 ;        ("To" . "boss@example.com")
256 ;        ("Subject" . "Report")
257 ;        (top . "Sir, here is my report\n") ; insert in top.
258 ;        (bottom-file . "~/work/report.txt") ; insert file in bottom
259 ;        )
260 ;       ))
261
262 ;; Change headers in draft sending time.
263 ;(setq wl-draft-config-alist
264 ;      '((reply                         ; see reply buffer
265 ;        "^To: .*test-notsend-wl@lists\\.airs\\.net"
266 ;        (template . "default"))        ; template
267 ;       ("^To: .*test-notsend-wl@lists\\.airs\\.net"
268 ;        ding                           ; function
269 ;        ("From" . wl-from)             ; variable
270 ;        ("Organization" . "organization")) ; string
271 ;       ("^Newsgroups: test.*"
272 ;        ("Organization" . "organization for nntp."))
273 ;       ))
274
275 ;; Change headers in draft preparation time.
276 ;(add-hook 'wl-mail-setup-hook
277 ;         '(lambda ()
278 ;            (unless wl-draft-reedit;   ; don't apply when reedit.
279 ;              (wl-draft-config-exec wl-draft-config-alist))))
280
281
282 ;; [[ Reply ]]
283 ;; header value setting for mail reply.
284
285 ;; Wide window for draft buffer.
286 ;(setq wl-draft-reply-buffer-style 'full)
287
288 ;; Remove fullname in reply message header.
289 ;(setq wl-draft-reply-use-address-with-full-name nil)
290
291 ;; "a" (without-argument) reply to author (Reply-To or From).
292 ;; if 'X-ML-Name' and 'Reply-To' exists, reply to 'Reply-To'.
293 (setq wl-draft-reply-without-argument-list
294       '((("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
295         ("X-ML-Name" . (("To" "Cc") nil nil))
296         ("Followup-To" . (nil nil ("Followup-To")))
297         ("Newsgroups" . (nil nil ("Newsgroups")))
298         ("Reply-To" . (("Reply-To") nil nil))
299         ("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
300         ("From" . (("From") nil nil))))
301
302 ;; "C-u a" (with-argument) reply to all.
303 (setq wl-draft-reply-with-argument-list
304       '(("Followup-To" . (("From") nil ("Followup-To")))
305         ("Newsgroups" . (("From") nil ("Newsgroups")))
306         ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
307         ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
308
309
310 ;;; [[ Message Display Settings ]]
311
312 ;; Hidden header field in message buffer.
313 (setq wl-message-ignored-field-list
314       '(".*Received:" ".*Path:" ".*Id:" "^References:"
315         "^Replied:" "^Errors-To:"
316         "^Lines:" "^Sender:" ".*Host:" "^Xref:"
317         "^Content-Type:" "^Precedence:"
318         "^Status:" "^X-VM-.*:"))
319
320 ;; Displayed header field in message buffer.
321 ;; This value precedes `wl-message-ignored-field-list'
322 (setq wl-message-visible-field-list '("^Message-Id:"))
323
324 ;; X-Face
325 (when window-system
326   (cond ((and (featurep 'xemacs)        ; for XEmacs
327               (module-installed-p 'x-face))
328          (autoload 'x-face-xmas-wl-display-x-face "x-face")
329          (setq wl-highlight-x-face-function 'x-face-xmas-wl-display-x-face))
330
331         ;; for Emacs21
332         ((and (not (featurep 'xemacs))
333               (= emacs-major-version 21)
334               (module-installed-p 'x-face-e21))
335          (autoload 'x-face-decode-message-header "x-face-e21")
336          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
337
338         ;; for Emacs 19.34, Emacs 20.x
339         ((module-installed-p 'x-face-mule)
340          ;; x-face-mule distributed with bitmap-mule 8.0 or later
341          (autoload 'x-face-decode-message-header "x-face-mule")
342          (setq wl-highlight-x-face-function 'x-face-decode-message-header))
343         ))
344
345 ;; Scoring.
346 ;; "all.SCORE" file is used regardless of wl-score-folder-alist.
347 ;(setq wl-score-folder-alist
348 ;      '(("^-comp\\."
349 ;        "news.comp.SCORE"
350 ;        "news.SCORE")
351 ;       ("^-"
352 ;        "news.SCORE")))
353
354 ;; rule for auto refile.
355 ;(setq wl-refile-rule-alist
356 ;      '(
357 ;       ("x-ml-name"
358 ;        ("^Wanderlust" . "+wl")
359 ;        ("^Elisp" . "+elisp"))
360 ;       ("From"
361 ;        ("foo@example\\.com" . "+foo"))))
362
363 ;; Marks to skip auto-refile (default is "N" "U" "!").
364 ;; nil means all message is auto-refiled.
365 ;(setq wl-summary-auto-refile-skip-marks nil)
366
367 ;;; dot.wl ends here