From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: keybinding mystery Date: Sat, 06 Oct 2007 14:16:43 +0200 Organization: T-Online Message-ID: References: <4705f592$0$3198$8404b019@news.wineasy.se> <87odfdyems.fsf@cadilhac.name> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1191674469 19788 80.91.229.12 (6 Oct 2007 12:41:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2007 12:41:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 14:41:07 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ie8xs-00040r-Q0 for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2007 14:41:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ie8xo-0007de-0V for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2007 08:41:00 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeedt0.toon.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-X-Trace: news.t-online.com 1191673012 03 32390 kVjl16XJaUzYbar 071006 12:16:52 Original-X-Complaints-To: usenet-abuse@t-online.de X-ID: TlDUb-ZbYe-vWYltf7YEtwcjElGL2LyQKlLUGiDPTR5Vg3HDhpR-Ey X-Face: /U7=m^"/-Dn61mAl{g9e3>\G5Tp,oEX|V)g2I1hBk\ML; )7A?6cmB-y7y?'NA^J<=oz7syB =(McAwIHgLX!.B?R3X}98d@?>CrT094KLWh]WU4gDpnL/")MS(XoQTv`Oq225uL>+; CpPXo$N5e>N> $tPd-gbB^F{gQS#1ase]XO~D4p4M"3+F-7~u]dy3I?Pb8RO*H-EFeWDUf?Rf, d]pv\Jvh2Cht!A=im yKAS2Z%Ao^;}W/qzMvMm Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:GIjY7ygep65+4N0PjWv2BOF7/Zw= Original-Xref: shelby.stanford.edu gnu.emacs.help:152647 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48155 Archived-At: On Fri, Oct 05 2007, Michaël Cadilhac wrote: > please, if you use a spam mail address, Which should be something like "@invalid.invalid" instead of "@for.email". > use a proper mail header to ask people not to include this address > when replying (e.g., setting the Mail-Followup-To header). Here's some code to warn when composing/sending mail to bogus addresses. I don't use it myself, but if it works, we could include it in Gnus (message.el). --8<---------------cut here---------------start------------->8--- (defvar rs-message-spamtrap-regexp "noreply\\|nospam\\|invalid") (defun rs-message-check-spamtrap () "Warn before composing or sending a mail to an invalid address." (let ((to (save-restriction (message-narrow-to-headers) (message-fetch-field "To")))) (when (and (stringp to) (setq to (cadr (gnus-extract-address-components to))) (or (not (string-match (concat "\\(" message-valid-fqdn-regexp "\\)\\'") to)) (string-match rs-message-spamtrap-regexp to))) (unless (y-or-n-p (format "Warning: Address `%s' might be bogus. Continue? " to)) (error "Bogus address."))))) ;; Check before composing: (add-hook 'message-setup-hook 'rs-message-check-spamtrap) ;; Check before sending: (add-hook 'message-send-mail-hook 'rs-message-check-spamtrap) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/