[Dovecot] Performing an action on mail receipt
Andrew Beverley
andy at andybev.com
Wed May 14 00:15:46 UTC 2014
On Tue, 2014-05-13 at 16:21 +0200, Stephan Bosch wrote:
> This should provide what you need:
>
> http://sieve.info/
> http://tools.ietf.org/html/rfc5435
> http://tools.ietf.org/html/rfc5436
>
> http://wiki2.dovecot.org/Pigeonhole
Fantastic, thanks, exactly what I need.
I've got the basics working, with a static file Sieve script. However,
I'm trying to keep as much of my config in a MySQL database, and this is
where I'm starting to struggle.
By user, I'd like to retrieve from a SQL database firstly which Sieve
script to run (if applicable) and secondly the parameters for that
particular user, in this case the external email address to notify.
As I understand it, I'll need to use the Extdata plugin to retrieve data
values per-user. I've successfully compiled and installed this plugin,
but I'm not sure how to connect it to a dict.
I've created a dict configuration file, with the following contents:
map {
pattern = priv/extdata/notify_email
table = virtual_users
username_field = email
value_field = notify_email
}
And added it to dovecot.conf:
dict {
notify = mysql:/etc/dovecot/pigeonhole-sieve.dict
}
I've added the following to my Sieve configuration:
sieve_plugins = sieve_extdata
sieve_extdata_dict_uri = extdata::notify_email
However, I'm not sure of the naming syntax of the above, and I'm just
getting "sieve extdata: failed to initialize dict extdata::notify_email"
I guess I've got the naming wrong, but I couldn't find documentation to
specify how it should be. What am I doing wrong?
Thanks,
Andy
More information about the dovecot
mailing list