Always load mailutils module
(sieve-main): Use (mu-mail-directory) instead of mu-path-maildir.
Showing
1 changed file
with
6 additions
and
6 deletions
1 | ;;;; GNU Mailutils -- a suite of utilities for electronic mail | 1 | ;;;; GNU Mailutils -- a suite of utilities for electronic mail |
2 | ;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. | 2 | ;;;; Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. |
3 | ;;;; | 3 | ;;;; |
4 | ;;;; GNU Mailutils is free software; you can redistribute it and/or modify | 4 | ;;;; GNU Mailutils is free software; you can redistribute it and/or modify |
5 | ;;;; it under the terms of the GNU General Public License as published by | 5 | ;;;; it under the terms of the GNU General Public License as published by |
... | @@ -17,6 +17,9 @@ | ... | @@ -17,6 +17,9 @@ |
17 | 17 | ||
18 | ;;;; This module provides core functionality for the sieve scripts. | 18 | ;;;; This module provides core functionality for the sieve scripts. |
19 | 19 | ||
20 | (set! %load-path (append %load-path (list sieve-libdir))) | ||
21 | (use-modules (mailutils)) | ||
22 | |||
20 | ;;; The email address for originator of error messages. Should be <> | 23 | ;;; The email address for originator of error messages. Should be <> |
21 | ;;; but current mailutils API is unable to parse and handle it. | 24 | ;;; but current mailutils API is unable to parse and handle it. |
22 | ;;; Site administrators are supposed to replace it with the | 25 | ;;; Site administrators are supposed to replace it with the |
... | @@ -173,7 +176,7 @@ | ... | @@ -173,7 +176,7 @@ |
173 | ;; FIXME: This is very inefficient, but I have to use this | 176 | ;; FIXME: This is very inefficient, but I have to use this |
174 | ;; provided (string-index str (string-ref key 0)) may not | 177 | ;; provided (string-index str (string-ref key 0)) may not |
175 | ;; work... | 178 | ;; work... |
176 | ((comp (make-shared-substring str index (+ index key-len)) | 179 | ((comp (substring str index (+ index key-len)) |
177 | key) | 180 | key) |
178 | (xx #t)) | 181 | (xx #t)) |
179 | (else | 182 | (else |
... | @@ -434,14 +437,11 @@ | ... | @@ -434,14 +437,11 @@ |
434 | (define (sieve-main) | 437 | (define (sieve-main) |
435 | (cond | 438 | (cond |
436 | ((not (guimb?)) | 439 | ((not (guimb?)) |
437 | ; (DEBUG 1 "Loading mailutils") | ||
438 | (set! %load-path (append %load-path (list sieve-libdir))) | ||
439 | (use-modules (mailutils)) | ||
440 | (let* ((cl (sieve-command-line)) | 440 | (let* ((cl (sieve-command-line)) |
441 | (name (if (and (not (null? (cdr cl))) | 441 | (name (if (and (not (null? (cdr cl))) |
442 | (string? (cadr cl))) | 442 | (string? (cadr cl))) |
443 | (cadr cl) | 443 | (cadr cl) |
444 | (string-append mu-path-maildir "/" | 444 | (string-append (mu-mail-directory) "/" |
445 | (passwd:name (mu-getpwuid (getuid))))))) | 445 | (passwd:name (mu-getpwuid (getuid))))))) |
446 | ; (DEBUG 2 "mailbox name " name) | 446 | ; (DEBUG 2 "mailbox name " name) |
447 | (set! sieve-mailbox (mu-mailbox-open name "rw")) | 447 | (set! sieve-mailbox (mu-mailbox-open name "rw")) | ... | ... |
-
Please register or sign in to post a comment