sieve-filter to script fails with SHUT_WR

Mark Stover mark.stover at gmail.com
Thu Dec 31 16:41:08 UTC 2015


On Wed, Dec 30, 2015 at 11:25 AM, Stephan Bosch <stephan at rename-it.nl> wrote:
>
>
> Op 30-12-2015 om 15:15 schreef Mark Stover:
>>
>> Trying to make vnd.dovecot.filter to exchange an email with my script.
>> (I have a vnd.dovecot.pipe script working, so I'm pretty sure it's not
>> the configuration...) I'm passing the email using stdin/stdout and
>> _not_ using sockets.
>>
>> My script receives the email and processes it, but the filter process
>> fails:
>>
>> lda(<username>): Error:
>> shutdown(/usr/local/lib/dovecot-sieve/sieve-filter/CleanAttachments.py,
>> SHUT_WR) failed: Socket is not connected
>> lda(<username>): Error: sieve: 20-filter-incoming: line 15: filter
>> action: failed to execute to program `CleanAttachments.py'
>>
>> Not sure, what I'm doing wrong...
>
>
> Does this fix it?
>
> http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/63034e62482b
>
> Regards,
>
> Stephan.
>
That seems to have fixed it.

Thanks!
Mark

>>
>> Thanks,
>> Mark
>>
>> $ doveconf -n
>> # 2.2.21 (5345f22): /usr/local/etc/dovecot/dovecot.conf
>> # Pigeonhole version 0.4.9 (357ac0a0e68b+)
>> # OS: Darwin 15.2.0 x86_64
>> lda_mailbox_autocreate = yes
>> mail_location = maildir:~/Maildir
>> maildir_broken_filename_sizes = yes
>> maildir_very_dirty_syncs = yes
>> plugin {
>>    sieve = file:~/.dovecot/sieve;active=~/.dovecot/sieve/user.sieve
>>    sieve_before = /usr/local/lib/dovecot-sieve/sieve.d/
>>    sieve_execute_bin_dir = /usr/local/lib/dovecot-sieve/sieve-execute
>>    sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
>> +vnd.dovecot.filter +vnd.dovecot.debug
>>    sieve_filter_bin_dir = /usr/local/lib/dovecot-sieve/sieve-filter
>>    sieve_pipe_bin_dir = /usr/local/lib/dovecot-sieve/sieve-pipe
>>    sieve_plugins = sieve_extprograms
>>    sieve_user_log = ~/.dovecot/sieve/sieve.log
>> }
>> postmaster_address = mstover at cisco.com
>> protocol lda {
>>    info_log_path =
>>    log_path =
>>    mail_plugins = " sieve"
>> }
>>
>> Sieve Script:
>>
>> require [ "variables", "envelope", "vnd.dovecot.debug",
>> "vnd.dovecot.filter" ];
>>
>>     if envelope :matches "to" "*" { set "to" "${1}"; }
>>     if envelope :matches "from" "*" { set "from" "${1}"; }
>>
>>     debug_log "Received message TO=${to} FROM=${from}";
>>
>>     filter "CleanAttachments.py";
>>
>>     debug_log "Returned from CleanAttachments";
>>     if envelope :matches "to" "*" { set "to" "${1}"; }
>>     if envelope :matches "from" "*" { set "from" "${1}"; }
>>     debug_log "Returned message TO=${to} FROM=${from}";
>
>


More information about the dovecot mailing list