Spooky MIME Separators

The idea here is to use spook to generate interesting, but random, MIME separators. Hopefully this will keep the CIA, FBI, RAW and other assorted TLAs busy. This bit of code can only be used with MML. Emacs MUAs that use MML, like MH-E and Gnus, will be able to use this.

(setq mml-boundary-function 'sa2-spooky-boundary-function)

(defun sa2-spooky-boundary-function (count)
  "Use `spook' to generate CIA compliant MIME separators.
Argument COUNT isn't used."
  (with-temp-buffer
    (spook)
    (goto-char (point-min))
    (while (re-search-forward "[^a-zA-Z0-9]" nil t)
      (replace-match "_"))
    (goto-char (point-min))
    (forward-char 23)
    (while (not (char-equal (char-after) ?\_))
      (forward-char))
    (concat "=="
            (buffer-substring (1+ (point-min)) (point))
            (format "_%d==" (abs (random))))))

Satyaki Das
Last modified: Sun May 11 11:11:06 PDT 2003