Mercurial > hg > xemacs
comparison mail-from-m.el @ 58:32a75a4db17b
try to paramterise email handling a bit more
revert use of device-type-hacking
author | Henry S Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 03 Apr 2024 12:41:35 +0100 |
parents | 3dd34fa466c2 |
children | c343c57a93e8 |
comparison
equal
deleted
inserted
replaced
57:0d4e2fbdb6aa | 58:32a75a4db17b |
---|---|
1 ;;; Load to read and send mail from maritain | 1 ;;; Load to read and send mail from maritain |
2 | 2 |
3 (setq mail-append-host "home.hst.name") | 3 (setq mail-append-host "home.hst.name") |
4 (setq user-full-name "Henry S. Thompson") | 4 (setq user-mail-address (format "%s@home.hst.name" user-name)) |
5 (setq user-mail-address "ht@home.hst.name") | |
6 (setq mail-host-address "home.hst.name") | 5 (setq mail-host-address "home.hst.name") |
7 (setq mail-signature-file "/home/ht/.sig.pers") | |
8 (setq mail-signature t) | |
9 (setq message-signature-file "/home/ht/.sig.pers") | |
10 (setq message-signature t) | |
11 (defun system-name () "home.hst.name") | 6 (defun system-name () "home.hst.name") |
12 | 7 |
13 (setq gnus-default-directory "/home/ht" | 8 (let ((hdn (format "/home/%s" user-name))) |
14 gnus-home-directory "/home/ht" | 9 (let ((sfn (format "%s/.sig.pers" hdn))) |
15 my-mail-dir "/home/ht/mail" | 10 (setq mail-signature-file sfn |
16 mail-sources '((file :path "/var/spool/mail/ht")) | 11 message-signature-file sfn |
12 mail-signature t | |
13 message-signature t) | |
14 ) | |
15 (setq gnus-default-directory hdn | |
16 gnus-home-directory hdn | |
17 my-mail-dir (format "%s/mail" hdn) | |
18 mail-sources `((file :path ,(format "/var/spool/mail/%s" user-name))) | |
17 mail-archive-file-name (concat my-mail-dir "/cpy/general/" | 19 mail-archive-file-name (concat my-mail-dir "/cpy/general/" |
18 (format-time-string | 20 (format-time-string |
19 "%Y-%m" (current-time)) | 21 "%Y-%m" (current-time)) |
20 ".mbox") | 22 ".mbox")) |
21 ) | 23 ) |
22 | 24 |
23 (setq mail-archive-file-name (expand-file-name "~/mail/cpy/general")) | 25 (setq mail-archive-file-name (expand-file-name "~/mail/cpy/general")) |
24 | |
25 (defun set-nnmail-split-fancy () | |
26 (setq nnmail-split-fancy | |
27 (let ((month (format-time-string "%Y-%m" (current-time))) | |
28 (year (format-time-string "%Y" (current-time))) | |
29 ) | |
30 (cons '| | |
31 (append `(("Subject" "testing" "jjunk") | |
32 (to "quaker-\\(l\\|spectrum\\)" "quaker-2022") | |
33 (to "quaker-b" "quaker-b") | |
34 (to "[cC]ygwin" "cygwin") | |
35 (from "noreply@mrooms.net" "nayler") | |
36 (to "ht@rsof.hst.name" ,(concat "quaker-" year)) | |
37 (to "Wardenship@lists.quaker.eu.org" "wardens") | |
38 (to "mhmcc@rsof.hst.name" ,(concat "mhmcc-" year)) | |
39 (from "\\(gillian.einstein@gmail.com\\|brian.cantwell.smith@gmail.com\\|gguzeldere@yahoo.com\\|jim.brink@gmail.com\\|rgwinther@gmail.com\\|shockema@gmail.com\\|j.jun.luo@gmail.com\\)" "GoN") | |
40 ("Envelope-to" "mhmcc@rsof.hst.name" | |
41 (| (from "mhmcc@rsof.hst.name" junk) | |
42 ,(concat "mhmcc-" year))) | |
43 (to "mfw@rsof.hst.name" "7vt") | |
44 (to "zphdaily" (concat "pers-" month)) | |
45 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" ) | |
46 ) | |
47 (list (list 'to | |
48 "ht\\|h\\.?thompson?" | |
49 (concat "pers-" month)) | |
50 (concat "group-" | |
51 (format-time-string | |
52 "%Y-%m" (current-time)) | |
53 ""))))))) | |
54 | |
55 (defun set-ht-compiled-split () | |
56 (interactive) | |
57 (set-nnmail-split-fancy)) | |
58 | |
59 (setq gnus-posting-styles | |
60 `((".*" | |
61 (signature-file ,mail-signature-file)) | |
62 ("quaker-2023" | |
63 (signature-file "/home/ht/.quaker-sig") | |
64 (address "ht@rsof.hst.name")) | |
65 ("quaker-2024" | |
66 (signature-file "/home/ht/.quaker-sig") | |
67 (address "ht@rsof.hst.name")) | |
68 ("mhmcc-2023" | |
69 (signature-file "/home/ht/.mhmcc-sig") | |
70 ("Reply-to" "sesam.emh.management@gmail.com") | |
71 (name "HST as Convenor SESAM MHMC") | |
72 (address "mhmcc@rsof.hst.name") | |
73 ("Bcc" "sesam.emh.management@gmail.com")) | |
74 ("mhmcc-2024" | |
75 (signature-file "/home/ht/.mhmcc-sig") | |
76 ("Reply-to" "sesam.emh.management@gmail.com") | |
77 (name "HST as Convenor SESAM MHMC") | |
78 (address "mhmcc@rsof.hst.name") | |
79 ("Bcc" "sesam.emh.management@gmail.com")))) | |
80 | 26 |
81 ;; sending mail on the road | 27 ;; sending mail on the road |
82 ;(setq send-mail-function 'smtpmail-send-it) | 28 ;(setq send-mail-function 'smtpmail-send-it) |
83 ;(setq message-send-mail-function 'smtpmail-send-it) | 29 ;(setq message-send-mail-function 'smtpmail-send-it) |
84 ;(setq smtpmail-default-smtp-server "localhost") | 30 ;(setq smtpmail-default-smtp-server "localhost") |