From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3104 Path: news.gmane.org!not-for-mail From: Daniel Hofmann Newsgroups: gmane.emacs.gnus.user Subject: Re: Expire to "Sender" - Group Date: Sun, 19 Oct 2003 14:00:06 +0200 Message-ID: <861xt98mk9.fsf@gmx.de> References: <86ekzdu1ni.fsf@shadowprint.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669312 17637 80.91.229.2 (31 Jan 2006 01:01:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:01:52 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:42 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!feed.news.nacamar.de!fu-berlin.de!uni-berlin.de!p3ee00ec8.dip0.t-ipconnect.DE!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: p3ee00ec8.dip0.t-ipconnect.de (62.224.14.200) Original-X-Trace: news.uni-berlin.de 1066564765 27951950 62.224.14.200 (16 [167504]) X-Orig-Path: 127.0.0.1!nobody User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:geXmIgUv9NoL+P9syzzXRla/zmQ= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:3245 Original-Lines: 40 X-Gnus-Article-Number: 3245 Tue Jan 17 17:31:42 2006 Xref: news.gmane.org gmane.emacs.gnus.user:3104 Archived-At: Lars Magne Ingebrigtsen writes: > Daniel Hofmann writes: > >> is there a way to expire mail to a group with the name of the >> sender? > > Probably... you need to write a function to pick out the name from > the From header, and use that as the group name. Thanks for your reply. I already fixed it that way and it works good for me. I post that snippet here. Perhaps it is useful for somebody else and perhaps someone more experienced in emacs lisp will find some bug or something ... Daniel. (defun my-expiry-target(myparam) (if (message-news-p) (concat "nnml:" (downcase(message-fetch-field "newsgroups"))) (if (string-match gnus-ignored-from-addresses (downcase(message-fetch-field "from"))) (concat "nnml:" (nth 1 (mail-extract-address-components (downcase(message-fetch-field "to"))))) (concat "nnml:" (nth 1 (mail-extract-address-components (downcase(message-fetch-field "from"))))) ) ) ) (setq nnmail-expiry-target 'my-expiry-target)