Re: [patch] Improved error checking for the dovecot-antispam-plugin
On 17.08.2016 02:18, Harlan Stenn wrote: > On 8/16/16 1:24 PM, Robert Munteanu wrote: >> Hi, >> >> Hopefully this is the right channel for such a patch. I have a minor >> enhancement to submit for the antispam plugin >> >> http://hg.dovecot.org/dovecot-antispam-plugin >> >> It adds minimal error checking for the sendmail_binary, otherwise the >> reported error in case of a missing binary or one with missing >> permissions is generic and not useful. >> >> Thanks, >> >> Robert > Robert, I like that you did this. > > Beyond that and without even looking at the actual code, I'm curious why > you: > > +if (access(cfg->binary, F_OK) == -1) > +{ > +mail_storage_set_error(storage, MAIL_ERROR_TEMP, "mail_sendmail > file does not exist"); > > instead of finding a way to include the value of cfg->binary in the > error message string. > > This might not be needed if it's really obvious from the config file > what the path to the executable is, but if there is any doubt it might > be friendlier to show the exact path with the problem. I'd also be > inclined to show the decoded value of errno instead of assuming that > 'mail_sendmail file does not exist'. > > Perhaps something along the lines of: > > "access(%s, F_OK) failed: %m", cfg->binary > > if that makes sense. > > H Hi! Thank you for your patch, we'll take it under consideration! Aki
Re: [patch] Improved error checking for the dovecot-antispam-plugin
On 8/16/16 1:24 PM, Robert Munteanu wrote: > Hi, > > Hopefully this is the right channel for such a patch. I have a minor > enhancement to submit for the antispam plugin > > http://hg.dovecot.org/dovecot-antispam-plugin > > It adds minimal error checking for the sendmail_binary, otherwise the > reported error in case of a missing binary or one with missing > permissions is generic and not useful. > > Thanks, > > Robert Robert, I like that you did this. Beyond that and without even looking at the actual code, I'm curious why you: +if (access(cfg->binary, F_OK) == -1) +{ +mail_storage_set_error(storage, MAIL_ERROR_TEMP, "mail_sendmail file does not exist"); instead of finding a way to include the value of cfg->binary in the error message string. This might not be needed if it's really obvious from the config file what the path to the executable is, but if there is any doubt it might be friendlier to show the exact path with the problem. I'd also be inclined to show the decoded value of errno instead of assuming that 'mail_sendmail file does not exist'. Perhaps something along the lines of: "access(%s, F_OK) failed: %m", cfg->binary if that makes sense. H
[patch] Improved error checking for the dovecot-antispam-plugin
Hi, Hopefully this is the right channel for such a patch. I have a minor enhancement to submit for the antispam plugin http://hg.dovecot.org/dovecot-antispam-plugin It adds minimal error checking for the sendmail_binary, otherwise the reported error in case of a missing binary or one with missing permissions is generic and not useful. Thanks, Robert -- http://robert.muntea.nu/ # HG changeset patch # User Robert Munteanu # Date 1471005192 -10800 # Fri Aug 12 15:33:12 2016 +0300 # Node ID 21a6999ba3d0ce670f790ce314d106bb9e23e337 # Parent 5ebc6aae4d7ce9ad4c53c1efe5b7f280e967d8a9 Validate that mail_sendfile exists and is executable This prevents more cryptic errors from being raised to the users. diff -r 5ebc6aae4d7c -r 21a6999ba3d0 src/mailtrain.c --- a/src/mailtrain.c Mon Apr 29 14:59:26 2013 +0200 +++ b/src/mailtrain.c Fri Aug 12 15:33:12 2016 +0300 @@ -26,6 +26,7 @@ #include "str.h" #include "istream.h" #include "ostream.h" +#include "unistd.h" #include "aux.h" #include "backends.h" @@ -108,6 +109,18 @@ pid_t pid; int status; +if (access(cfg->binary, F_OK) == -1) +{ +mail_storage_set_error(storage, MAIL_ERROR_TEMP, "mail_sendmail file does not exist"); +return -1; +} + +if (access(cfg->binary, X_OK) == -1) +{ +mail_storage_set_error(storage, MAIL_ERROR_TEMP, "missing execute permissions on mail_sendmail"); +return -1; +} + pid = fork(); if (pid == -1)
Re: sieve-pipe
On 2016-08-15 08:31, zhaochangpan wrote: hello,everyone I want to use the dovecot sieve - pipe plugin, I look at the website, but the plugin is not installed.Does anyone can help me, my dovecot is 2.2.Thank you very much.Reference:http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe what is your question ?
sieve-pipe
hello,everyone I want to use the dovecot sieve - pipe plugin, I look at the website, but the plugin is not installed.Does anyone can help me, my dovecot is 2.2.Thank you very much.Reference:http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe
dsync: Keywords not being replicated
I just noticed that some IMAP keywords are not being replicated through dsync backup/sync using Dovecot 2.2.24 from Debian backports: On the master server everything looks fine: RECORD: seq=3, uid=44731, flags=0x09 (Seen Answered) - ext 0 keywords :(0900) <-- 0900 - ext 1 modseq: 701695 (ffb40a00) - ext 3 cache : 3948 (6c0f) - ext 4 sort-s: 0 () On Replica: RECORD: seq=3, uid=44731, flags=0x09 (Seen Answered) - ext 0 keywords :() <-- - ext 1 modseq: 701695 (ffb40a00) - ext 3 cache : 3948 (6c0f) In this case the "forwarded" keyword is gone. Thunderbird no longer displays the message as having been forwarded. The command I used was: doveadm sync -u myuser -l 60 -N tcp:replica:24245 My config is attached. It looks like there are other users also having the same problem: http://dovecot.org/list/dovecot/2016-January/102951.html Thanks, Karsten -- Karsten HeikenLeibniz Universität IT Services Kommunikationssysteme E-Mail, XMPP, Kalender Schloßwender Str. 5 D-30159 Hannover # 2.2.24 (a82c823): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.13 (7b14904) # OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 default_vsz_limit = 512 M dict { acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } lmtp_rcpt_check_quota = yes mail_attribute_dict = file:%h/Maildir/dovecot-attributes mail_gid = mail_location = maildir:%h/Maildir mail_plugins = " zlib quota acl notify listescape" mail_shared_explicit_inbox = yes mail_uid = mailbox_list_index = yes managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags notify namespace { hidden = no ignore_on_failure = no inbox = no list = children location = maildir:%%h/Maildir:INDEX=%h/shared/%%u:INDEXPVT=%h/shared/%%u prefix = shared/%%u/ separator = / subscriptions = no type = shared } namespace inbox { hidden = no inbox = yes list = yes location = mailbox 30dTrash { auto = subscribe autoexpunge = 30 days special_use = \Junk } mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile acl_shared_dict = proxy::acl quota = maildir:Postfach-Limit quota_grace = 2%% quota_rule = *:storage=8G quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Mailbox is full quota_status_success = DUNNO sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions = +notify +imapflags sieve_max_actions = 250 sieve_max_redirects = 200 zlib_save = gz zlib_save_level = 6 } protocols = " imap lmtp sieve pop3 sieve" replication_dsync_parameters = -d -l 300 -U -n inbox service auth { unix_listener auth-userdb { group = vmail user = vmail } } service dict { unix_listener dict { group = vmail mode = 0660 user = vmail } } service doveadm { inet_listener { port = 24245 } } service imap-login { process_min_avail = 16 service_count = 0 } service imap { executable = imap postlogin process_limit = 3 } service lmtp { inet_listener lmtp { port = 24 } } service managesieve-login { inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } service pop3-login { process_min_avail = 4 service_count = 0 } service pop3 { process_limit = 2500 } service postlogin { executable = script-login -d rawlog /usr/local/bin/dovecot-postlogin.sh } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { port = 12340 } } shutdown_clients = no ssl_cert =
imapc and THREAD
Hello, at the moment i get a "strange" behavior on imapc (imap proxy mode) and thread/sorts in version 2.2.25 (I also tried 2.2.23 with the same result) In imapc mode an IMAP request like . THREAD ORDEREDSUBJECT UTF-8 SINCE 5-MAR-2000 gets as response * THREAD (1 (2)(3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)(22)(21)(23)(24)(25)) the same request on the origin server gets the correct response * THREAD (18)(19)(25)(24)(20)((4)(7)(12)(23))(1)(2)(3)(5)(6)(8)(9)(10)(13)(14)(15)(16)(17)(11)(22)(21) Is there a config param to "activate" thread? Missing something else?
Re: Segfault in lib11_trash_plugin.so
On 26.07.2016 09:51, Василий Севостьянов wrote: > After a recent update of dovecot to 2.2.devel (d81a83b) I started to get > errors like that: > > Jul 26 07:34:44 mx kernel: pop3[17311]: segfault at 1ee74b0d5 ip > 0001ee74b0d5 sp 7ffe593dc3c0 error 14 in lib11_trash_plugin.so[ > 7f66edce2000+3000] > Jul 26 08:11:25 mx dovecot: pop3(): Fatal: master: service(pop3): > child 17311 killed with signal 11 (core dumps disabled) > } Hi! Any possibility you could provide us with stack trace using gdb? If possible, install debuginfo packages, and run gdb /path/to/pop3 /path/to/core bt full and send it to list, please! This would make it a lot easier to debug your issue. Thank you! Aki Tuomi Dovecot Oy