- ;; "@@NCM" in the subject.
- (when (string-match "@@NCM"
- (mail-header-subject (car headers)))
- (gnus-nocem-check-article group (car headers)))
- (setq headers (cdr headers)))))))
+ ;; "@@NCM" in the subject. Unless we already read
+ ;; this cross posted message. Nocem messages
+ ;; are not allowed to have references, so we can
+ ;; ignore scanning followups.
+ (and (string-match "@@NCM" (mail-header-subject header))
+ (and gnus-nocem-check-from
+ (let ((case-fold-search t))
+ (catch 'ok
+ (mapcar
+ (lambda (author)
+ (if (consp author)
+ (setq author (car author)))
+ (if (string-match
+ author (mail-header-from header))
+ (throw 'ok t)))
+ gnus-nocem-issuers)
+ nil)))
+ (or gnus-nocem-liberal-fetch
+ (and (or (string= "" (mail-header-references
+ header))
+ (null (mail-header-references header)))
+ (not (member (mail-header-message-id header)
+ gnus-nocem-seen-message-ids))))
+ (push header check-headers)))
+ (let* ((i 0)
+ (check-headers
+ (last check-headers gnus-nocem-check-article-limit))
+ (len (length check-headers)))
+ (dolist (h check-headers)
+ (gnus-message
+ 7 "Checking article %d in %s for NoCeM (%d of %d)..."
+ (mail-header-number h) group (incf i) len)
+ (gnus-nocem-check-article group h)))))))