summaryrefslogtreecommitdiff
path: root/guimb
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2001-12-28 22:33:55 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2001-12-28 22:33:55 +0000
commit7f2497fe6e4bbc0380dda694fb250a5482f5ecc6 (patch)
tree645ee0753bc5d9d3b0d0fb7bfb25fec93945694d /guimb
parent29d1b05f1f791725037e78aa9733422826d5642d (diff)
downloadmailutils-7f2497fe6e4bbc0380dda694fb250a5482f5ecc6.tar.gz
mailutils-7f2497fe6e4bbc0380dda694fb250a5482f5ecc6.tar.bz2
Introduced sieve-daemon-email variable. Removed sieve-message-bounce,
since recent modifications to mailer_send_message() and mu-message-send provide all the required functionality.
Diffstat (limited to 'guimb')
-rw-r--r--guimb/scm/sieve-core.scm49
1 files changed, 9 insertions, 40 deletions
diff --git a/guimb/scm/sieve-core.scm b/guimb/scm/sieve-core.scm
index 0e676fc7c..e54cbf730 100644
--- a/guimb/scm/sieve-core.scm
+++ b/guimb/scm/sieve-core.scm
@@ -17,7 +17,15 @@
;;;; This module provides core functionality for the sieve scripts.
-(define sieve-my-email "")
+;;; The email address for originator of error messages. Should be <>
+;;; but current mailutils API is unable to parse and handle it.
+;;; Site administrators are supposed to replace it with the
+;;; actual value.
+(define sieve-daemon-email "MAILER-DAEMON@localhost")
+
+;;; The email address of the user whose mailbox is being processed.
+;;; If #f, it will be set by sieve-main
+(define sieve-my-email #f)
;;; List of open mailboxes.
;;; Each entry is: (list MAILBOX-NAME OPEN-FLAGS MBOX)
@@ -50,44 +58,6 @@
sieve-mailbox-list)
(set! sieve-mailbox-list '()))
-(use-modules (ice-9 popen))
-
-(define PATH-SENDMAIL "/usr/lib/sendmail")
-
-;;; Bounce a message.
-;;; Current mailutils API does not provide a way to send a message
-;;; specifying its recipients (like "sendmail -t foo@bar.org" does),
-;;; hence the need for this function.
-(define (sieve-message-bounce message addr-list)
- (catch #t
- (lambda ()
- (let ((port (open-output-pipe
- (apply string-append
- (append
- (list
- PATH-SENDMAIL
- " -oi -t ")
- (map
- (lambda (addr)
- (string-append addr " "))
- addr-list))))))
- ;; Write headers
- (for-each
- (lambda (hdr)
- (display (string-append (car hdr) ": " (cdr hdr)) port)
- (newline port))
- (mu-message-get-header-fields message))
- (newline port)
- ;; Write body
- (let ((body (mu-message-get-body message)))
- (do ((line (mu-body-read-line body) (mu-body-read-line body)))
- ((eof-object? line) #f)
- (display line port)))
- (close-pipe port)))
- (lambda args
- (runtime-error LOG_ERR "redirect: Can't send message")
- (write args))))
-
;;; Comparators
(cond
(sieve-parser
@@ -396,7 +366,6 @@
(let ((count (mu-mailbox-messages-count current-mailbox)))
(do ((n 1 (1+ n)))
((> n count) #f)
- (display n)(newline)
(set! sieve-current-message
(mu-mailbox-get-message current-mailbox n))
(catch 'sieve-stop

Return to:

Send suggestions and report system problems to the System administrator.