pysieved set up in /etc/inetd.conf setup
----------------------------------------

sieve           stream  tcp     nowait  root    /usr/bin/python python 
/var/lib/pysieved/pysieved.py    --inetd --config /etc/pysieved.ini



/etc/pysieved.ini setup
------------------------

I use system accounts for mail access, so PAM authentication is 
selected, and of course Exim storage model:

[main]
# Authentication back-end to use
auth    = pam

# User DB back-end to use
userdb  = passwd

# Storage back-end to use
storage = Exim

# Bind to what address?  (Ignored with --stdin)
#bindaddr = 127.0.0.1

# Listen on what port?  (Ignored with --stdin)
port    = 2000

[... et cetera, stock template contents!]



Exim configuration, (shown as a patch)
--------------------------------------

The first diff hunk is against the "userforward:" router
section. I cloned the address_file transport and named the copy
address_file_forward, for forwarding only, so that we
are not changing the configuration of all routers that
use address_file!

I then changed this cloned transport to do maildir delivery.
It handles the INBOX. prefix that RoundCube's plugin
puts on the folders. E.g. if your rule says to
file into folder Foo, then the Sieve script actually
has  fileinto "INBOX.Foo".   The exim configuration
will translate this to /<yourhome>/Maildir/.Foo:

webserver:/etc/exim4# quilt diff
Index: exim4/exim4.conf.template
===================================================================
--- exim4.orig/exim4.conf.template      2010-08-18 11:52:21.000000000 
-0700
+++ exim4/exim4.conf.template   2010-08-18 12:33:37.000000000 -0700
@@ -1241,7 +1241,7 @@
   allow_filter
   forbid_smtp_code = true
   directory_transport = address_directory
-  file_transport = address_file
+  file_transport = address_file_forward
   pipe_transport = address_pipe
   reply_transport = address_reply
   skip_syntax_errors
@@ -1431,6 +1431,24 @@
   envelope_to_add
   return_path_add

+address_file_forward:
+  debug_print = "T: address_file_forward for $local_p...@$domain"
+  driver = appendfile
+  delivery_date_add
+  envelope_to_add
+  return_path_add
+
+ maildir_format
+
+ directory = ${if eq{$address_file}{inbox} \
+                {$home/Maildir} \
+                {${if eq{${substr_0_1:$address_file}}{/} \
+                    {$address_file} \
+                    {${if match {$address_file}{^INBOX\.} \
+                        {${sg {$address_file} \
+                              
{^(INBOX\.)(.*)\$}{$home/Maildir/.\$2}}} \
+                        {$home/Maildir/$address_file}}}}}}
+
 #####################################################
 ### end transport/30_exim4-config_address_file
 #####################################################

_______________________________________________
List info: http://lists.roundcube.net/users/
BT/8f4f07cd

Reply via email to