Re: [Dovecot] Probs authenticating to Dovecot

2013-04-15 Thread Kris Magnusson
I have triple (trippple) checked the recommended configuration and it is per 
the how-to. 

The SQL is likely fine. I'm not a SQL maven, but I'm not dumb about SQL, and it 
passed a couple of inspections.

You're right that telnet localhost 110 doesn't work.

postconf -a reports that it knows about cyrus and dovecot.

I don't really trust this ISPConfig thing, as it likes to do its own stuff that 
flies in the face of reason, and introducing a DB into the mix just made things 
an order of magnitude more complicated. I'd rather use OpenLDAP, since I can 
write JNDI code to figure out what's going on with a directory and even 
add/modify/delete entries to/in the directory.

I will blow this VM away and start from scratch. Unless anyone has any concrete 
suggestions I can implement before then that I can use to salvage a day's worth 
of work.

Is there a best possible OS for running Dovecot/Postfix? That would be a step 
in the right direction. Ubuntu is great for running WordPress, but I recognize 
there are different OSes out there. I don't care if it's Linux-based or a BSD 
distribution. 

Will Dovecot/Postfix scale without a RDBMS backing it up? Or will OpenLDAP 
suffice?

Thanks much.

Kris

On Apr 15, 2013, at 11:16 PM, Noel Butler  wrote:

> On Mon, 2013-04-15 at 21:43 -0700, Kris Magnusson wrote:
> 
>> Hi folks. I have set up a Ubuntu 12.04 VM with Dovecot, Postfix, MySQL, 
>> amavisd, and ISPConfig 3. 
> 
> 
> 
> 
>> tatic IP. I followed the instructions at howtoforge.com to set up and 
>> configure this 
> 
> 
> Somebody else recently used some howto from there and had no end of
> troubles.
> 
> 
> 
>> But if I run alpine on mail, I can send and receive mail all day long. 
>> Here's a log entry that demonstrates this:
>> 
>> Apr 15 01:20:01 mail postfix/smtpd[4284]: connect from localhost[127.0.0.1]
>> Apr 15 01:20:01 mail postfix/smtpd[4284]: lost connection after CONNECT from 
>> localhost[127.0.0.1]
>> Apr 15 01:20:01 mail postfix/smtpd[4284]: disconnect from 
>> localhost[127.0.0.1]
> 
> 
> 
>> Apr 15 01:20:01 mail dovecot: pop3-login: Disconnected (no auth attempts in 
>> 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, 
>> session=
> 
> 
> 
> eh? that says you did not log in pop3,  and postfix by default will
> relay for localhost, well, with most configs in  mynetworks having
> localhost it will.
> 
> telnet mail 110
> user username
> pass password
> list
> quit
> ... does that work? I bet it doesn't.
> 
> 
> 
>> root@mail:/etc/dovecot# more dovecot.conf
> 
> dovecot -n   output is best
> 
> 
> 
> 
>> listen = *,[::]
>> protocols = imap pop3
> 
> 
> you use sieve below, but now in proto?
> 
>> auth_mechanisms = plain login
>> disable_plaintext_auth = no
>> log_timestamp = "%Y-%m-%d %H:%M:%S "
>> mail_privileged_group = vmail
>> ssl_cert = > ssl_key =  
> 
> 
>> passdb {
>>  args = /etc/dovecot/dovecot-sql.conf
>>  driver = sql
>> }
> 
> 
> verify your sql is valid by using mysql shell
> 
> 
>> userdb {
>>  args = /etc/dovecot/dovecot-sql.conf
>>  driver = sql
>> }
>> plugin {
>>  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
>>  sieve=/var/vmail/%d/%n/.sieve
>> }
>> service auth {
>>  unix_listener /var/spool/postfix/private/auth {
>>group = postfix
>>mode = 0660
>>user = postfix
>>  }
>>  unix_listener auth-userdb {
>>group = vmail
>>mode = 0600
>>user = vmail
>>  }
>>  user = root
>> }
>> protocol imap {
>>  mail_plugins = quota imap_quota
>> }
>> protocol pop3 {
>>  pop3_uidl_format = %08Xu%08Xv
>>  mail_plugins = quota
>> }
>> protocol lda {
>>  mail_plugins = sieve quota
>> }
>> 
> 
> 
> You need to check your postconf -n   output as well to make sure it
> knows dovecot.
> 
> postconf -ashould show dovecot (maybe cyrus as well, but it needs to
> know dovecot)
> 
> 
>> Any thoughts or recommendations?
> 
> If you followed whatever guide it was in full, and have triple checked
> that, ummm, find another guide? 
> 



Re: [Dovecot] Probs authenticating to Dovecot

2013-04-15 Thread Noel Butler
On Mon, 2013-04-15 at 21:43 -0700, Kris Magnusson wrote:

> Hi folks. I have set up a Ubuntu 12.04 VM with Dovecot, Postfix, MySQL, 
> amavisd, and ISPConfig 3. 




> tatic IP. I followed the instructions at howtoforge.com to set up and 
> configure this 


Somebody else recently used some howto from there and had no end of
troubles.



> But if I run alpine on mail, I can send and receive mail all day long. Here's 
> a log entry that demonstrates this:
> 
> Apr 15 01:20:01 mail postfix/smtpd[4284]: connect from localhost[127.0.0.1]
> Apr 15 01:20:01 mail postfix/smtpd[4284]: lost connection after CONNECT from 
> localhost[127.0.0.1]
> Apr 15 01:20:01 mail postfix/smtpd[4284]: disconnect from localhost[127.0.0.1]



> Apr 15 01:20:01 mail dovecot: pop3-login: Disconnected (no auth attempts in 0 
> secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, 
> session=



eh? that says you did not log in pop3,  and postfix by default will
relay for localhost, well, with most configs in  mynetworks having
localhost it will.

telnet mail 110
user username
pass password
list
quit
... does that work? I bet it doesn't.



> root@mail:/etc/dovecot# more dovecot.conf

dovecot -n   output is best




> listen = *,[::]
> protocols = imap pop3


you use sieve below, but now in proto?

> auth_mechanisms = plain login
> disable_plaintext_auth = no
> log_timestamp = "%Y-%m-%d %H:%M:%S "
> mail_privileged_group = vmail
> ssl_cert =  ssl_key =  passdb {
>   args = /etc/dovecot/dovecot-sql.conf
>   driver = sql
> }


verify your sql is valid by using mysql shell


> userdb {
>   args = /etc/dovecot/dovecot-sql.conf
>   driver = sql
> }
> plugin {
>   quota = dict:user::file:/var/vmail/%d/%n/.quotausage
>   sieve=/var/vmail/%d/%n/.sieve
> }
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> group = postfix
> mode = 0660
> user = postfix
>   }
>   unix_listener auth-userdb {
> group = vmail
> mode = 0600
> user = vmail
>   }
>   user = root
> }
> protocol imap {
>   mail_plugins = quota imap_quota
> }
> protocol pop3 {
>   pop3_uidl_format = %08Xu%08Xv
>   mail_plugins = quota
> }
> protocol lda {
>   mail_plugins = sieve quota
> }
> 


You need to check your postconf -n   output as well to make sure it
knows dovecot.

postconf -ashould show dovecot (maybe cyrus as well, but it needs to
know dovecot)


> Any thoughts or recommendations?

If you followed whatever guide it was in full, and have triple checked
that, ummm, find another guide? 



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] SSHA512 auth not working

2013-04-15 Thread Noel Butler
On Tue, 2013-04-16 at 03:54 +0200, Marcin Czupryniak wrote:

> I'm trying to configure SSHA512 passwords and when testing discovered 
> that they were not working as expected.
> At first i was using Centos 6.4 which doesn't have the glibc CRYPT 
> newest functions ($6$salt$pass) so had to rollback to the Dovecot format 
> ({SSHA512.HEX}saltedpassword+salt ) but I'm unable to let dovecot 
> authenticate properly.
> 


I have one CentOS server (5.9) and only one, so can't test any others
(they are all slackware)
but... 


crypt($pass, '$6$' . $salt)


"dino",  results in:

 $6$n.vM3bqg3C6LPtJv
$keF2z/6VXv99NKf92Abbz/sPLBcWHV2hBXOkDf41OKLqe9p7V39xcFc92K1S4WvWQ3rK0konAw.pV.YEQspuM.

So if 6.4 does not work, you are missing something.

try this 
#!/path/to/perl
$pass ="dino";
@pschars = ("A" .. "Z", "a" .. "z", 0 .. 9, ".", "/");
$salt=  join '', @pschars[map {rand @pschars} (1..16)];
$sha512p = crypt($pass, '$6$' . $salt);
print "\n $sha512p \n";





signature.asc
Description: This is a digitally signed message part


[Dovecot] Probs authenticating to Dovecot

2013-04-15 Thread Kris Magnusson
Hi folks. I have set up a Ubuntu 12.04 VM with Dovecot, Postfix, MySQL, 
amavisd, and ISPConfig 3. The VM has tons of RAM and disk and processor and is 
permanently connected to the Internet with a static IP. I followed the 
instructions at howtoforge.com to set up and configure this VM and am using 
ISPConfig to set up a mail hub for multiple domains. I have the DNS for my 
other domains' MX records pointing at this host—we'll call it "mail."

Here's the version of Dovecot I'm using:

root@mail:# dovecot --version
2.1.7

Anyway, when I try to connect to my VM and Dovecot using Mail.app on Mountain 
Lion, I get the following messages in mail.log:

Apr 15 01:18:40 mail postfix/smtpd[4284]: connect from 
50-196-170-xxx-static.hfc.comcastbusiness.net[50.196.170.xxx]
Apr 15 01:18:40 mail dovecot: auth-worker(4331): mysql(localhost): Connected to 
database dbispconfig
Apr 15 01:18:42 mail postfix/smtpd[4284]: warning: 
50-196-170-xxx-static.hfc.comcastbusiness.net[50.196.170.xxx]: SASL PLAIN 
authentication failed: 
Apr 15 01:18:42 mail postfix/smtpd[4284]: disconnect from 
50-196-170-xxx-static.hfc.comcastbusiness.net[50.196.170.xxx]
Apr 15 01:18:54 mail dovecot: imap-login: Disconnected (auth failed, 1 attempts 
in 6 secs): user=, method=PLAIN, rip=50.196.170.xxx, lip=50.196.170.yyy, 
TLS, session=
Apr 15 01:19:04 mail dovecot: imap-login: Disconnected (auth failed, 1 attempts 
in 10 secs): user=, method=PLAIN, rip=50.196.170.xxx, lip=50.196.170.yyy, 
TLS, session=

But if I run alpine on mail, I can send and receive mail all day long. Here's a 
log entry that demonstrates this:

Apr 15 01:20:01 mail postfix/smtpd[4284]: connect from localhost[127.0.0.1]
Apr 15 01:20:01 mail postfix/smtpd[4284]: lost connection after CONNECT from 
localhost[127.0.0.1]
Apr 15 01:20:01 mail postfix/smtpd[4284]: disconnect from localhost[127.0.0.1]
Apr 15 01:20:01 mail dovecot: pop3-login: Disconnected (no auth attempts in 0 
secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, 
session=

So I thought it was a problem with SASL not liking PLAIN authentication. When I 
go to /etc/dovecot and print the contents of dovecot.conf, I see that 
auth_mechanisms = plain login. 

root@mail:/etc/dovecot# more dovecot.conf
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
ssl_cert = 

Re: [Dovecot] rsync migration issue [solved]

2013-04-15 Thread Luigi Rosa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Luigi Rosa said the following on 15/04/2013 20:25:

> I mounted the NFS on the new server with -o nolock
> 
> This is not the first time I use this method and it always worked. Until
> now.
> 
> If I try to rsync the current maildir structure to the new server I get
> MANY errors like:
> 
> rsync: readdir("/mnt//username"): Invalid argument (22) rsync:
> readdir("/mnt//username/.Deleted Messages/cur"): Too many levels of 
> symbolic links (40)

For the record: solved using rsync over ssh instead of mounting the file
system with NFS.


Ciao,
luigi

- -- 
/
+--[Luigi Rosa]--
\

Mathematicians are like Frenchmen: whatever you say to them they translate
into their own language and forthwith it is something entirely different.
--Johann Wolfgang von Goethe
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlFs2lUACgkQ3kWu7Tfl6ZSRTACfbDpq7+jxIL6LgFILFd1qM3YW
rY0AoMfew+XII5Geb9JxsvaeYiTgBUTX
=DkXI
-END PGP SIGNATURE-


[Dovecot] SSHA512 auth not working

2013-04-15 Thread Marcin Czupryniak
I'm trying to configure SSHA512 passwords and when testing discovered 
that they were not working as expected.
At first i was using Centos 6.4 which doesn't have the glibc CRYPT 
newest functions ($6$salt$pass) so had to rollback to the Dovecot format 
({SSHA512.HEX}saltedpassword+salt ) but I'm unable to let dovecot 
authenticate properly.


Some logs and details:

Apr 16 02:55:37 auth: Debug: client in: AUTH1   PLAIN 
service=imaplip=xxx   rip=xxx  lport=143 rport=58171 
resp=AGRpbm9AYWJjLml0AGRpbm8=
Apr 16 02:55:37 auth: Debug: sql(d...@abc.it,): query: SELECT 
'{SSHA512.HEX}' || password as password FROM mailboxes WHERE 
fullusername='d...@abc.it'
Apr 16 02:55:37 auth: Info: sql(d...@abc.it,): Password mismatch 
(given password: dino)
Apr 16 02:55:37 auth: Error: md5_verify(d...@abc.it): Not a valid 
MD5-CRYPT or PLAIN-MD5 password

Apr 16 02:55:37 auth: Warning: Invalid OTP data in passdb
Apr 16 02:55:37 auth: Warning: Invalid OTP data in passdb
Apr 16 02:55:37 auth: Debug: sql(d...@abc.it,): SSHA512.HEX(dino) != 
'd449914d83c85a786bcde7114b3dfdb24a651c27956388ac641d46eaf40c86e7c95ce2534348730475c8893eab314af189b3a46bf6d76b82cfba119e920813a531e985acd35c47ca8d3cafe50b595b66'

Apr 16 02:55:39 auth: Debug: client out: FAIL   1 user=d...@abc.it


Full password as taken from database: 
{SSHA512.HEX}d449914d83c85a786bcde7114b3dfdb24a651c27956388ac641d46eaf40c86e7c95ce2534348730475c8893eab314af189b3a46bf6d76b82cfba119e920813a531e985acd35c47ca8d3cafe50b595b66


The first 128 chars are the salted password, remaining 32 the salt (hex 
uuid representation)


I've checked twice that the generated passwords are correct, in fact if 
you salt the password (dino) you get the exact 128chars as in the stored 
password but dovecot compares the full password with the salt (160 
chars), is this correct?


Any ideas?


[Dovecot] Dovecot 2.2.0 compile error

2013-04-15 Thread rauchwolke
Hi,

i tried to compile dovecot 2.2.0 and i end up with this error:

make[6]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
/bin/sh ../../libtool --tag=CC   --mode=link mips-openwrt-linux-uclibc-gcc  
-std=gnu99 -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves 
-mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable 
-msoft-float  -Wall -W -Wmissing-prototypes -Wmissing-declarations 
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
-fno-builtin-strftime -Wstrict-aliasing=2 
-I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -no-undefined -Wl,--as-needed 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
  -o gdbhelper gdbhelper.o ../../src/lib-dovecot/libdovecot.la -export-dynamic 
-ldl 
OpenWrt-libtool: link: mips-openwrt-linux-uclibc-gcc -std=gnu99 -Os -pipe 
-mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts 
-Wno-error=unused-but-set-variable -msoft-float -Wall -W -Wmissing-prototypes 
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 
-Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 
-I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -Wl,--as-needed -o .libs/gdbhelper gdbhelper.o -Wl,--export-dynamic  
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
 ../../src/lib-dovecot/.libs/libdovecot.so -ldl -Wl,-rpath -Wl,/usr/lib/dovecot
../../src/lib-dovecot/.libs/libdovecot.so:(.got+0x0): multiple definition of 
`_GLOBAL_OFFSET_TABLE_'
collect2: ld returned 1 exit status
make[6]: *** [gdbhelper] Error 1
make[6]: Leaving directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
Making all in doveadm
make[6]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/doveadm'
Making all in dsync
make[7]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/doveadm/dsync'
make[7]: Nothing to be done for `all'.

Version 2.1.16 compiled fine. How can i fix this linker error?

With kind regards



[Dovecot] Moving mail servers, moving mailboxes

2013-04-15 Thread Gregory Sloop
So, I've done some searching - but search terms are hard to come by,
that work, for this query.

In short, migrating a RHEL 5.9 server running the back-ported Dovecot 1.0.7
To: Ububtu 12.04 with 2.0.19, I believe.

[I'm not against compiling a more recent version if there's some real
advantage to doing so. But I'd certainly prefer to stay with the
packaged version.]

Most users are POP3, with some leaving messages on the server for a
while.

Other users are IMAP - whole mail repository on server.

---
In an ideal world, I'd like to simply copy all the mailboxes/dirs from one
server to the other. [Local/LAN file copies are possible]

It would be great if the message ID's wouldn't change, so the
read/unread/new etc status all all the messages wouldn't change
between the two servers for POP/IMAP.

---
So, does anyone have a reasonable walk-through for doing so?
Is this a poor idea?
Should I simply set myself on fire now and save everyone a lot of hassle? :)
Would you suggest an alternative, and tell me if it might achieve the
objectives above?

I'm more than glad to take pointers to threads on this topic. I just
haven't been able to dredge this up with my Google-foo.

TIA
-Greg



Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Pascal Volk
On 04/15/2013 06:55 PM Timo Sirainen wrote:
> On Mon, 2013-04-15 at 19:53 +0300, Timo Sirainen wrote:
>> Uh, wrong directory. This patch. :)
> 
> Once more, with some error checks :)

OK, applied that patch. Lets see what will happen.


Regards,
Pascal
-- 
The trapper recommends today: defaced.1310...@localdomain.org


[Dovecot] Delete_to_Trash plugin problem

2013-04-15 Thread BINOTTO Luis SIDOR
   Hello list... I am new at dovecot and I have a problem with it;
any help will be very grateful

We have a exchange server with outlook at the client side, and
we are migrating the exchange server to postfix/dovecot(1.2.15)
solution.

I enabled the "deleted-to-trash" plugin (v0.3) to move the messages to
the Trash folder automatically when it is deleted. Also, I am using
quota and quota_imap plugins to maintain the quota for users. The quota
rule for Trash folder is unlimit.

The problem is, when the client reach their maximum quota and
try to delete a mail in the inbox to release space. The delete to trash
plugin effectively copy it to the Trash folder, but the original mail
still remain (marked for delete) at the inbox folder and the quota does
not released.

Am I doing something wrong?

Thanking you in anticipation

 

Luis Binotto.

 



" Notificacion Automatica:
Este mensaje y cualquier archivo que se adjunte contiene informacion 
privilegiada y confidencial. Es para uso exclusivo del destinatario. Si usted 
ha recibido esta comunicacion por error, por favor avisenos inmediatamente.
Automatic notification: 
This e-mail and any file transmitted with it are confidential and may be 
legally privileged. It is intended solely for the addressee and may not be 
disclosed to or used by anyone other than the addressee. If you have received 
this e-mail by mistake , please advise the sender immediately"


[Dovecot] rsync migration issue

2013-04-15 Thread Luigi Rosa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am trying to migrate a mail server from an old VM to a new one.

I have maildir and virtual users, the files and dirs of the file system are
owned by a single user.

I exported the old (now in production) /var/spool/mail with
(ro,no_root_squash) parameters

I mounted the NFS on the new server with -o nolock

This is not the first time I use this method and it always worked. Until now.

If I try to rsync the current maildir structure to the new server I get MANY
errors like:

rsync: readdir("/mnt//username"): Invalid argument (22)
rsync: readdir("/mnt//username/.Deleted Messages/cur"): Too many levels of
symbolic links (40)

I tried with

 rsync -a
 rsync --force --delete-after --devices --specials --sparse -tPrlHpogEAX
 rsync --force --delete-after --devices --specials --sparse -tPrlHpogEAXL

but the result is the same.


Suggestions? I don't want to tgz every mailbox, but I wuold like to do a rsync
during the night and a final rsync bevore switching IP addresses to minimize
downtime.



Ciao,
luigi

- -- 
/
+--[Luigi Rosa]--
\

It has just been discovered that research causes cancer in rats.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlFsRfcACgkQ3kWu7Tfl6ZRNbQCgk9AR7THYXT6+rqLFE5H8zSem
QhUAnR33bNbcXwWfNSj8PN0YgY40gdHH
=salc
-END PGP SIGNATURE-


Re: [Dovecot] Dict quota question

2013-04-15 Thread Antoine Nguyen
2013/4/15 Timo Sirainen 

>
> You can't have both static userdb and sql userdb. Create just one sql
> userdb, which returns something like:
>
> select quota_rule, 123 uid, 123 as gid, '/home/%u' as home from
> quota_limits where username = '%u'
>

Ok. I didn't know it was possible to use variables into sql lookup results.
Good to know :)


>
> I don't really understand what sql dict vs maildir backend has to do with
> it. Both of them get the limits from the same quota_rule the same way
> (although with maildir if you don't return a quota_rule, it gets the limits
> from the maildirsize file, maybe you were seeing this).
>

I think you're right, the quota limit should come from the  maildirsize
file.

Thanks for your help !

Antoine


Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 19:53 +0300, Timo Sirainen wrote:
> On Mon, 2013-04-15 at 19:50 +0300, Timo Sirainen wrote:
> > On Mon, 2013-04-15 at 16:37 +0200, Pascal Volk wrote:
> > 
> > > some imap processes seems to have some problems.
> > 
> > I still can't reproduce .. but I wonder if the attached patch makes a
> > difference.
> 
> Uh, wrong directory. This patch. :)

Once more, with some error checks :)

diff -r b38d5ebacf25 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Mon Apr 15 17:22:06 2013 +0300
+++ b/src/imap/cmd-append.c	Mon Apr 15 19:54:49 2013 +0300
@@ -777,6 +777,11 @@
 	if (ctx->litinput->eof || client->input->closed) {
 		bool all_written = ctx->litinput->v_offset == ctx->literal_size;
 
+		if (all_written && ctx->save_ctx != NULL && !ctx->failed) {
+			if (mailbox_save_continue(ctx->save_ctx) < 0)
+ctx->failed = TRUE;
+		}
+
 		/* finished - do one more read, to make sure istream-chain
 		   unreferences its stream, which is needed for litinput's
 		   unreferencing to seek the client->input to correct


Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 19:50 +0300, Timo Sirainen wrote:
> On Mon, 2013-04-15 at 16:37 +0200, Pascal Volk wrote:
> 
> > some imap processes seems to have some problems.
> 
> I still can't reproduce .. but I wonder if the attached patch makes a
> difference.

Uh, wrong directory. This patch. :)

diff -r b38d5ebacf25 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c	Mon Apr 15 17:22:06 2013 +0300
+++ b/src/imap/cmd-append.c	Mon Apr 15 19:48:40 2013 +0300
@@ -777,6 +777,11 @@
 	if (ctx->litinput->eof || client->input->closed) {
 		bool all_written = ctx->litinput->v_offset == ctx->literal_size;
 
+		if (all_written) {
+			if (mailbox_save_continue(ctx->save_ctx) < 0)
+ctx->failed = TRUE;
+		}
+
 		/* finished - do one more read, to make sure istream-chain
 		   unreferences its stream, which is needed for litinput's
 		   unreferencing to seek the client->input to correct


Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 16:37 +0200, Pascal Volk wrote:

> some imap processes seems to have some problems.

I still can't reproduce .. but I wonder if the attached patch makes a
difference.

Also in the gdb these would be useful to know:

p *attach.input.real_stream.parent.real_stream
p *attach.input.real_stream.parent.real_stream.parent.real_stream
p 
*attach.input.real_stream.parent.real_stream.parent.real_stream.parent.real_stream

(not sure how many parents it has)

diff -r 613258f9f541 src/lib-sieve/edit-mail.c
--- a/src/lib-sieve/edit-mail.c	Mon Oct 29 22:42:34 2012 +0100
+++ b/src/lib-sieve/edit-mail.c	Sat Jan 05 01:34:21 2013 +0200
@@ -1078,6 +1078,13 @@
 	return edmail->wrapped->v.get_modseq(&edmail->wrapped->mail);
 }
 
+static uint64_t edit_mail_get_pvt_modseq(struct mail *mail)
+{
+	struct edit_mail *edmail = (struct edit_mail *)mail;
+
+	return edmail->wrapped->v.get_pvt_modseq(&edmail->wrapped->mail);
+}
+
 static int edit_mail_get_parts
 (struct mail *mail, struct message_part **parts_r)
 {
@@ -1397,6 +1404,13 @@
 	edmail->wrapped->v.update_modseq(&edmail->wrapped->mail, min_modseq);
 }
 
+static void edit_mail_update_pvt_modseq(struct mail *mail, uint64_t min_pvt_modseq)
+{
+	struct edit_mail *edmail = (struct edit_mail *)mail;
+
+	edmail->wrapped->v.update_pvt_modseq(&edmail->wrapped->mail, min_pvt_modseq);
+}
+
 static void edit_mail_update_pop3_uidl(struct mail *mail, const char *uidl)
 {
 	struct edit_mail *edmail = (struct edit_mail *)mail;
@@ -1431,6 +1445,7 @@
 	edit_mail_get_keywords,
 	edit_mail_get_keyword_indexes,
 	edit_mail_get_modseq,
+	edit_mail_get_pvt_modseq,
 	edit_mail_get_parts,
 	edit_mail_get_date,
 	edit_mail_get_received_date,
@@ -1447,6 +1462,7 @@
 	edit_mail_update_flags,
 	edit_mail_update_keywords,
 	edit_mail_update_modseq,
+	edit_mail_update_pvt_modseq,
 	edit_mail_update_pop3_uidl,
 	edit_mail_expunge,
 	edit_mail_set_cache_corrupted,


Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Marc Perkel


On 4/15/2013 7:23 AM, Timo Sirainen wrote:

On Mon, 2013-04-15 at 17:10 +0300, Timo Sirainen wrote:

Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file message-parser.c: line 
698 (preparsed_parse_prologue_more): assertion failed: (ctx->part->children != 
NULL)

You can reproduce this? What if you delete that mailbox's dovecot.index.cache 
and search twice after that?

Actually don't bother, looks like I can reproduce it myself also. :) I
thought it was a more rare problem.

I don't think it is a very common problem actually, I just happened to
have such mail in my inbox. This fixes it:
http://hg.dovecot.org/dovecot-2.2/rev/b38d5ebacf25






So - will there be a 2.2.1 out today?




Re: [Dovecot] v2.2.0 released

2013-04-15 Thread Stephan Bosch

On 4/15/2013 6:16 PM, Timo Sirainen wrote:

On 15.4.2013, at 18.55, l...@airstreamcomm.net wrote:


Does the new obox plugin support any of the open source object storage systems 
such as openstack, glusterfs, or ceph?  From your store site it does not appear 
so.

Glusterfs isn't really object storage (unless they've changed since I last 
looked at them), and it already more or less works with Dovecot using the 
existing mailbox formats. Except last I heard it still caused index file 
corruption.

Openstack Swift support is coming. There's a half-working version of it 
already, would need just a day or two to finish it up.


Looks like Openstack support would imply GlusterFS Object Storage support:

http://gluster.org/community/documentation/index.php/About33

Regards,

Stephan


Re: [Dovecot] v2.2.0 released

2013-04-15 Thread Emmanuel Dreyfus
On Mon, Apr 15, 2013 at 07:16:44PM +0300, Timo Sirainen wrote:
> Glusterfs isn't really object storage (unless they've changed since I 
> last looked at them),

I did not test it, but object storage was added in 3.3, IIRC.

-- 
Emmanuel Dreyfus
m...@netbsd.org


Re: [Dovecot] v2.2.0 released

2013-04-15 Thread Timo Sirainen
On 15.4.2013, at 18.55, l...@airstreamcomm.net wrote:

> Does the new obox plugin support any of the open source object storage 
> systems such as openstack, glusterfs, or ceph?  From your store site it does 
> not appear so.

Glusterfs isn't really object storage (unless they've changed since I last 
looked at them), and it already more or less works with Dovecot using the 
existing mailbox formats. Except last I heard it still caused index file 
corruption.

Openstack Swift support is coming. There's a half-working version of it 
already, would need just a day or two to finish it up.

I haven't looked at Ceph closely yet, but it would be nice to support it as 
well.

obox can also be used with a regular POSIX filesystem, although it loses the 
prefetching capabilities then. So it could be used with e.g. Glusterfs or NFS 
to provide an efficient local cache. I've also thought about trying out if 
prefetching could be done by creating new "diskio" processes with a ton of 
threads doing the actual disk I/O.



Re: [Dovecot] v2.2.0 released

2013-04-15 Thread l...@airstreamcomm.net

On 4/12/13 12:33 PM, Timo Sirainen wrote:

http://dovecot.org/releases/2.2/dovecot-2.2.0.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.0.tar.gz.sig

Everything now seems to be stable and working in v2.2, so I can finally
move onto developing great new interesting features for v2.3. :)

My company has also launched a web shop where you can buy various
products. One of them is cheap access to Dovecot enterprise edition
repositories, which are basically same as regular Dovecot releases,
except they are kept patched with the latest important bugfixes. We
currently have releases for RHEL/CentOS 5 and 6, Debian Squeeze and
Ubuntu 12.04 LTS. By buying Dovecot-EE you'll also get a 30 day demo
license for object storages, if you want to try it out.
http://shop.dovecot.fi/

* When creating home directories, the permissions are copied from the
  parent directory if it has setgid-bit set. For full details, see
  http://wiki2.dovecot.org/SharedMailboxes/Permissions
* "doveadm auth" command was renamed to "doveadm auth test"
* IMAP: ID command now advertises server name as Dovecot by default.
  It was already trivial to guess this from command replies.
* dovecot.index.cache files can be safely accessed only by v2.1.11+.
  Older versions may think they're corrupted and delete them.
* LDA/LMTP: If saving a mail brings user from under quota to over
  quota, allow it based on quota_grace setting (default: 10%
  above quota limit).
* pop3_lock_session=yes now uses a POP3-only dovecot-pop3-session.lock
  file instead of actually locking the mailbox (and causing
  IMAP/LDA/LMTP to wait for the POP3 session to close).
* mail_shared_explicit_inbox setting's default switched to "no".
* ssl_client_ca_dir setting replaced imapc_ssl_ca_dir and
  pop3c_ssl_ca_dir settings.

+ Implemented IMAP MOVE and BINARY extensions
+ Implemented IMAP CATENATE, URLAUTH and URLAUTH=BINARY extensions
  (by Stephan Bosch).
+ Implemented IMAP NOTIFY extension. Requires mailbox_list_index=yes
  to be enabled.
+ Redesigned and rewritten dsync. The new design makes the syncing
  faster, more reliable and more featureful. The new dsync protocol
  isn't backwards compatible with old dsync versions (but is designed
  to be forwards compatible with future versions).
+ All mailbox formats now support per-user message flags for shared
  mailboxes by using a private index. It can be enabled by adding
  :INDEXPVT= to mail location. This should be used instead of
  :INDEX also for Maildir/mbox to improve performance.
+ Improved mailbox list indexes. They should be usable now, although
  still disabled by default.
+ Added LAYOUT=index. The mailbox directories are created using their
  GUIDs in the filesystem, while the actual GUID <-> name mapping
  exists only in the index.
+ LMTP proxy: Implemented XCLIENT extension for passing remote IP
  address through proxy.




Does the new obox plugin support any of the open source object storage 
systems such as openstack, glusterfs, or ceph?  From your store site it 
does not appear so.




Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Pascal Volk
On 04/15/2013 04:51 PM, Timo Sirainen wrote:
> Can you reproduce it? What client was that with? I wonder if it was
> using CATENATE extension.

Three users where able to crash their imap service. All three users are
using Thunderbird 17.0.5@Windows.

I'm not sure what they've done exactly. Nobody complained about it - so far.


Regards,
Pascal


Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 16:37 +0200, Pascal Volk wrote:

> some imap processes seems to have some problems.

Can you reproduce it? What client was that with? I wonder if it was
using CATENATE extension.




[Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-15 Thread Pascal Volk
Hi Timo,

some imap processes seems to have some problems.


Regards,
Pascal
Core was generated by `dovecot/imap'.
Program terminated with signal 6, Aborted.
#0  0x7fbf87b25475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x7fbf87b25475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7fbf87b286f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x7fbf87ef71c9 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) 
at failures.c:191
backtrace = 0x194bf58 "/usr/local/lib/dovecot/libdovecot.so.0(+0x7a1a2) 
[0x7fbf87ef71a2] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x7b4cd) 
[0x7fbf87ef84cd] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7fbf87ef7"...
#3  0x7fbf87ef84cd in i_internal_fatal_handler (ctx=0x7fffb895a7b0, 
format=0x7fbf8828f4c0 "file %s: line %d (%s): assertion failed: (%s)", 
args=0x7fffb895a798) at failures.c:652
status = 0
#4  0x7fbf87ef74a5 in i_panic (format=0x7fbf8828f4c0 "file %s: line %d 
(%s): assertion failed: (%s)") at failures.c:263
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 
0x7fffb895a880, reg_save_area = 0x7fffb895a7c0}}
#5  0x7fbf8822776e in index_attachment_save_finish (ctx=0x19ed140) at 
index-attachment.c:231
attach = 0x1a0d870
__FUNCTION__ = "index_attachment_save_finish"
#6  0x7fbf881b3ab0 in dbox_save_end (ctx=0x19ed140) at dbox-save.c:106
mdata = 0x19ed150
dbox_output = 0x1a07008
__FUNCTION__ = "dbox_save_end"
#7  0x7fbf881aadf7 in mdbox_save_finish_write (_ctx=0x19ed140) at 
mdbox-save.c:198
ctx = 0x19ed140
mail = 0x636c08
#8  0x7fbf881aaf5d in mdbox_save_finish (ctx=0x19ed140) at mdbox-save.c:228
ret = 0
#9  0x7fbf872c505b in quota_save_finish (ctx=0x19ed140) at 
quota-storage.c:281
qbox = 0x19e0a50
#10 0x7fbf882041f7 in mailbox_save_finish (_ctx=0x1971498) at 
mail-storage.c:2022
ctx = 0x19ed140
t = 0x19ebdc0
keywords = 0x0
pvt_flags = 0
copying_via_save = false
ret = 0
__FUNCTION__ = "mailbox_save_finish"
#11 0x0040d165 in cmd_append_continue_message (cmd=0x1971340) at 
cmd-append.c:802
all_written = true
client = 0x1970760
ctx = 0x1971438
ret = 0
#12 0x0041a04e in command_exec (cmd=0x1971340) at imap-commands.c:156
hook = 0x1954da0
ret = false
#13 0x0040b9be in client_input_append (cmd=0x1971340) at 
cmd-append.c:112
ctx = 0x1971438
client = 0x1970760
reason = 0x7fbf87ef5033 "H\213\005.3'"
finished = false
__FUNCTION__ = "client_input_append"
#14 0x7fbf87f0e58d in io_loop_call_io (io=0x19de2a0) at ioloop.c:387
ioloop = 0x1953720
t_id = 2
#15 0x7fbf87f101ed in io_loop_handler_run (ioloop=0x1953720) at 
ioloop-epoll.c:215
ctx = 0x1953aa0
events = 0x1953b10
event = 0x1953b10
list = 0x1971290
io = 0x19de2a0
tv = {tv_sec = 59, tv_usec = 999033}
events_count = 6
msecs = 6
ret = 1
i = 0
j = 0
call = true
__FUNCTION__ = "io_loop_handler_run"
#16 0x7fbf87f0e630 in io_loop_run (ioloop=0x1953720) at ioloop.c:406
No locals.
#17 0x7fbf87ea609e in master_service_run (service=0x19535b0, 
callback=0x426143 ) at master-service.c:560
No locals.
#18 0x0042645c in main (argc=1, argv=0x1953390) at main.c:400
set_roots = {0x42f500, 0x0}
login_set = {auth_socket_path = 0x194b050  , 
postlogin_socket_path = 0x0, postlogin_timeout_secs = 60, callback = 0x425f07 
, failure_callback = 0x4260cf , 
request_auth_token = 1}
service_flags = MASTER_SERVICE_FLAG_KEEP_CONFIG_OPEN
storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT
username = 0x0
c = -1
# 2.2.0: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot_dbg.log
dict {
  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 7
first_valid_uid = 7
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_access_groups = dovemail
mail_attachment_dir = /srv/mail/.SiS/%X{gid}
mail_attachment_fs = sis posix:mode=0660
mail_attachment_hash = %{sha256}
mail_location = mdbox:~/mdbox
mail_plugins = quota stats zlib
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 ihave
namespace Public {
  location = 
maildir:/srv/mail/.public/%X{gid}/Maildir:LAYOUT=fs:INDEX=~/Maildir/public
  prefix = "#Public/"
  separator = /
  

Re: [Dovecot] Dict quota question

2013-04-15 Thread Timo Sirainen
On 13.4.2013, at 15.52, Antoine Nguyen  wrote:

> I'm using Dovecot 2.1.16 and I'd like to know if the following
> configuration is supported:
> 
> * An SQL dictionary quota
> * A static userdb to get uid/gid/home information
> * An SQL userdb to get per-user quota limit
> 
> Currenlty, current quota usage are properly stored into the database but
> per-user limits are not found. If I replace the SQL dictionary by the
> maildir backend (my previous config.), it works as expected.
> 
> Do you have any idea?

You can't have both static userdb and sql userdb. Create just one sql userdb, 
which returns something like:

select quota_rule, 123 uid, 123 as gid, '/home/%u' as home from quota_limits 
where username = '%u'

I don't really understand what sql dict vs maildir backend has to do with it. 
Both of them get the limits from the same quota_rule the same way (although 
with maildir if you don't return a quota_rule, it gets the limits from the 
maildirsize file, maybe you were seeing this).



Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 17:10 +0300, Timo Sirainen wrote:
> > > >> Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file 
> > > >> message-parser.c: line 698 (preparsed_parse_prologue_more): assertion 
> > > >> failed: (ctx->part->children != NULL)
> > > > You can reproduce this? What if you delete that mailbox's 
> > > > dovecot.index.cache and search twice after that?
> 
> Actually don't bother, looks like I can reproduce it myself also. :) I
> thought it was a more rare problem.

I don't think it is a very common problem actually, I just happened to
have such mail in my inbox. This fixes it:
http://hg.dovecot.org/dovecot-2.2/rev/b38d5ebacf25




Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 17:09 +0300, Timo Sirainen wrote:
> On Mon, 2013-04-15 at 06:43 -0700, Marc Perkel wrote:
> > On 4/15/2013 2:09 AM, Timo Sirainen wrote:
> > > On 15.4.2013, at 8.35, Marc Perkel  wrote:
> > >
> > >> When doing a server side message body search I got this in the logs:
> > >>
> > >> Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file 
> > >> message-parser.c: line 698 (preparsed_parse_prologue_more): assertion 
> > >> failed: (ctx->part->children != NULL)
> > > You can reproduce this? What if you delete that mailbox's 
> > > dovecot.index.cache and search twice after that?
> > >
> > 
> > New update - tried it again and got the error in the logs:
> 
> There's one mail that causes this crash. Any chance you can find that
> and send it to me? Would make fixing it a bit easier. For example you
> can probably find it with:

Actually don't bother, looks like I can reproduce it myself also. :) I
thought it was a more rare problem.




Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Timo Sirainen
On Mon, 2013-04-15 at 06:43 -0700, Marc Perkel wrote:
> On 4/15/2013 2:09 AM, Timo Sirainen wrote:
> > On 15.4.2013, at 8.35, Marc Perkel  wrote:
> >
> >> When doing a server side message body search I got this in the logs:
> >>
> >> Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file 
> >> message-parser.c: line 698 (preparsed_parse_prologue_more): assertion 
> >> failed: (ctx->part->children != NULL)
> > You can reproduce this? What if you delete that mailbox's 
> > dovecot.index.cache and search twice after that?
> >
> 
> New update - tried it again and got the error in the logs:

There's one mail that causes this crash. Any chance you can find that
and send it to me? Would make fixing it a bit easier. For example you
can probably find it with:

doveadm exec imap -u supp...@junkemailfilter.com
a select inbox
b search 1:100 text foobar

And then move around in the 1:100 range until you find the mail. Then
you can get the mail (e.g. 123) with:

doveadm fetch -u supp...@junkemailfilter.com text mailbox inbox 123 > email.txt




Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Marc Perkel


On 4/15/2013 2:09 AM, Timo Sirainen wrote:

On 15.4.2013, at 8.35, Marc Perkel  wrote:


When doing a server side message body search I got this in the logs:

Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file message-parser.c: line 
698 (preparsed_parse_prologue_more): assertion failed: (ctx->part->children != 
NULL)

You can reproduce this? What if you delete that mailbox's dovecot.index.cache 
and search twice after that?



New update - tried it again and got the error in the logs:

Apr 15 06:40:28 imap-login: Info: Login: 
user=, method=PLAIN, rip=::1, lip=::1, 
mpid=11228, secured, session=<82RcZWbaRgAB>
Apr 15 06:40:28 imap(supp...@junkemailfilter.com): Panic: file 
message-parser.c: line 698 (preparsed_parse_prologue_more): assertion 
failed: (ctx->part->children != NULL)
Apr 15 06:40:28 imap(supp...@junkemailfilter.com): Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x5f45a) [0x7f6d585bf45a] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x5f4a6) [0x7f6d585bf4a6] -> 
/usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f6d5857fd4f] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x52863) [0x7f6d585b2863] -> 
/usr/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x29) 
[0x7f6d585b2349] -> 
/usr/lib/dovecot/libdovecot.so.0(message_search_msg+0x5d) 
[0x7f6d585b451d] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x9d558) 
[0x7f6d588bd558] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(mail_search_args_foreach+0x3c) 
[0x7f6d58894c3c] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x9d289) 
[0x7f6d588bd289] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x9e2fd) 
[0x7f6d588be2fd] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(index_storage_search_next_nonblock+0xe8) 
[0x7f6d588be938] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_search_next_nonblock+0x27) 
[0x7f6d58899057] -> dovecot/imap [supp...@junkemailfilter.com ::1 UID 
SEARCH]() [0x41a78f] -> dovecot/imap [supp...@junkemailfilter.com ::1 
UID SEARCH](imap_search_start+0xe9) [0x41abf9] -> dovecot/imap 
[supp...@junkemailfilter.com ::1 UID SEARCH](cmd_search+0xc5) [0x40ff75] 
-> dovecot/imap [supp...@junkemailfilter.com ::1 UID 
SEARCH](command_exec+0x3d) [0x414f5d] -> dovecot/imap 
[supp...@junkemailfilter.com ::1 UID SEARCH]() [0x4140c0] -> 
dovecot/imap [supp...@junkemailfilter.com ::1 UID SEARCH]() [0x4141ad] 
-> dovecot/imap [supp...@junkemailfilter.com ::1 UID 
SEARCH](client_handle_input+0x11d) [0x41442d] -> dovecot/imap 
[supp...@junkemailfilter.com ::1 UID SEARCH](client_input+0x6f) 
[0x41479f] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) 
[0x7f6d585ce3a6] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xa7) 
[0x7f6d585cf407] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28) 
[0x7f6d585ce348] -> 
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) 
[0x7f6d58584a03] -> dovecot/imap [supp...@junkemailfilter.com ::1 UID 
SEARCH](main+0x2a7) [0x41d997] -> 
/lib64/libc.so.6(__libc_start_main+0xfd) [0x7f6d581e6cdd] -> 
dovecot/imap [supp...@junkemailfilter.com ::1 UID SEARCH]() [0x40a4d9]
Apr 15 06:40:28 imap(supp...@junkemailfilter.com): Fatal: master: 
service(imap): child 11228 killed with signal 6 (core dumps disabled)


These files were recreated:

-rw-rw  1 mail mail  48 Apr 15 06:40 dovecot-keywords
-rw-rw  1 mail mail  678358 Apr 15 06:40 dovecot-uidlist



Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Marc Perkel


On 4/15/2013 2:09 AM, Timo Sirainen wrote:

On 15.4.2013, at 8.35, Marc Perkel  wrote:


When doing a server side message body search I got this in the logs:

Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file message-parser.c: line 
698 (preparsed_parse_prologue_more): assertion failed: (ctx->part->children != 
NULL)

You can reproduce this? What if you delete that mailbox's dovecot.index.cache 
and search twice after that?





I deleted all index files in location INDEX=/email/imap-cache/%d-%n - 
same result.


I then deleted these files:

-rw---  1 mail mail  41 Mar 21  2007 dovecot-keywords
-rw---  1 mail mail  694046 Apr 15 06:20 dovecot-uidlist
-rw---  1 mail mail   8 Dec  5 07:58 dovecot-uidvalidity
-rw---  1 mail mail   0 Apr  1  2009 dovecot-uidvalidity.49d3bf54

The search still didn't work but there was no crash report in the logs. 
When I say the search didn't work it found nothing and it returned way 
to fast.






[Dovecot] lazy_expunge plugin with virtual mailboxes

2013-04-15 Thread Gilles Chauvin
Hi,

When using both lazy_expunge and virtual mailboxes (with, for instance, a "All 
Messages" virtual mailbox) as soon as a user deletes/expunges a mail in one of 
its mailbox, Dovecot is saving two mails to the lazy_expunge namespace (the 
one in the user mailbox and the one in the virtual mailbox).

Is there some kind of trick to make Dovecot ignore any mail deleted from a 
virtual mailbox namespace ?


Thanks,
Gilles.


Re: [Dovecot] Dict quota question

2013-04-15 Thread Antoine Nguyen
Up.

Any idea about this? Does anybody ever try to build such a configuration?

Thanks.


2013/4/13 Antoine Nguyen 

> Hi all,
>
> I'm using Dovecot 2.1.16 and I'd like to know if the following
> configuration is supported:
>
> * An SQL dictionary quota
> * A static userdb to get uid/gid/home information
> * An SQL userdb to get per-user quota limit
>
> Currenlty, current quota usage are properly stored into the database but
> per-user limits are not found. If I replace the SQL dictionary by the
> maildir backend (my previous config.), it works as expected.
>
> Do you have any idea?
>
> Thanks in advance,
>
> Antoine Nguyen
> http://modoboa.org/
>


Re: [Dovecot] v2.2.0 - possible bug?

2013-04-15 Thread Timo Sirainen
On 15.4.2013, at 8.35, Marc Perkel  wrote:

> When doing a server side message body search I got this in the logs:
> 
> Apr 14 22:32:24 imap(supp...@junkemailfilter.com): Panic: file 
> message-parser.c: line 698 (preparsed_parse_prologue_more): assertion failed: 
> (ctx->part->children != NULL)

You can reproduce this? What if you delete that mailbox's dovecot.index.cache 
and search twice after that?



[Dovecot] Coredump -> backtrace Script

2013-04-15 Thread Ralf Hildebrandt
I wrote a little something about how I'm automatically creating
backtraces from coredumps:
http://sys4.de/de/blog/2013/04/13/core-catcher-linux/

I've been using this with Dovecot-HEAD and Squid-HEAD, mostly :)

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich