Function: feedmail-default-message-id-generator
feedmail-default-message-id-generator is a byte-compiled function
defined in feedmail.el.gz.
Signature
(feedmail-default-message-id-generator MAYBE-FILE)
Documentation
Default function for generating Message-Id: header contents.
Based on a date and a sort of random number for tie breaking. Unless
feedmail-message-id-suffix is defined, uses user-mail-address, so be
sure it's set. If both are nil, creates a quasi-random suffix that is
probably not appropriate for you.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/feedmail.el.gz
(nth 3 feedmail-date-generator))))) ; folding
(defun feedmail-default-message-id-generator (maybe-file)
"Default function for generating Message-Id: header contents.
Based on a date and a sort of random number for tie breaking. Unless
`feedmail-message-id-suffix' is defined, uses `user-mail-address', so be
sure it's set. If both are nil, creates a quasi-random suffix that is
probably not appropriate for you."
(feedmail-say-debug ">in-> feedmail-default-message-id-generator %s"
maybe-file)
(let ((date-time)
(system-time-locale "C")
(end-stuff (if feedmail-message-id-suffix feedmail-message-id-suffix user-mail-address)))
(if (not end-stuff) (setq end-stuff (format "%d.example.com" (random))))
(if (string-match "^\\(.*\\)@" end-stuff)
(setq end-stuff
(concat (if (equal (match-beginning 1) (match-end 1)) "" "-") end-stuff))
(setq end-stuff (concat "@" end-stuff)))
(if (and (not feedmail-queue-use-send-time-for-message-id) maybe-file)
(setq date-time (file-attribute-modification-time
(file-attributes maybe-file))))
(format "<%d-%s%s%s>"
(mod (random) 10000)
(format-time-string "%a%d%b%Y%H%M%S" date-time)
(feedmail-rfc822-time-zone date-time)
end-stuff))
)