perl script for sieve filter
Huaqing Zheng
huasome at gmail.com
Wed Sep 21 12:46:13 EDT 2005
On 9/21/05, Ana Ribas/Upcnet <ana.ribas at upcnet.es> wrote:
> Hi,
>
> I need to write a perl script to activate automatically a sieve filter
> every time I create a new mailbox.
> The filter is a sieve script that I have already written and that works
> perfectly.
> I have not worked too much with the perl language and the
> Cyrus::SIEVE::managesieve module man does not help me either.
>
> Has someone a similar script or some perl code that can I use as guide?
You don't really need a perl script. Assuming that you have a
proxyservers set in your imapd configurations. Just create a file
"upload-sieve" that looks something like this:
put <sieve-file>
activate <sieve-file>
and then run
sieveshell --user=<new-user> --authname=<proxyserver>
-exec=upload-sieve host:port
after the account creation. You might have to pipe the proxyserver
password to it depending on your auth mechanism.
Alternatively, you can just look at how sieveshell works and write
your own perl script.
--
Huaqing Zheng
Beer and Code Wrangler at Larg
More information about the Info-cyrus
mailing list