From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/7622 Path: main.gmane.org!not-for-mail From: dubach1@husc.harvard.edu (Joev Dubach) Newsgroups: gmane.emacs.gnus.general Subject: Re: Crosspost complaint command Date: 16 Aug 1996 14:48:36 -0400 Sender: dubach1@husc.harvard.edu Message-ID: References: Reply-To: dubach1@husc.harvard.edu NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035147909 7911 80.91.224.250 (20 Oct 2002 21:05:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:05:09 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id MAA07711 for ; Fri, 16 Aug 1996 12:02:55 -0700 Original-Received: from husc.harvard.edu (root@husc.harvard.edu [140.247.30.45]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id ; Fri, 16 Aug 1996 20:48:49 +0200 Original-Received: from scws27.harvard.edu by husc.harvard.edu with ESMTP id OAA31250 Original-Received: by scws27.harvard.edu with id OAA13780 Original-To: Lars Magne Ingebrigtsen In-Reply-To: Lars Magne Ingebrigtsen's message of 12 Aug 1996 05:13:42 +0200 Original-Lines: 100 X-Mailer: Gnus v5.2.25/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:7622 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:7622 Lars Magne Ingebrigtsen writes: > I've added a new command to send complaints on excessive crossposting > to Red Gnus 0.11 -- `S M-c'. (Process/prefixed, etc.) Unsolicited email has been annoying me more lately, so I hacked up a bit of elisp to do something with it; perhaps you'd like to include it, or something like it, in Red Gnus? The main difference between it and the way you deal with bad news is that I prefer to forward rather than reply to a mail message so as to preserve the headers for the benefit of tracking forgery. Caveats: I haven't used it a lot, it's not very configurable, and I didn't quite manage to disable the courtesy-message (since it's posted to news.admin.net-abuse.misc as a coincidence to its being emailed, rather than vice-versa, it'd be nice to not claim that it's being emailed as a courtesy). ---- ~/.junk-mail-complaint begins ---- I received the following unsolicited email spam from you. This behavior is unacceptable, and I hope you will do everything in your power to ensure that it does not reoccur. I am cc'ing this message to the postmaster and abuse accounts at your site on the basis that they may be interested in preventing anti-social behavior at your site; I am cc'ing it to my own postmaster on the basis that they may be interested in preventing similar actions from harming their system and users; and I am posting it to news.admin.net-abuse.misc on the basis that it is the appropriate newsgroup for net abuse notifications and discussion. Thanks, Joev ---- ~/.junk-mail-complaint ends ---- ---- junk-mail-complain.el begins ---- ;; junk-mail-complain.el ;; Joev Dubach . (defun do-nothing-to-original ()) (defvar temp-courtesy-message nil) (defun cleanup-courtesy-message () (setq message-courtesy-message temp-courtesy-message) (remove-hook 'message-sent-hook 'cleanup-courtesy-message)) (defun junk-mail-complain-with-file (fname) "Compose mail to the originator of a message, the postmaster at his site, and the abuse address at his site. The named file will be inserted before the forwarded copy of his article." (interactive "f") (gnus-summary-reply) (setq temp-courtesy-message message-courtesy-message) (setq message-courtesy-message nil) (add-hook 'message-sent-hook 'cleanup-courtesy-message) (message-goto-to) (search-backward "@") (forward-char 1) ; set point to start of domain name (re-search-forward "[-a-zA-Z0-9\\.]+") ; search for end of domain name (let ((dom (buffer-substring (match-beginning 0) (match-end 0)))) (message-goto-cc) (insert "postmaster@") (insert dom) (insert ",abuse@") (insert dom) (insert ",postmaster@fas.harvard.edu")) (message-goto-newsgroups) (insert "news.admin.net-abuse.misc") (message-goto-body) ;; Make sure we're at the start of the line. (unless (eolp) (insert "\n")) ;; Narrow to the area we are to insert. (narrow-to-region (point) (point)) (insert-file fname) (goto-char (point-max)) ;; Insert the separators and the forwarded buffer. (insert message-forward-start-separator) (let ((message-cite-function 'do-nothing-to-original)) (message-yank-original)) (goto-char (point-max)) (insert message-forward-end-separator) (widen) (message-goto-body)) (defun junk-mail-complain-standard () "Compose a junk mail complaint containing the standard response in .junk-mail-complaint." (interactive) (junk-mail-complain-with-file (expand-file-name "~/.junk-mail-complaint"))) ---- junk-mail-complain.el ends ---- Joev "Use with extreme caution, and don't come crying to me when you discover that the regexp you used matched the wrong group and all your important mail has disappeared. Be a *man*! Or a *woman*! Whatever you feel more comfortable with! So there!" -- Lars Ingebrigtsen, on Gnus mail-reading features