[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archive ideas?



I work from three different machines (in different administrative
domains) but do all my email and news reside on a single machine.  The 
following checks if I'm on one of the "remote" machines and if so
changes all the key variables to use a EFS (or ange-ftp) path:

    (let ((top "~/Private/"))
      (when (string-match "ware\\|nowlab\\|bogart\\|quintain\\|localhost" (system-name) )
	  (setq nnmail-movemail-program 'rmovemail)
	  (setq top (concat "/ware@gold.cis.ohio-state.edu:" top))
	  (add-hook 'nntp-server-opened-hook 'nntp-send-authinfo-and-save)
	  (add-hook 'gnus-get-new-news-hook 're-read-nnmail-directory)
	  )
      (setq gnus-startup-file (concat top ".newsrc"))
      (setq nnmail-crash-box (concat top ".gnus-crash-box"))
      (setq nnml-directory (concat top "mail/"))
      (setq nnmh-directory (concat top "mail/"))
      (setq nndraft-directory (concat top "mail/drafts"))
      (setq nnml-active-file (concat nnml-directory "active"))
      (setq gnus-directory (concat top "News"))
      (setq gnus-kill-files-directory gnus-directory)
      (setq gnus-article-save-directory (concat top "mail/archive"))
      (setq nnimap-directory (concat top "Mail"))
      (setq nnmail-delete-incoming t)
      ;; I have a ~/.procmailrc file that insures all mail is delivered into
      ;; the following  directory.
      (setq nnmail-procmail-directory (concat top "mail/incoming/"))
      (setq nnfolder-directory (concat top "NNFOLDER"))
      (setq my-archive-file (concat top "Archive/active"))
      (setq my-archive-directory (concat top "Archive"))
      (setq gnus-message-archive-method
	    (list 'nnfolder "archive"
		  ;'(nnfolder-get-new-mail nil)
		  '(nnfolder-inhibit-expiry t)
		  (list 'nnfolder-active-file my-archive-file)
		  (list 'nnfolder-directory my-archive-directory)))
      (setq gnus-message-archive-group
	    (concat "mail." (format-time-string
			     "%Y-%m" (current-time))))
      )