Function: message-bogus-recipient-p

message-bogus-recipient-p is a byte-compiled function defined in message.el.gz.

Signature

(message-bogus-recipient-p RECIPIENTS)

Documentation

Check if a mail address in RECIPIENTS looks bogus.

RECIPIENTS is a mail header. Return a list of potentially bogus addresses. If none is found, return nil.

An address might be bogus if there's a matching entry in message-bogus-addresses.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-bogus-recipient-p (recipients)
  "Check if a mail address in RECIPIENTS looks bogus.

RECIPIENTS is a mail header.  Return a list of potentially bogus
addresses.  If none is found, return nil.

An address might be bogus if there's a matching entry in
`message-bogus-addresses'."
  ;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"?
  (let (found)
    (mapc (lambda (address)
	    (setq address (or (cadr address) ""))
	    (when (or (string= "" address)
		      (and message-bogus-addresses
			   (let ((re
				  (if (listp message-bogus-addresses)
				      (mapconcat #'identity
						 message-bogus-addresses
						 "\\|")
				    message-bogus-addresses)))
			     (string-match re address))))
              (push address found)))
	  (mail-extract-address-components recipients t))
    found))