comparison lisp/mail/mailpost.el @ 29886:3baeb77c0e39

(post-mail-send-it): Make sure file has proper permissions from birth.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 23 Jun 2000 07:13:08 +0000
parents fb6b9c37cdc4
children 253f761ad37b
comparison
equal deleted inserted replaced
29885:abd1315edfaf 29886:3baeb77c0e39
26 To use it, include \"(setq send-mail-function 'post-mail-send-it)\" in 26 To use it, include \"(setq send-mail-function 'post-mail-send-it)\" in
27 site-init." 27 site-init."
28 (let ((errbuf (if mail-interactive 28 (let ((errbuf (if mail-interactive
29 (generate-new-buffer " post-mail errors") 29 (generate-new-buffer " post-mail errors")
30 0)) 30 0))
31 (temfile (make-temp-file ",rpost")) 31 temfile
32 (tembuf (generate-new-buffer " post-mail temp")) 32 (tembuf (generate-new-buffer " post-mail temp"))
33 (case-fold-search nil) 33 (case-fold-search nil)
34 delimline 34 delimline
35 (mailbuf (current-buffer))) 35 (mailbuf (current-buffer)))
36 (unwind-protect 36 (unwind-protect
72 (replace-match "")) 72 (replace-match ""))
73 (if mail-interactive 73 (if mail-interactive
74 (save-excursion 74 (save-excursion
75 (set-buffer errbuf) 75 (set-buffer errbuf)
76 (erase-buffer)))) 76 (erase-buffer))))
77 (set-file-modes temfile 384) 77 (let ((m (default-file-modes)))
78 (write-file temfile) 78 (unwind-protect
79 (progn
80 (set-default-file-modes 384)
81 (setq temfile (make-temp-file ",rpost")))
82 (set-default-file-modes m)))
79 (apply 'call-process 83 (apply 'call-process
80 (append (list (if (boundp 'post-mail-program) 84 (append (list (if (boundp 'post-mail-program)
81 post-mail-program 85 post-mail-program
82 "/usr/uci/lib/mh/post") 86 "/usr/uci/lib/mh/post")
83 nil errbuf nil 87 nil errbuf nil