(setq gnus-select-method '(nnml "")) (setq user-full-name "Matthew Dockrey") (setq user-mail-address "gfish@u.washington.edu") (setq smtpmail-default-smtp-server "localhost") (setq smtpmail-local-domain nil) (setq send-mail-function 'smtpmail-send-it) (setq message-send-mail-function 'smtpmail-send-it) (load-library "smtpmail") (load-library "message") (load-library "gnus-group") ;; Needed for gnus-group-list-all-groups :P (setq nnmail-split-methods '(("Seattle-Robotics-Society" "^Resent-From: srs-list@wipd.com") ("Niven-List" "^To:.*larryniven-l") ("Niven-List" "^Cc:.*larryniven-l") ("Wear-Hard" "^To:.*wear-hard@haven.org") ("Wear-Hard" "^Cc:.*wear-hard@haven.org") ("Northwest-Rocketry" ".*northwestrocketry@NorthwestRocketry.com") ("Lunarbot" "^To:.*Lunarbot") ("Lunarbot" "^Cc:.*Lunarbot") ("mrd@cs" "^To:.*mrd@cs") ("mrd@cs" "^Cc:.*mrd@cs") ("mrd@cs" "^To:.*urbansim") ("mrd@cs" "^Cc:.*urbansim") ("gfish@u" "^To:.*gfish@u") ("gfish@u" "^Cc:.*gfish@u") ("mrd@oz" "^To:.*mrd@oz") ("mrd@oz" "^Cc:.*mrd@oz") ("gfish@hesse" "^To:.*gfish@hesse") ("gfish@hesse" "^Cc:.*gfish@hesse") ("gfish@hesse" "^To:.*gfish@cyphertext") ("gfish@hesse" "^Cc:.*gfish@cyphertext") ("gfish@hesse" "^To:.*gfish@grendel") ("gfish@hesse" "^Cc:.*gfish@grendel") ("Spam-Catcher" "^To:.*spam") ("Spam-Catcher" "^From:.*sixdegrees") ("Iopener" "^To:.*iopener") ("Misc" ""))) (setq gnus-show-threads nil) ;; Turn off threading (gnus-group-list-all-groups) ;; Show all the groups, even empty ones (setq gnus-message-archive-group "sent-mail") ;; Save sent mail (setq gnus-ignored-headers "^References:\\|^Xref:") ;; Hide boring headers ;; Auto-scan still doesn't work :P (setq gnus-use-demon t) ;; Scan for newmail every minute (gnus-demon-add-handler 'gnus-demon-add-rescan 1 nil) (setq gnus-local-organization "Midgard Systems") (setq message-signature-file "~/.signature") (setq browse-url-browser-function 'browse-url-netscape) (define-key gnus-group-mode-map "n" 'gnus-group-next-group) (define-key gnus-group-mode-map "p" 'gnus-group-prev-group) (define-key gnus-summary-mode-map [delete] 'gnus-summary-delete-article) (define-key gnus-summary-mode-map "d" 'gnus-summary-mark-as-expirable) (define-key gnus-summary-mode-map "D" 'gnus-summary-expire-articles-now) (define-key gnus-summary-mode-map "s" 'gnus-summary-move-article) ;;=============================================================== ;; Multiple mailhost hacks ;;=============================================================== (setq gfish-tunnel-method "uw") ;; localhost:2525 -> mailhost.u.washington.edu:25 (defun gfish-tunnel-uw-smtp () (call-process "/home/gfish/bin/tunnel-saul-smtp" nil 0) (sleep-for 2) ) ;; localhost:2526 -> cs.washington.edu:25 (defun gfish-tunnel-cs-smtp () (call-process "/home/gfish/bin/tunnel-fiji-smtp" nil 0) (sleep-for 2) ) (add-hook 'message-send-hook (function (lambda () (cond ((string-match "uw" gfish-tunnel-method) (gfish-tunnel-uw-smtp)) ((string-match "cs" gfish-tunnel-method) (gfish-tunnel-cs-smtp))))) ) (defun gfish-send-default () (setq smtpmail-smtp-service 2525) (setq send-mail-function 'smtpmail-send-it) (setq message-send-mail-function 'smtpmail-send-it) (setq gfish-tunnel-method "uw") (setq user-mail-address "gfish@u.washington.edu") (setq message-signature-file "~/.signature") ) ;; Change the mail settings to send in different ways depending on group (add-hook 'gnus-select-group-hook (function (lambda () (cond ((string-match "mrd@cs" gnus-newsgroup-name) ;; Send through cs smtp (setq smtpmail-smtp-service 2526) (setq send-mail-function 'smtpmail-send-it) (setq message-send-mail-function 'smtpmail-send-it) (setq gfish-tunnel-method "cs") (setq user-mail-address "mrd@cs.washington.edu") (setq message-signature-file "~/.mrd-signature")) ((string-match "gfish@hesse" gnus-newsgroup-name) ;; Send through hesse sendmail (setq send-mail-function 'message-send-mail-with-sendmail) (setq message-send-mail-function 'message-send-mail-with-sendmail) (setq gfish-tunnel-method "nil") (setq user-mail-address "gfish@cyphertext.net") (setq message-signature-file "~/.signature")) ((string-match "Niven-List" gnus-newsgroup-name) ;; Send through hesse sendmail (setq send-mail-function 'message-send-mail-with-sendmail) (setq message-send-mail-function 'message-send-mail-with-sendmail) (setq gfish-tunnel-method "nil") (setq user-mail-address "gfish@cyphertext.net") (setq message-signature-file "~/.signature")) (t ;; Default to saul smtp (gfish-send-default)) )))) (add-hook 'gnus-exit-group-hook 'gfish-send-default) ;;=============================================================== ;; Setup the BBDB stuff. ;;=============================================================== (autoload 'bbdb "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-name "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-net "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-company "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-notes "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-insinuate-gnus "bbdb-gnus" "Hook BBDB into GNUS") (setq gnus-startup-hook 'bbdb-insinuate-gnus) (setq mail-setup-hook 'bbdb-insinuate-sendmail) (add-hook 'message-setup-hook 'bbdb-insinuate-message) (defun bbdb-insinuate-message () "Call this function to hook BBDB into the message package." (define-key message-mode-map "\M-\t" 'bbdb-complete-name)) (setq bbdb-always-add-addresses t) (setq bbdb-new-nets-always-primary 'never) (setq bbdb-default-area-code 206) (setq bbdb-use-pop-up t) ;; Prevent annoying popup on completion (setq bbdb-completion-display-record nil) (setq bbdb-pop-up-target-lines 4)