Re: userdb username change ignored when using (My)SQL was: Re: userdb username changed

2015-12-16 Thread Péter Márton
On Mon, Dec 7, 2015 at 8:13 PM, Timo Sirainen  wrote:

> http://dovecot.org/releases/2.2/dovecot-2.2.20.tar.gz
> http://dovecot.org/releases/2.2/dovecot-2.2.20.tar.gz.sig
>
> This could be (one of) the last v2.2.x release. We're starting v2.3
> development soon.
> (...)

- auth: userdb lookups via auth-worker couldn't change username
> (...)


Thanks for that Timo! I will test it.

Regards,

Peter


Re: doveadm-server does NOT know fts commands

2015-12-16 Thread SATOH Fumiyasu
At Wed, 16 Dec 2015 15:27:48 +0200,
Timo Sirainen wrote:
> >> I'm using Dovecot 2.2.13 with Dovecot Director, Doveadm server and FTS.
> >> I want to run doveadm on Director hosts, but Dovecot server on
> >> backend hosts reject "fts *" commands.
> > 
> > This problem still exists on Dovecot 2.2.21...
> > 
> > Dec 16 19:53:51 localhost dovecot: doveadm(10.255.1.20): Error: doveadm: 
> > Client sent unknown command: fts rescan
> 
> Fixed: 
> https://github.com/dovecot/core/commit/c6be98b5270900746f35ebe28bd636019976e29e

It works! Thank you!!

-- 
-- Name: SATOH Fumiyasu @ OSS Technology Corp. (fumiyas @ osstech co jp)
-- Business Home: http://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA


Re: Assert failure in 2.2.20: imap-fetch.c:554 (ctx->client->output_cmd_lock || ctx->client->output_cmd_lock == cmd)

2015-12-16 Thread Peter Eriksson
I’ve rebuilt Dovecot 2.2.21 with that patch (and the other one) now and will be 
having a look at the core-dump directory the coming days :-)

- Peter

—
[Lı.U] SysAdmin KITVS-IFM & ITI-NET IT.LiU.SE +46-13-28 2786

> On 16 Dec 2015, at 14:39, Timo Sirainen  wrote:
> 
> On 15 Dec 2015, at 17:52, Peter Eriksson  wrote:
>> 
>> Just got another core-dump from Dovecot's imap process on our mail server.
>> 
>> Dec 14 10:58:12 mail dovecot: [ID 583609 mail.crit] imap(oling): Panic: file 
>> imap-fetch.c: line 554: assertion failed: (ctx->client->output_cmd_lock == 
>> NULL || ctx->client->output_cmd_lock == cmd)
> 
> I think this is an old bug, and I've never been able to reproduce it. But 
> looking at the code, this should fix it:
> 
> https://github.com/dovecot/core/commit/15307c2c91854e766bd9fb095d611a29b3f7572e
> 
> 


Re: LIST command should not interpret wildcards in reference

2015-12-16 Thread Timo Sirainen
On 14 Dec 2015, at 17:14, Robert Siemer  wrote:
> 
> Hello everyone,
> 
> I believe this is erroneously implemented in Dovecot:
> 
> 
> >>> for i in c.list_folders('deleteme.*.folder', '%'):
> ...  print(i)
> ...
> ((b'\\HasNoChildren',), b'.', 'deleteme.*.folder')
> ((b'\\HasNoChildren',), b'.', 'deleteme.deleteme.deleteme.folder')
> 
> 
> We see here an interactive python session, which launches
> 
> LIST "deleteme.*.folder" "%"
> 
> over the wire and receives two mailboxes as answer. The response is already 
> parsed, but that’s not important for my point: according to RFC3501 section 
> 6.3.8 LIST Command, the arguments are “reference name” and “mailbox name with 
> possible wildcards”.
> 
> Both arguments are allowed to contain wildcard characters, but they have no 
> special meaning in the reference. Dovecot 2.2.18 doesn’t do that right: the 
> second mailbox should not be listed, because it is not a subfolder of 
> reference.

Well .. I guess ideally Dovecot would behave the way you want it to behave. But 
this would require API changes and in general it would complicate the listing 
code that is already too complicated. There are also further reasons why it's 
not very useful, as mentioned by the 6.3.8 section:

 - Note: The interpretation of the reference argument is implementation-defined.
 - A client SHOULD NOT use such a reference argument except at the explicit 
request of the user.
 - It doesn't explicitly mention how wildcards should be handled in reference 
argument.

Also it is not an error for IMAP server to return unsolicited replies as part 
of any command. So in theory Dovecot could return all the mailboxes as a reply 
to any LIST command and still be IMAP-standards compliant, although not a very 
optimal one.

So all in all, I don't think this is something that is going to be changed.


Re: Assert failure in 2.2.20: imap-fetch.c:554 (ctx->client->output_cmd_lock || ctx->client->output_cmd_lock == cmd)

2015-12-16 Thread Timo Sirainen
On 15 Dec 2015, at 17:52, Peter Eriksson  wrote:
> 
> Just got another core-dump from Dovecot's imap process on our mail server.
> 
> Dec 14 10:58:12 mail dovecot: [ID 583609 mail.crit] imap(oling): Panic: file 
> imap-fetch.c: line 554: assertion failed: (ctx->client->output_cmd_lock == 
> NULL || ctx->client->output_cmd_lock == cmd)

I think this is an old bug, and I've never been able to reproduce it. But 
looking at the code, this should fix it:

https://github.com/dovecot/core/commit/15307c2c91854e766bd9fb095d611a29b3f7572e


Re: doveadm-server does NOT know fts commands

2015-12-16 Thread Timo Sirainen

> On 16 Dec 2015, at 13:01, SATOH Fumiyasu  wrote:
> 
> Hi,
> 
> At Mon, 14 Jul 2014 19:42:10 +0900,
> SATOH Fumiyasu wrote:
>> I'm using Dovecot 2.2.13 with Dovecot Director, Doveadm server and FTS.
>> I want to run doveadm on Director hosts, but Dovecot server on
>> backend hosts reject "fts *" commands.
> 
> This problem still exists on Dovecot 2.2.21...
> 
> Dec 16 19:53:51 localhost dovecot: doveadm(10.255.1.20): Error: doveadm: 
> Client sent unknown command: fts rescan

Fixed: 
https://github.com/dovecot/core/commit/c6be98b5270900746f35ebe28bd636019976e29e


Re: LIST command should not interpret wildcards in reference

2015-12-16 Thread Robert Siemer


Does no-one have an opinion about wildcards in the first argument to LIST?


Robert

On 14/12/15 16:14, Robert Siemer wrote:

Hello everyone,

I believe this is erroneously implemented in Dovecot:


 >>> for i in c.list_folders('deleteme.*.folder', '%'):
...  print(i)
...
((b'\\HasNoChildren',), b'.', 'deleteme.*.folder')
((b'\\HasNoChildren',), b'.', 'deleteme.deleteme.deleteme.folder')


We see here an interactive python session, which launches

LIST "deleteme.*.folder" "%"

over the wire and receives two mailboxes as answer. The response is
already parsed, but that’s not important for my point: according to
RFC3501 section 6.3.8 LIST Command, the arguments are “reference name”
and “mailbox name with possible wildcards”.

Both arguments are allowed to contain wildcard characters, but they have
no special meaning in the reference. Dovecot 2.2.18 doesn’t do that
right: the second mailbox should not be listed, because it is not a
subfolder of reference.

Is this a known issue?


Regards,
Robert


Re: Dovecot code repository moved to Github (Xi fixed)

2015-12-16 Thread Stephan Bosch



Op 14-12-2015 om 1:05 schreef Stephan Bosch:

Op 12/10/2015 om 1:07 AM schreef Stephan Bosch:

Op 12/9/2015 om 5:44 PM schreef Stephan Bosch:

Op 9-12-2015 om 17:32 schreef Timo Sirainen:

http://hg.dovecot.org/ is no longer being updated. The public
repository exists now in https://github.com/dovecot/core instead.

I'm not sure yet if we should continue pushing commit emails to
dovecot-cvs list or if Github's internal notifications are enough. In
any case dovecot-cvs list isn't working right now.

Oh, that means that Xi packages aren't updated with Dovecot changes at
the moment.

Will fix...

OK, Xi now successfully re-builds packages from GitHub (Pigeonhole is
still on Hg). I haven't tested what happens when Timo commits new
changes, but I can fix any problems pretty quickly. Problems will
probably surface anyway. Just mail me if you notice any problems.

BTW, Xi now also (slowly) builds armhf packages for Debian Jessie.

Xi currently won't notice new releases. It will produce commits on the
master branch as v2.2.20 updates for the time being. I will fix this in
the near future.


This fix just became a little more urgent, since recent commits have 
adjusted the version in master branch to 2.2.devel. Now, the builder 
fails to work at all.


The debian repository remains available, but for now there will not be 
any more updates.


I will fix this later this week.

Regards,

Stephan.


Re: [bug][Pigeonhole 0.4.10] Missing msgid

2015-12-16 Thread Stephan Bosch



Op 16-12-2015 om 11:00 schreef Alexander Moisseev:



What is your configuration?

Attached.



I can't make much sense of it yet. It probably relates to this change:

http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/d23225e408af

and the fact that you use a sieve_after script.

So, what do your sieve scripts look like? Could you provide an example 
of a sieve_before, sieve_after and a user sieve script (and perhaps an 
example message) that trigger this issue?


Regards,

Stephan.


Re: doveadm-server does NOT know fts commands

2015-12-16 Thread SATOH Fumiyasu
Hi,

At Mon, 14 Jul 2014 19:42:10 +0900,
SATOH Fumiyasu wrote:
> I'm using Dovecot 2.2.13 with Dovecot Director, Doveadm server and FTS.
> I want to run doveadm on Director hosts, but Dovecot server on
> backend hosts reject "fts *" commands.

This problem still exists on Dovecot 2.2.21...

Dec 16 19:53:51 localhost dovecot: doveadm(10.255.1.20): Error: doveadm: Client 
sent unknown command: fts rescan

> On Dovecot Director hosts:
> 
>   # doveadm fts optimize -u u0...@example.jp
>   # echo $?
>   75
>   # doveadm fts rescan -u u0...@example.jp
>   # echo $?
>   75
>   doveadm index -u u0...@example.jp INBOX
>   # echo $?
>   0
> 
> On Dovecot backend hosts:
> 
>   # grep doveadm /var/log/maillog
>   Jul 14 10:25:40 backend dovecot: doveadm: Error: doveadm: Client sent 
> unknown command: fts optimize
>   Jul 14 10:25:51 backend dovecot: doveadm: Error: doveadm: Client sent 
> unknown command: fts rescan
> 
> Is this doveadm-server restriction?
> 
> On Dovecot backend hosts (2):
> 
>   # doveadm fts optimize -u u0...@example.jp -S 
> /var/run/dovecot/doveadm-server
>   # echo $?
>   75
>   # doveadm fts rescan -u u0...@example.jp -S /var/run/dovecot/doveadm-server
>   # echo $?
>   75
>   # doveadm index -u u0...@example.jp -S /var/run/dovecot/doveadm-server INBOX
>   # echo $?
>   0
>   # doveadm fts optimize -u u0...@example.jp
>   # echo $?
>   0
>   # doveadm fts rescan -u u0...@example.jp
>   # echo $?
>   0
>   # doveadm index -u u0...@example.jp INBOX
>   # echo $?
>   0

Regards

-- 
-- Name: SATOH Fumiyasu @ OSS Technology Corp. (fumiyas @ osstech co jp)
-- Business Home: http://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA


Re: And one more core-dump in imap:str.c str_append(cstr = NULL)

2015-12-16 Thread Timo Sirainen
On 15 Dec 2015, at 18:11, Peter Eriksson  wrote:
> 
> Dovecot 2.2.20
> Solaris 10 / x86
> Maildir
> 
> q
> 
> 
> (dbx) where
>  [1] strlen(0x0, 0x0, 0x491baa, 0x0, 0x4d1ed0, 0x4d1ed0), at 
> 0xfd7ffeaf6dd0 
> =>[2] str_append(str = 0x4a9120, cstr = (nil)), line 96 in "str.c"
>  [3] client_get_commands_status(client = 0x4d16c0), line 282 in 
> "imap-client.c"

Thanks. This should fix it: 
https://github.com/dovecot/core/commit/c8e9fa2ffa2566e75f0500808b1bc9bf5d9db024


Re: [bug][Pigeonhole 0.4.10] Missing msgid

2015-12-16 Thread Alexander Moisseev

On 16.12.15 12:32, Stephan Bosch wrote:


That means that LTMP performed that delivery. That would normally only
happen when an error occurs.


No errors. All mail is delivering as expected.


Do you see anything strange in the user log? Does system log show
anything more when mail_debug=yes is active?



There is nothing unusual in the log.
Dec 16 12:43:29 mx dovecot: lmtp(72024): Connect from local
Dec 16 12:43:29 mx dovecot: lmtp(use...@example.com): bD6dNzIycVZYGQEAPZa6/Q: 
sieve: stored mail into mailbox 'INBOX'
Dec 16 12:43:29 mx postfix/lmtp[72023]: 7C9D836: to=, 
relay=mx.mezonplus.ru[private/dovecot-lmtp], delay=0.05, delays=0.02/0/0/0.02, dsn=2.0.0, 
status=sent (250 2.0.0  bD6dNzIycVZYGQEAPZa6/Q Saved)
Dec 16 12:43:29 mx dovecot: lmtp(72024): Disconnect from local: Successful quit
Dec 16 12:43:29 mx postfix/qmgr[70108]: 7C9D836: removed


What is your configuration?

Attached.

mx# doveadm config -n
# 2.2.21 (5345f22): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.10 (d61ff8a5af9e+)
# OS: FreeBSD 10.2-RELEASE i386
auth_default_realm = mezonplus.ru
auth_mechanisms = digest-md5 cram-md5 plain apop
doveadm_password =  # hidden, use -P to show it
first_valid_gid = 1000
first_valid_uid = 1000
lda_mailbox_autosubscribe = yes
listen = *
mail_attachment_dir = /vmail/attachments
mail_gid = vmail
mail_home = /vmail/%d/%n
mail_location = mdbox:~/mdbox
mail_plugins = quota zlib acl
mail_shared_explicit_inbox = yes
mail_uid = vmail
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
namespace {
  list = children
  location = mdbox:%%h/mdbox:INDEXPVT=~/mdbox/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Archives {
special_use = \Archive
  }
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = scheme=plain username_format=%n 
/usr/local/etc/dovecot/dovecot.auth/%d.passwd
  driver = passwd-file
}
plugin {
  acl = vfile
  acl_shared_dict = file:/vmail/shared-mailboxes.db
  antispam_backend = spool2dir
  antispam_spam = Junk
  antispam_spool2dir_notspam = /tmp/spamspool/%%020lu-%u-%%05luh
  antispam_spool2dir_spam = /tmp/spamspool/%%020lu-%u-%%05lus
  antispam_trash = Trash;train_ham;train_prob;train_spam
  quota = dict:User quota::file:%h/dovecot-quota
  quota_rule = *:storage=2G
  quota_rule2 = Trash:storage=+10%%
  quota_rule3 = Spam:storage=+20%%
  quota_status_nouser = DUNNO
  quota_status_success = DUNNO
  sieve_after = /usr/local/etc/dovecot/sieve/sieve.after
  sieve_before = /usr/local/etc/dovecot/sieve/sieve.before
  sieve_vacation_min_period = 0
  zlib_save = gz
  zlib_save_level = 3
}
postmaster_address = postmas...@mezonplus.ru
protocols = imap lmtp sieve pop3
quota_full_tempfail = yes
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
user = vmail
  }
}
service config {
  unix_listener config {
mode = 0600
user = vmail
  }
}
service imap-login {
  inet_listener imaps {
port = 0
  }
  process_limit = 200
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
  user = vmail
}
service pop3-login {
  inet_listener pop3s {
port = 0
  }
}
service quota-status {
  client_limit = 1
  executable = quota-status -p postfix
  unix_listener /var/spool/postfix/private/quota-status {
user = postfix
  }
}
ssl_cert = 

Re: [bug][Pigeonhole 0.4.10] Missing msgid

2015-12-16 Thread Stephan Bosch
Op 12/16/2015 om 10:32 AM schreef Stephan Bosch:
> Op 12/16/2015 om 8:31 AM schreef Alexander Moisseev:
>> Pigeonhole 0.4.10 doesn't log msgid for some messages.
>>
>> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
>> EbLlL2gLcVYCBgEAPZa6/Q: sieve:
>> msgid=<20151216065756.be1df1f...@cp.bitrix24.com>: forwarded to
>> 
>> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
>> EbLlL2gLcVYCBgEAPZa6/Q: sieve: stored mail into mailbox 'INBOX'
>> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
>> FrLlL2gLcVYCBgEAPZa6/Q: sieve:
>> msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: forwarded to
>> 
>> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
>> FrLlL2gLcVYCBgEAPZa6/Q: sieve:
>> msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: stored mail into
>> mailbox 'bitrix'
> That means that LTMP performed that delivery. That would normally only
> happen when an error occurs.

Oh, but it does have a "sieve: " prefix... hmm.

Regards,

Stephan


Re: [bug][Pigeonhole 0.4.10] Missing msgid

2015-12-16 Thread Stephan Bosch
Op 12/16/2015 om 8:31 AM schreef Alexander Moisseev:
> Pigeonhole 0.4.10 doesn't log msgid for some messages.
>
> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
> EbLlL2gLcVYCBgEAPZa6/Q: sieve:
> msgid=<20151216065756.be1df1f...@cp.bitrix24.com>: forwarded to
> 
> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
> EbLlL2gLcVYCBgEAPZa6/Q: sieve: stored mail into mailbox 'INBOX'
> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
> FrLlL2gLcVYCBgEAPZa6/Q: sieve:
> msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: forwarded to
> 
> Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com):
> FrLlL2gLcVYCBgEAPZa6/Q: sieve:
> msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: stored mail into
> mailbox 'bitrix'

That means that LTMP performed that delivery. That would normally only
happen when an error occurs.

Do you see anything strange in the user log? Does system log show
anything more when mail_debug=yes is active?

What is your configuration?

Regards,


Stephan.


Re: Error: fcntl(write-lock) locking failed

2015-12-16 Thread Frido Otten
Op 14-12-15 om 19:39 schreef Marcin Janowski:
> Hello, one month ago I moved my smtp and imap server to other environment
> with /var/vmail on NFS. After this move i have warnings about too long
> "Locking transaction log", but today i have errors about "fcntl(write-lock)
> locking failed ". What this means?
>
> And this is errors from few day:
>
> 2015-12-14 15:33:35 1450103615 Dec 14 15:32:44 smtp-atena dovecot:
> imap(...): Error: fcntl(write-lock) locking failed for file
> /var/vmail/.../Maildir/dovecot.index.log: No locks available
>

We've had locking issues also. When I check your config I don't see any
nfs specific configuration options. Please check
http://wiki2.dovecot.org/NFS first.
We have thought to find a solution by using dotlock in our multi Dovecot
server setup, because fcntl didn't work at all on our  OpenIndiana ZFS
solution. We still had issues then and found out that, while we've set
Dovecot to use dotlocks exclusively, it would still use fcntl sometimes.
(Mail handling was slow, had to wait for lock timeouts) So now we've
ended up by telling Dovecot not to use locking at all by setting
"mail_nfs_storage = no" and "mail_nfs_index = no". That way it works,
but when you have multiple servers handling your email, you may get
issues accessing one mailbox by two or more Dovecot servers
simultaneously. You should use Dovecot director to solve that problem.

Regards,
Frido




signature.asc
Description: OpenPGP digital signature