How to use Sieve with VExim?

86 views
Skip to first unread message

Michael Richter

unread,
Jan 16, 2017, 5:54:22 AM1/16/17
to vexim
Hi,

how can I use Sieve filters with VExim? I couldn't find any documentation about this. Does someone already use this configuration?

Greetings
Michael

udera

unread,
Jan 17, 2017, 10:06:22 AM1/17/17
to Michael Richter, vexim
Hi Michael,

I use a pipe to pass all incoming mails to dovecot where all sieve
filters are implemented (can be configured via roundcube). The pipe
command is:
| /usr/lib/dovecot/dovecot-lda -d us...@domain.com

In the future we want to bring LMTP transports to dovecot into our exim
configuration:
https://github.com/vexim/vexim2/pull/150

Udera

Michael Richter

unread,
Jan 20, 2017, 6:46:38 AM1/20/17
to vexim, mehrn...@gmail.com, ud...@aspekte.net
Hi Udera,
thanks for your reply. So you replace mail delivery by Dovecot, right? So I'd need to configure Dovecot LDA too with correct virtual pathes, mysql, etc., right? Sounds like a bunch of work. Where did you put this pipe command?

Rimas Kudelis

unread,
Jan 20, 2017, 8:48:26 AM1/20/17
to ve...@googlegroups.com
Hi Michael,

2017-01-20 13:46, Michael Richter rašė:
> Hi Udera,
> thanks for your reply. So you replace mail delivery by Dovecot, right?
> So I'd need to configure Dovecot LDA too with correct virtual pathes,
> mysql, etc., right? Sounds like a bunch of work. Where did you put
> this pipe command?

I believe much of that is in the pull request Udera linked to, and in
our existing documentation on Dovecot
(https://github.com/vexim/vexim2/wiki/Server-configuration:-Dovecot) .

If you prefer processing Sieve filters directly in Exim, you're very
welcome to share whatever recipe you come up with here or in the wiki,
and/or to make a pull request. Exim does seem to support Sieve, but the
manual (a.k.a. Exim specification) doesn't go into much detail when
talking about filtering, at least I haven't noticed any examples we
could use.

Regards,
Rimas

Michael Richter

unread,
Jan 20, 2017, 11:24:46 AM1/20/17
to vexim
Hi Rimas,
I've got a mail with some tips on how to configure it. And I got it working now with Dovecot LDA. On Debian Jessie with Exim 4.88 (self compiled using OpenSSL instead of GnuTLS), VExim 2.2.1 and Dovecot as IMAP server I did something like this:

apt-get install dovecot-managesieved
- added a transport rule to exim4.conf:

dovecot_virtual_delivery:
  driver = pipe
  return_output
  command = /usr/lib/dovecot/dovecot-lda -d $local_part@$domain -f $sender_address
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
  log_output
  user = 90
  group = 90
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78

- activated this transport in router virtual_domains:

file_transport = dovecot_virtual_delivery

- changed Dovecots user lookup via MySQL in dovecot-sql.conf:

user_query = \
    select smtp as home, users.uid, users.gid \
    from users,domains \
    where localpart = '%n' \
    and domain = '%d' \
    and users.domain_id = domains.domain_id

- activated Sieve in 20-managesieve.conf
- activated Sieve in 15-lda.conf:

mail_plugins = $mail_plugins sieve

- granted permission to the userdb in 10-master.conf:

mode = 0777

- reloaded Exim and Dovecot

Maybe I've forgotten some part but something like this should do it.

Greetings
Michael
Reply all
Reply to author
Forward
0 new messages