Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Expire to "Sender" - Group
       [not found] <86ekzdu1ni.fsf@shadowprint.de>
@ 2003-10-16 17:54 ` Lars Magne Ingebrigtsen
  2003-10-19 12:00   ` Daniel Hofmann
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-16 17:54 UTC (permalink / raw)


Daniel Hofmann <usenet@shadowprint.de> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Expire to "Sender" - Group
  2003-10-16 17:54 ` Expire to "Sender" - Group Lars Magne Ingebrigtsen
@ 2003-10-19 12:00   ` Daniel Hofmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Hofmann @ 2003-10-19 12:00 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Daniel Hofmann <usenet@shadowprint.de> 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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-19 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <86ekzdu1ni.fsf@shadowprint.de>
2003-10-16 17:54 ` Expire to "Sender" - Group Lars Magne Ingebrigtsen
2003-10-19 12:00   ` Daniel Hofmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).