Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* bbdb and storing emails
@ 2009-01-24 21:53 Richard Riley
  2009-01-25  1:33 ` Dan Griswold
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Riley @ 2009-01-24 21:53 UTC (permalink / raw)
  To: info-gnus-english


Anyone have something which enables me to configure sent/received
folders for specific bbdb entries after I tag them as "archive
addresses" for example?

e.g

I tag John Smitt with a "archive" field in the bbdb and then I have a
John Smith/{sent,received }folder?


I already use procmail so could theoretically use that but it means
messing with system files on my mailserver. Ideally I would manage it
from my bbdb.

Or can someone recommend something else to achieve the same affect?

-- 
 important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday.  ~Dennis Gabor, Innovations:  Scientific, Technological and Social, 1970

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

* Re: bbdb and storing emails
  2009-01-24 21:53 bbdb and storing emails Richard Riley
@ 2009-01-25  1:33 ` Dan Griswold
  2009-01-25 10:44 ` David
       [not found] ` <mailman.5722.1232880286.26697.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Griswold @ 2009-01-25  1:33 UTC (permalink / raw)
  To: info-gnus-english

I accomplished this by defining advice to certain key functions
involved with bbdb and mail.

Like so:

/--------------- begin code snippet

(defvar hold nil
  "Variable for keeping default value of gnus-message-archive-group")


(defadvice bbdb-send-mail (before dmg-change-gcc activate)
  (if (string-equal (buffer-name) "*BBDB*")
      (let ((gcc (save-excursion
		   (set-buffer bbdb-buffer-name)
		   (bbdb-record-getprop (bbdb-current-record) 'gnus-private))))
	(print gcc)
	(if gcc (progn
		  (setq hold gnus-message-archive-group)
		  (setq gnus-message-archive-group (concat "nnml:" gcc))
		  ))
    )
))

(defadvice gnus-inews-insert-archive-gcc (after dmg-reset-gcc activate)
  (setq gnus-message-archive-group hold)
  (setq hold nil))

(ad-activate 'bbdb-send-mail)
(ad-activate 'gnus-inews-insert-archive-gcc)

\----------------- end code snippet

To use this, I make sure a bbdb record has the gnus-private field set
to the nnml folder I want for that individual. As a result, not only
will mail from that person get stored in that folder, but so too will
mail sent to that person, provided I execute bbdb-send-mail on that
record (`m' in the *BBDB* buffer).

If you want to use a different bbdb field besides gnus-private, simply
replace `gnus-private' with the name of the field you desire.

HTH,

Dan

-- 
--------------
Dan Griswold
Rochester, NY
--------------

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

* Re: bbdb and storing emails
  2009-01-24 21:53 bbdb and storing emails Richard Riley
  2009-01-25  1:33 ` Dan Griswold
@ 2009-01-25 10:44 ` David
       [not found] ` <mailman.5722.1232880286.26697.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: David @ 2009-01-25 10:44 UTC (permalink / raw)
  To: info-gnus-english

Richard Riley <rileyrgdev@gmail.com> writes:
> I already use procmail so could theoretically use that but it means
> messing with system files on my mailserver. Ideally I would manage it
> from my bbdb.

You can use the gnus-private field to split mails according to the field
gnus-private:

http://www.emacswiki.org/emacs/SplitMailUsingBbdb

Since I retired Gnus mail splitting in favor of procmail on my mail
server, I'm now happily using this

http://www-verimag.imag.fr/~moy/emacs/niko-bbdb-split.el

to generate procmail rules based on the BBDB gnus-private
fields. Together with Tramp, it automatically creates a procmail rules
file on the mail server via ssh, which is included in my .procmailrc.

-David

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

* Re: bbdb and storing emails
       [not found] ` <mailman.5722.1232880286.26697.info-gnus-english@gnu.org>
@ 2009-01-26  7:36   ` Richard Riley
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Riley @ 2009-01-26  7:36 UTC (permalink / raw)
  To: info-gnus-english

David <de_bb@arcor.de> writes:

> Richard Riley <rileyrgdev@gmail.com> writes:
>> I already use procmail so could theoretically use that but it means
>> messing with system files on my mailserver. Ideally I would manage it
>> from my bbdb.
>
> You can use the gnus-private field to split mails according to the field
> gnus-private:
>
> http://www.emacswiki.org/emacs/SplitMailUsingBbdb
>
> Since I retired Gnus mail splitting in favor of procmail on my mail
> server, I'm now happily using this
>
> http://www-verimag.imag.fr/~moy/emacs/niko-bbdb-split.el
>

***

> to generate procmail rules based on the BBDB gnus-private
> fields. Together with Tramp, it automatically creates a procmail rules
> file on the mail server via ssh, which is included in my .procmailrc.
>
> -David

***

I will look into it. Thanks.

But, a bit the worse for wear, I did laugh reading it (***). If one did not
have familiarity with things the buzz words would frighten someone off
this area for life :-;


-- 
 important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday.  ~Dennis Gabor, Innovations:  Scientific, Technological and Social, 1970

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

end of thread, other threads:[~2009-01-26  7:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24 21:53 bbdb and storing emails Richard Riley
2009-01-25  1:33 ` Dan Griswold
2009-01-25 10:44 ` David
     [not found] ` <mailman.5722.1232880286.26697.info-gnus-english@gnu.org>
2009-01-26  7:36   ` Richard Riley

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).