Commit 59c262ad 59c262ad3411069e9998d088ba89441a84df2e1a by Sergey Poznyakoff

Use handle-exception where necessary

1 parent f6006384
;;;; GNU Mailutils -- a suite of utilities for electronic mail
;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
;;;;
;;;; GNU Mailutils is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
......@@ -37,6 +37,8 @@
;;; redirect action
(define (action-redirect address)
(sieve-verbose-print "REDIRECT" "to address " address)
(handle-exception
(if sieve-my-email
(cond
((sent-from-me? sieve-current-message)
......@@ -47,7 +49,7 @@
(mu-message-set-header out-msg "X-Sender" sieve-my-email)
(mu-message-send out-msg #f sender address)
(mu-message-destroy out-msg))
(mu-message-delete sieve-current-message)))))
(mu-message-delete sieve-current-message))))))
;;; Register action
(if sieve-parser
......
;;;; GNU Mailutils -- a suite of utilities for electronic mail
;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
;;;;
;;;; GNU Mailutils is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
......@@ -20,6 +20,8 @@
(define sieve-option-quote #t)
(define (action-reject reason)
(sieve-verbose-print "REJECT")
(handle-exception
(let ((mime (mu-mime-create 0))
(datestr (strftime "%a, %b %d %H:%M:%S %Y %Z"
(localtime (current-time))))
......@@ -81,7 +83,7 @@
(mu-mime-add-part mime mesg))
(mu-message-send (mu-mime-get-message mime) #f sieve-daemon-email sender)
(mu-message-delete sieve-current-message)))
(mu-message-delete sieve-current-message))))
;;; Register action
(if sieve-parser
......
;;;; GNU Mailutils -- a suite of utilities for electronic mail
;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
;;;;
;;;; GNU Mailutils is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
......@@ -160,6 +160,7 @@
(mu-message-send mesg #f #f sender)))
(define (action-vacation text . opt)
(sieve-verbose-print "VACATION")
(set! vacation-debug (member #:debug opt))
(if vacation-debug
(begin
......