Rename the function, and change it so that it updates a variable rather
than just returns the result. This will make it easier to produce other
kinds of reports later.
"=" "\\(" "\\S-+" "\\)" ; mailbox tag
"\\(" "$" "\\|" "\\s-" "\\)"))
-(defun mdw-odin-splits ()
+(defvar mdw-odin-splits nil)
+
+(defun mdw-update-odin-info ()
(let ((list nil))
(with-temp-buffer
(call-process "ssh" nil t nil
,(format "crap.%s" tag))
list)))
(forward-line)))
- (nreverse list)))
+ (setq mdw-odin-splits (nreverse list))))
+(mdw-update-odin-info)
;; The actual splitting rules.
(setq nnmail-split-fancy
(to "\\<mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
(to "\\(markw\\|mdw\\|mw\\)@odin\\.gg" "mail.misc")
- ,@(mdw-odin-splits)
+ ,@mdw-odin-splits
(to "\\([a-z0-9]+\\)@odin\\.gg" "crap.odin-misc")
;; Regular nags.