1 ;;; elmo-vars.el -- User variables for ELMO.
3 ;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
34 (defun-maybe dynamic-link (a))
35 (defun-maybe dynamic-call (a b)))
38 (defconst elmo-version "1.1.2")
39 (defconst elmo-appname "ELMO")
41 (defun elmo-version ()
42 (format "%s/%s" elmo-appname elmo-version))
45 (defvar elmo-default-imap4-mailbox "inbox"
46 "*Default IMAP4 mailbox.")
47 (defvar elmo-default-imap4-server "localhost"
48 "*Default IMAP4 server.")
49 (defvar elmo-default-imap4-authenticate-type "auth"
50 "*Default Authentication type for IMAP4.") ; "auth" or "login"
51 (defvar elmo-default-imap4-user (or (getenv "USER")
54 "*Default username for IMAP4")
55 (defvar elmo-default-imap4-port 143
56 "*Default Port number of IMAP.")
57 (defvar elmo-default-imap4-ssl nil
58 "*Non-nil forces using SSL by default.")
61 (defvar elmo-default-pop3-user (or (getenv "USER")
64 "*Default username for POP3")
65 (defvar elmo-default-pop3-server "localhost"
66 "*Default POP3 server.")
67 (defvar elmo-default-pop3-authenticate-type "user"
68 "*Default Authentication type for POP3") ; "apop" or "user"
69 (defvar elmo-default-pop3-port 110
70 "*Default POP3 port.")
71 (defvar elmo-default-pop3-ssl nil
72 "*Non-nil forces using SSL by default.")
75 (defvar elmo-default-nntp-server "localhost"
76 "*Default NNTP server.")
77 (defvar elmo-default-nntp-user nil
78 "*Default User of NNTP. nil means no user authentication.")
79 (defvar elmo-default-nntp-port 119
80 "*Default Port number of NNTP")
81 (defvar elmo-default-nntp-ssl nil
82 "*Non-nil forces using SSL by default.")
84 (defvar elmo-localdir-folder-path "~/Mail"
85 "*Local mail folder path.")
86 (defvar elmo-localnews-folder-path "~/News"
87 "*Local news folder path.")
88 (defvar elmo-maildir-folder-path "~/Maildir"
89 "*Maildir folder path.")
90 (defvar elmo-maildir-list '("\\+~/Maildir")
91 "*All Folders that match this list will be treated as Maildir.
92 Each elements are regexp of folder name (This is obsolete).")
93 (defvar elmo-msgdb-dir "~/.elmo"
94 "*ELMO Message Database path.")
95 (defvar elmo-passwd-alist-file-name "passwd"
96 "*ELMO Password filename.")
97 (defvar elmo-warning-threshold 30000
98 "*Display warning when the bytes of message exceeds this value.")
99 (defvar elmo-msg-appended-hook nil
100 "A hook called when message is appended to database.")
101 (defvar elmo-msg-deleted-hook nil
102 "A hook called when message is deleted from database")
103 (defvar elmo-nntp-post-pre-hook nil
104 "A hook called just before the nntp posting.")
105 (defvar elmo-lang "ja"
106 "Language for displayed messages.")
108 (defvar elmo-mime-charset 'iso-2022-jp)
109 (defvar elmo-search-mime-charset 'iso-2022-jp)
111 (defvar elmo-msgdb-mark-filename "mark"
113 (defvar elmo-msgdb-overview-filename "overview"
114 "Overview database.")
115 (defvar elmo-msgdb-number-filename "number"
116 "Message number <=> Message-ID database.")
117 (defvar elmo-msgdb-location-filename "location"
118 "Message number <=> Actual location symbol.")
119 (defvar elmo-msgdb-seen-filename "seen"
120 "Seen message list for append.")
121 (defvar elmo-msgdb-killed-filename "killed"
122 "Deleted messages... contains elmo-killed-msgs-list.")
123 (defvar elmo-msgdb-validity-filename "validity")
124 (defvar elmo-msgdb-flist-filename "flist"
125 "Folder list cache (for access folder).")
126 (defvar elmo-msgdb-finfo-filename "finfo"
127 "Folder information cache...list of '(filename . '(new unread all)).")
128 (defvar elmo-msgdb-append-list-filename "append"
129 "Appended messages...Structure is same as number-alist.
130 For disconnected operations.")
131 (defvar elmo-msgdb-resume-list-filename "resume"
132 "Resumed messages. For disconnected operations.")
133 (defvar elmo-msgdb-lock-list-filename "lock"
134 "Locked messages...list of message-id.
135 For disconnected operations.")
136 (defvar elmo-msgdb-global-mark-filename "global-mark"
137 "Alist of global mark .")
138 (defvar elmo-lost+found-folder "+lost+found"
140 (defvar elmo-crosspost-alist-filename "crosspost-alist"
141 "Alist of crosspost messages.")
143 (defvar elmo-use-server-diff t
144 "Non-nil forces to get unread message information on server.")
146 (defvar elmo-imap4-disuse-server-flag-mailbox-regexp "^#mh" ; UW imapd
147 "If mailbox name matches this value, flags on server are not used except
150 (defvar elmo-msgdb-extra-fields nil
151 "Extra fields for msgdb.")
153 (defvar elmo-queue-filename "queue"
154 "*IMAP pending event queue is saved in this file.")
155 (defvar elmo-enable-disconnected-operation nil
156 "*Enable disconnected operations.")
158 (defvar elmo-imap4-overview-fetch-chop-length 200
159 "*Number of overviews to fetch in one request in imap4.")
160 (defvar elmo-nntp-overview-fetch-chop-length 200
161 "*Number of overviews to fetch in one request in nntp.")
162 (defvar elmo-localdir-header-chop-length 2048
163 "*Number of bytes to get header in one reading from file.")
164 (defvar elmo-imap4-force-login nil
165 "*Non-nil forces to try 'login' if there is no 'auth' capability in imapd.")
166 (defvar elmo-imap4-use-select-to-update-status nil
167 "*Some imapd have to send select command to update status.
168 (ex. UW imapd 4.5-BETA?). For these imapd, you must set this variable t.")
170 (defvar elmo-imap4-use-modified-utf7 nil
171 "*Use mofidied UTF-7 (rfc2060) encoding for IMAP4 folder name.")
173 (defvar elmo-auto-change-plugged 600
174 "*Time to expire change plugged state automatically,
175 as the number of seconds. Don't change plugged state automatically if nil.")
177 (defvar elmo-plugged-condition 'one
178 "*The condition for `elmo-plugged' becomes on.
179 If `all', when all port is on. If `one', when even one port is on.
180 If `independent', independent port plugged.
181 If function, return value of function.")
183 (defvar elmo-plug-on-servers nil)
185 (defvar elmo-plug-on-exclude-servers
188 (and (string-match "[^.]+" (system-name))
189 (substring (system-name) 0 (match-end 0)))))
191 (defvar elmo-plugged-alist nil)
193 (defvar elmo-dop-flush-confirm t
194 "*Flush disconnected operations queue with confirmation.")
196 (defvar elmo-path-sep "/"
198 (defvar elmo-plugged t)
199 (defvar elmo-use-semi nil)
200 (defvar elmo-no-subject "(No Subject in original.)"
201 "*A string used when no subject field exists.")
202 (defvar elmo-no-from "nobody@nowhere?"
203 "*A string used when no from field exists.")
205 (defvar elmo-multi-divide-number 100000
206 "*Multi divider number.")
208 ;;; User variables for elmo-archive.
209 (defvar elmo-archive-default-type 'zip
210 "*Default archiver type. The value must be a symbol.")
212 ;; database dynamic linking
213 (defvar elmo-database-dl-module
214 (expand-file-name "database.so" exec-directory))
216 (defvar elmo-database-dl-handle
217 (if (and (fboundp 'dynamic-link)
219 elmo-database-dl-module))
220 (if (fboundp 'open-database)
222 (dynamic-link elmo-database-dl-module))))
224 (if (and elmo-database-dl-handle
225 (integerp elmo-database-dl-handle))
226 (dynamic-call "emacs_database_init" elmo-database-dl-handle))
228 (defvar elmo-use-database (or (featurep 'dbm)
231 (featurep 'berkeley-db)
232 ;; static/dl-database
233 (fboundp 'open-database)))
235 (defvar elmo-date-match (not (boundp 'nemacs-version))
236 "Date match is available or not")
238 (defconst elmo-spec-alist
251 (defvar elmo-debug nil)
252 (defconst mmelmo-entity-buffer-name "*MMELMO-BUFFER*")
254 (defvar elmo-folder-info-hashtb nil
255 "Array of folder database information '(max length new unread).")
257 (defvar elmo-crosspost-message-alist nil
258 "List of crosspost message.")
260 (defvar elmo-cache-expire-default-method "size"
261 "Default expiration method.")
263 (defvar elmo-cache-expire-default-size 30000
264 "Cache expiration disk size (Kilo bytes). This must be float value.")
266 (defvar elmo-cache-expire-default-age 50
267 "Cache expiration age (days).")
268 (defvar elmo-cache-dirname "cache"
269 "Directory name for cache storage.")
271 (defvar elmo-use-buffer-cache t
274 (defvar elmo-buffer-cache-size 10
275 "*Number of buffer for message cache.")
277 (defvar elmo-pack-number-check-strict t
278 "Pack number strictly.")
280 (defvar elmo-have-link-count
282 ;; OS/2: EMX always returns the link count "1" :-(
283 (or (memq system-type '(OS/2 emx))
284 ;; Meadow seems to have pseudo link count.(suggestion by S.YAMAGUCHI)
285 (and (eq system-type 'windows-nt) (not (featurep 'meadow)))))
286 "Your file system has link count, or not.")
288 (defvar elmo-weekday-name-en '["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"])
289 (defvar elmo-weekday-name-ja '["
\e$BF|
\e(B" "
\e$B7n
\e(B" "
\e$B2P
\e(B" "
\e$B?e
\e(B" "
\e$BLZ
\e(B" "
\e$B6b
\e(B" "
\e$BEZ
\e(B"])
290 (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
291 (defvar elmo-weekday-name-de '["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"])
293 (defvar elmo-msgid-replace-string-alist
304 (defvar elmo-archive-use-cache nil
305 "Use cache in archive folder.")
307 (defvar elmo-nntp-use-cache t
308 "Use cache in nntp folder.")
310 (defvar elmo-imap4-use-cache t
311 "Use cache in imap4 folder.")
313 (defvar elmo-pop3-use-cache t
314 "Use cache in pop3 folder.")
316 (defvar elmo-localdir-lockfile-list nil)
318 (defvar elmo-nntp-max-number-precedes-list-active nil
319 "If non-nil, max number of the msgdb is set as the max number of
320 'list active' (needed for inn 2.3 or later?). ")
322 (defvar elmo-pop3-send-command-synchronously nil
323 "If non-nil, commands are send synchronously.
324 If server doesn't accept asynchronous commands, this variable should be
329 ;;; elmo-vars.el ends here