;; pop3-fma.el.el --- POP3 for Multiple Account for Gnus.
;; Copyright (C) 1996,97,98 Free Software Foundation, Inc. , Tatsuya Ichikawa
+;; Yasuo Okabe
;; Author: Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
-;; Version: 0.13
+;; Yasuo OKABE <okabe@kuis.kyoto-u.ac.jp>
+;; Version: 0.20
;; Keywords: mail , gnus , pop3
;;
;; SPECIAL THANKS
;; Keiichi Suzuki <kei-suzu@mail.wbs.or.jp>
;; Katsumi Yamaoka <yamaoka@jpl.org>
;;
-;; This file is part of GNU Emacs.
+;; This file is not part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;;; Commentary:
;;
+;; Note.
+;;
+;; This file store pop3 password in variable "pop3-fma-password".
+;; Please take care by yourself to treat pop3 password.
;;
;; How to use.
;;
;; add your .emacs following codes.
;;
-;; (autoload 'pop3-fma-set-pop3-password "pop3-fma")
+;; (require 'pop3-fma)
;; (setq pop3-fma-spool-file-alist
;; '(
;; "po:username0@mailhost0.your.domain0"
(` (defvar (, symbol) (, value) (, doc))))
)
+(unless (and (fboundp 'pop3-fma-encode-string)
+ (fboundp 'pop3-fma-decode-string))
+ (require 'mel-b)
+ (fset 'pop3-fma-encode-string 'base64-encode-string)
+ (fset 'pop3-fma-decode-string 'base64-decode-string))
+
(defgroup pop3-fma nil
"Multile POP3 account utility for Gnus."
:prefix "pop3-fma-"
:group 'mail
:group 'news)
-(defconst pop3-fma-version-number "0.13")
+(defconst pop3-fma-version-number "0.20")
(defconst pop3-fma-codename
;; "Feel the wind" ; 0.10
;; "My home town" ; 0.11
;; "On the road" ; 0.12
- "Rock'n Roll city" ; 0.13
-;; "Money" ; 0.xx
+;; "Rock'n Roll city" ; 0.13
+ "Money" ; 0.20
;; "Midnight blue train" ; 0.xx
;; "Still 19" ; 0.xx
;; "J boy" ; 0.xx
(defvar passwd nil)
(defvar str nil)
(defvar pop3-fma-movemail-options pop3-fma-movemail-arguments)
-(defvar pop3-fma-cypher-key (1+ (random 92)))
-
-(defun pop3-fma-init-hooks ()
- (add-hook 'message-send-hook 'pop3-fma-message-add-header))
(eval-after-load "message"
- '(pop3-fma-init-hooks))
-
+ '(lambda ()
+ (add-hook 'message-send-hook 'pop3-fma-message-add-header)))
(add-hook 'gnus-after-exiting-gnus-hook
'(lambda () (setq pop3-fma-password nil)))
(add-hook 'gnus-before-startup-hook 'pop3-fma-set-pop3-password)
+
;;
;;
;; Gnus POP3 additional utility...
;;
(defun pop3-fma-read-passwd (mailhost)
(setq passwd (nth 2 (assoc mailhost pop3-fma-password)))
- (pop3-fma-cypher-string passwd nil t))
+ (pop3-fma-decode-string passwd))
(setq pop3-read-passwd 'pop3-fma-read-passwd)
;;
(list
pop3-mailhost
pop3-maildrop
- (pop3-fma-cypher-string passwd)))))
+ (pop3-fma-encode-string passwd)))))
(setcar (cdr (cdr (assoc pop3-mailhost pop3-fma-password)))
- passwd))
+ (pop3-fma-encode-string passwd)))
(message "POP password registered.")
- passwd)
+ (pop3-fma-encode-string passwd))
;;
;;;###autoload
(defun pop3-fma-set-pop3-password()
(setq hdr (concat str "\n"))
(insert-string hdr)))))
;;
-;; Crypt password string
-;;
-(defun pop3-fma-cypher-string (string &optional key flag)
- (let ((r nil)
- (i 0)
- (rot (if flag (- 94 (or key pop3-fma-cypher-key 13))
- (or key pop3-fma-cypher-key 13))))
- (mapcar (lambda (x)
- (setq r
- (concat r
- (cond
- ((and (<= 32 x) (<= x 126))
- (char-to-string
- (+ (% (+ (- x 32)
- (if flag
- (+ rot (- 94 i))
- (+ rot i)))
- 94) 32)))
- (t (char-to-string x)))))
- (setq i (1+ i)))
- (string-to-char-list string))
- r))
-;;
(provide 'pop3-fma)
;;
;; pop3-fma.el ends here.