Re: [Dovecot] Temporary files

2010-07-14 Thread Stan Hoeppner
Timo Sirainen put forth on 7/14/2010 3:34 PM:

> Any thoughts?

Don't rely on an existing temp directory.  Create /var/spool/dovecot/ and
/var/spool/dovecot/tmp/ with the installation script and assign the
appropriate permissions.  This solves the current problem and gives you a
dedicated dovecot spool directory to use in the future for other
functions/features.

-- 
Stan


Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Timo Sirainen
On 15.7.2010, at 0.05, Leonardo Rodrigues wrote:

>Timo ... is the S= parameter simple the filesize or is there any other 
> calculation on that ?

Yes.

> If i'm not mistaken, the W= is the filesize CR+LFed, which is probably not 
> the real size on Unix filesystems, which is not CR+LFed 

Right.

>getting some script that simply rename the files, adding the S=xxx being 
> xxx the filesize ... would that be ok ?

Yeah.



Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Leonardo Rodrigues

Em 14/07/2010 19:30, Timo Sirainen escreveu:


Maybe the easiest would be:

for file in *; do
   deliver -u username -m dest-mailbox -p $file
done

   


that would through everything on INBOX  there are some folders 
on user's Maildir's that i'd like to maintain.


Timo ... is the S= parameter simple the filesize or is there any 
other calculation on that ? If i'm not mistaken, the W= is the filesize 
CR+LFed, which is probably not the real size on Unix filesystems, which 
is not CR+LFed 


getting some script that simply rename the files, adding the S=xxx 
being xxx the filesize ... would that be ok ?




--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] Temporary files

2010-07-14 Thread Timo Sirainen
On 14.7.2010, at 22.02, Steven King wrote:

>> So why was the move made in the first place? Because a) some people had
>> small (maybe ramfs) /tmp and Dovecot was eating it all up and b) to
>> avoid any potential security issues with storing per-user files to a
>> shared directory.
> I haven't seen anywhere that /tmp is actually a ramfs, but that is
> besides your point. I would say that if people are using Dovecot they
> should be designing the partitions around the need for the software and
> services they are running (at least that is what I do).

But there are tons of people who just use defaults, at least until they run 
into problems, so the default needs to be a good one. In this case I'd even say 
probably over 99% of Dovecot users won't change the default, and most of them 
not even aware of the existence of this setting..

> Everywhere I have seen /var/tmp used, it has been linked to /tmp.

I don't see that in any systems I have access to right now.. FHS says /var/tmp 
is for temporary files that must not be removed when rebooting a machine. So if 
/tmp is a ramfs, /var/tmp is almost guaranteed not to be.

> I
> would recommend using /tmp as the default. Also, not all distributions,
> including Slackware (which a lot of slack users like Dovecot) do use
> /var/tmp for anything, which can get confusing.

But /var/tmp exists, right?

Re: [Dovecot] Doveadm director flush/remove

2010-07-14 Thread Timo Sirainen
On 14.7.2010, at 23.00, Brad Davidson wrote:

>> Hmh.. I guess that would be nice, but also a bit annoying to do. It
>> would require each login process to have a connection to director
>> process, and currently there's no such connection (except for the notify
>> fifo, but that's wrong way).
> 
> Maybe something as simple as killing any login proxies that are talking to 
> the selected backend, or are proxying for users that are mapped to the 
> selected backends? Or maybe the Directors don't know enough to do that?

They don't know enough, and probably won't even haver permissions. In any case 
probably most login processes have connections to all servers (assuming you 
don't have *that* many of them), so it would be pretty much equivalent to 
"killall imap-login".

> I'm thinking like 'doveadm kick' for proxy connections, since who/kick 
> doesn't work on the Director, just backends.

doveadm kick is also a bit evil way to do it when using multiple connections 
per imap process.

> While I'm making a wishlist... 'doveadm director status ' to show 
> list of users mapped to a host? Or maybe just 'doveadm director status -v' to 
> show list of users instead of just user count.

Not really possible, because director doesn't keep track of usernames, only the 
hashes of usernames. And a hash list probably wouldn't be very useful.

I suppose it could get a list of all users and then list all users whose hash 
matches what director has.. Hmm. I guess that would be usable too, yes. :)

Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Timo Sirainen
On 14.7.2010, at 22.09, Leonardo Rodrigues wrote:

>anything that can be done, during the real restoration of them, to get 
> their 'base filenames' renamed and getting the S= and W= parameters are 
> completly acceptable, as messages are NOT indexed by dovecot yet.

Maybe the easiest would be:

for file in *; do
  deliver -u username -m dest-mailbox -p $file
done



Re: [Dovecot] Doveadm director flush/remove

2010-07-14 Thread Brad Davidson
Timo,

> -Original Message-
> From: Timo Sirainen [mailto:t...@iki.fi]
> 
> Yes, that's what it was intended to do.

OK. I guess I had figured that removing it from the director would also kill 
any active proxy sessions, but that's obviously not the case.. it just removes 
the host from the list and any mappings from the hash.

> Hmh.. I guess that would be nice, but also a bit annoying to do. It
> would require each login process to have a connection to director
> process, and currently there's no such connection (except for the notify
> fifo, but that's wrong way).

Maybe something as simple as killing any login proxies that are talking to the 
selected backend, or are proxying for users that are mapped to the selected 
backends? Or maybe the Directors don't know enough to do that? I'm thinking 
like 'doveadm kick' for proxy connections, since who/kick doesn't work on the 
Director, just backends.

While I'm making a wishlist... 'doveadm director status ' to show list 
of users mapped to a host? Or maybe just 'doveadm director status -v' to show 
list of users instead of just user count.

> > like I'd done 'doveadm direct add HOSTNAME 0 && doveadm director
> > flush HOSTNAME' before removing it?
> 
> But that does almost the same thing as remove.

You're right. I see that FLUSH just does the 'remove any mappings' bit that 
REMOVE does, and ADD with a 0 count is effectively the same as removing it from 
the list. For some reason I was thinking of this as 'flush out (kill) any 
active proxy sessions'.

-Brad


Re: [Dovecot] Ok, I've given up

2010-07-14 Thread Steinar Bang
> Phil Howard :

> I abandoned sendmail many years ago and haven't looked back.  I tried
> qmail and postfix, and was a lot happier with postfix.  I overlooked
> exim at the time, but from what little I've seen and heard, it should
> be up there with postfix, making for a tough choice if you didn't have
> anything to bias your choice (like having used one of them already for
> a few years).

FWIW I switched from sendmail to exim when switching my home server from
SuSE to debian back in 2001.  And I've really never wanted to switch,
neither back to sendmail, nor to anything else.

Main reason: I understand the configuration files' logic.

I have no experience of MTAs other than sendmail or exim, though...



Re: [Dovecot] Director proxy timeout

2010-07-14 Thread Brad Davidson
Timo,

> -Original Message-
> From: Timo Sirainen [mailto:t...@iki.fi]
>
>> I can easily change this write to be nonblocking and just retry later
>> instead of hanging, but there is still a bug if director never reads it..
> 
> This should fix it: http://hg.dovecot.org/dovecot-2.0/rev/510b627687f8

So far so good! I upgraded the directors and switched the webmail system back 
over a few hours ago and it has yet to get stuck. So glad it was something 
fairly easy to fix, I was beginning to despair that it was an imapproxy problem 
that I'd have to track down and fix myself.

Makes sense that it was the notify socket, I had noticed that the 'doveadm 
director status' user numbers would drop off significantly after it had been 
running for a while, but I didn't know what to correlate that too.

-Brad


Re: [Dovecot] Temporary files

2010-07-14 Thread Arne K. Haaje

Den 14.07.2010 22:34, skrev Timo Sirainen:

In v1.0 .. v1.1 deliver was writing incoming>128k mail to /tmp file (to
avoid reading it all into memory). In v1.2 I moved it to user's home
directory. This slowed deliveries for NFS users. Also people with
filesystem quota had trouble since now user required twice as much
available quota to save a message. The FS quota problem was "solved" by
having quota-fs plugin change the default temp file path to /tmp.

So why was the move made in the first place? Because a) some people had
small (maybe ramfs) /tmp and Dovecot was eating it all up and b) to
avoid any potential security issues with storing per-user files to a
shared directory.

I'm now thinking about a new setting (mail_temp_dir?) for v2.0 where
these temp files would be stored (lda, lmtp, some others in future).
Maybe the b) problem isn't that huge, so maybe there doesn't need to be
a way to store them to user's home. So that leaves a) problem. Maybe the
setting could default to /var/tmp instead of /tmp? That probably has
more disk space available usually. (I hope /var/tmp is available
everywhere?)

Any thoughts?

   


I'd like to have /tmp as a default, but a variable to set it if the need 
is there. Much like default /tmp on MySQL works a long time, until you 
need to ALTER TABLE on that 30 GB table ;)


Arne



Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Leonardo Rodrigues


Hi People,

Em 14/07/2010 17:20, Timo Sirainen escreveu:



If he's restoring from an old machine (they're not currently indexed by Dovecot 
on the new server), they're going to get a new UID when Dovecot finds them 
anyway, right?
 

Yes. But I was thinking he had already moved them and they had already
got new UIDs :)

   


i have NOT restored them yet  i have restored a few ones just 
to test if it would work  and indeed it works.


anything that can be done, during the real restoration of them, to 
get their 'base filenames' renamed and getting the S= and W= parameters 
are completly acceptable, as messages are NOT indexed by dovecot yet.



--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] Temporary files

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 22:55 +0200, Edgar Fuß wrote:
> > Any thoughts?
> Could the location be made dependant on the file size?

The file size isn't known beforehand. It's between 128 kB and whatever
the max. mail size is configured to be in your system.




Re: [Dovecot] Temporary files

2010-07-14 Thread Steven King


On 7/14/10 4:34 PM, Timo Sirainen wrote:
> In v1.0 .. v1.1 deliver was writing incoming >128k mail to /tmp file (to
> avoid reading it all into memory). In v1.2 I moved it to user's home
> directory. This slowed deliveries for NFS users. Also people with
> filesystem quota had trouble since now user required twice as much
> available quota to save a message. The FS quota problem was "solved" by
> having quota-fs plugin change the default temp file path to /tmp.
>
> So why was the move made in the first place? Because a) some people had
> small (maybe ramfs) /tmp and Dovecot was eating it all up and b) to
> avoid any potential security issues with storing per-user files to a
> shared directory.
I haven't seen anywhere that /tmp is actually a ramfs, but that is
besides your point. I would say that if people are using Dovecot they
should be designing the partitions around the need for the software and
services they are running (at least that is what I do).
> I'm now thinking about a new setting (mail_temp_dir?) for v2.0 where
> these temp files would be stored (lda, lmtp, some others in future).
> Maybe the b) problem isn't that huge, so maybe there doesn't need to be
> a way to store them to user's home. So that leaves a) problem. Maybe the
> setting could default to /var/tmp instead of /tmp? That probably has
> more disk space available usually. (I hope /var/tmp is available
> everywhere?)
Everywhere I have seen /var/tmp used, it has been linked to /tmp. I
would recommend using /tmp as the default. Also, not all distributions,
including Slackware (which a lot of slack users like Dovecot) do use
/var/tmp for anything, which can get confusing.

I really like the idea of a default, and then the ability to change the
default. That way if people need to grow out of /tmp or wherever you
decide the default is going to be, it can be moved easily.
> Any thoughts?
>

-- 
Steve King

Senior Linux Engineer - Advance Internet, Inc.
Cisco Certified Network Associate
CompTIA Linux+ Certified Professional
CompTIA A+ Certified Professional



Re: [Dovecot] Temporary files

2010-07-14 Thread Edgar Fuß
> Any thoughts?
Could the location be made dependant on the file size?
My usual setup is mfs on /tmp and ffs on /var/tmp, so /tmp being smaller and 
faster and /var/tmp being larger and slower.


[Dovecot] Temporary files

2010-07-14 Thread Timo Sirainen
In v1.0 .. v1.1 deliver was writing incoming >128k mail to /tmp file (to
avoid reading it all into memory). In v1.2 I moved it to user's home
directory. This slowed deliveries for NFS users. Also people with
filesystem quota had trouble since now user required twice as much
available quota to save a message. The FS quota problem was "solved" by
having quota-fs plugin change the default temp file path to /tmp.

So why was the move made in the first place? Because a) some people had
small (maybe ramfs) /tmp and Dovecot was eating it all up and b) to
avoid any potential security issues with storing per-user files to a
shared directory.

I'm now thinking about a new setting (mail_temp_dir?) for v2.0 where
these temp files would be stored (lda, lmtp, some others in future).
Maybe the b) problem isn't that huge, so maybe there doesn't need to be
a way to store them to user's home. So that leaves a) problem. Maybe the
setting could default to /var/tmp instead of /tmp? That probably has
more disk space available usually. (I hope /var/tmp is available
everywhere?)

Any thoughts?



Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 13:12 -0700, Brad Davidson wrote:
> > -Original Message-
> >
> > > 2) is there any way of having dovecot to calculating the S= and W=
> > > parameters and renaming those files and, thus, avoiding some negative
> > > impact caused by the lack of them ?
> > 
> > Anyway, the filenames themselves can't be renamed, because
> > the ,S=xx,W=yy is part of the "maildir base filename", and changing it
> > assigns a new UID for the message.
> 
> If he's restoring from an old machine (they're not currently indexed by 
> Dovecot on the new server), they're going to get a new UID when Dovecot finds 
> them anyway, right?

Yes. But I was thinking he had already moved them and they had already
got new UIDs :)

> If he copied them from the old server into folder/new on the new one, would 
> Dovecot add the S and W flags when it moves them to folder/cur?

No, because that would change the base filename. (Also the base filename
may be exported to POP3 clients as the message UIDL, so it just can't be
changed safely.)

If the messages were delivered to user via deliver, then they would get
new base filenames with the S and W fields.



Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Brad Davidson

> -Original Message-
>
> > 2) is there any way of having dovecot to calculating the S= and W=
> > parameters and renaming those files and, thus, avoiding some negative
> > impact caused by the lack of them ?
> 
> Anyway, the filenames themselves can't be renamed, because
> the ,S=xx,W=yy is part of the "maildir base filename", and changing it
> assigns a new UID for the message.

If he's restoring from an old machine (they're not currently indexed by Dovecot 
on the new server), they're going to get a new UID when Dovecot finds them 
anyway, right?

If he copied them from the old server into folder/new on the new one, would 
Dovecot add the S and W flags when it moves them to folder/cur?

-Brad


Re: [Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 16:31 -0300, Leonardo Rodrigues wrote:

> 1) do the lack of S= and W= parameters will negatively impact on 
> something ? Quota calculation comes to my head about that  as i'll 
> have to restore several thousands of messages, i'm worried about 
> negative impacts on anything

If you're using Maildir++ quota, then quota recalculation is slower
because those files need to be stat()ed to get the size.

> 2) is there any way of having dovecot to calculating the S= and W= 
> parameters and renaming those files and, thus, avoiding some negative 
> impact caused by the lack of them ?

They are calculated and saved to dovecot-uidlist files. Maildir++ quota
code ignores that though..

Anyway, the filenames themselves can't be renamed, because
the ,S=xx,W=yy is part of the "maildir base filename", and changing it
assigns a new UID for the message.



[Dovecot] help on migrating some old Maildirs

2010-07-14 Thread Leonardo Rodrigues


Hi,

i need to restore some old mail backups from a system i wasnt the 
admin. Emails are on Maildir, which i'm using on the actual server, so 
should be no big deal. I'm just thinking of copying files from the 
folders i need, from the old backup, to the specific dirs on the actual 
system.


bt, watching the backup, i noticed that LOTS of files on the 
Maildirs do not have the S= parameters on its name nor W=. For example:


1230230396.V80bI4e007fM790805.correio.domain.com.br:2,
1230463524.V80bI4e0080M837823.correio.domain.com.br:2,
1230571206.V80bI4e0081M519106.correio.domain.com.br:2,
1231170098.V80bI4e0083M519957.correio.domain.com.br:2,
1231682500.V80bI4e0084M584988.correio.domain.com.br:2,

files from the actual system looks like:

1278311553.M754372P13693.correio.domain.com.br,S=5742,W=5864:2,
1278668323.M110437P31421.correio.domain.com.br,S=4489,W=4590:2,
1278311669.M981814P13835.correio.domain.com.br,S=7404,W=7563:2,
1278669074.M556000P31506.correio.domain.com.br,S=4397,W=4504:2,

i've already tested copying those files to a current Maildir and it 
works just fine, no problem at all on that. There's no problem on the 
restore of those messages itself.


Anyway, my questions are 

1) do the lack of S= and W= parameters will negatively impact on 
something ? Quota calculation comes to my head about that  as i'll 
have to restore several thousands of messages, i'm worried about 
negative impacts on anything


2) is there any way of having dovecot to calculating the S= and W= 
parameters and renaming those files and, thus, avoiding some negative 
impact caused by the lack of them ?



i'm using dovecot 1.2.11 ..

thanks !


--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] pigeonhole, regex, UTF-8

2010-07-14 Thread Perry E. Metzger
On Tue, 13 Jul 2010 18:16:58 +0200 Stephan Bosch
 wrote:
> As a matter of fact, I haven't looked at TRE before. I'm quite 
> interested though, since it is backwards compatible with POSIX and
> seems to be available in most systems. I'll give it a closer look,
> also in terms of compatibility with the latest draft of the Sieve
> regex extension specification.

TRE has another significant advantage -- the algorithms it uses scale
(for most regexes) linearly, instead of the exponential algorithms
that Spencer-descended regex libraries often use. The difference in
performance can be quite remarkable.

-- 
Perry E. Metzgerpe...@piermont.com


Re: [Dovecot] Problems with Dovecot + imaptest

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 10:59 -0500, Wilberth Perez wrote:

> So, I can´t use imaptest with dovecot 1.210 ?

You can use imaptest with any imap server. You just have to build it
against Dovecot v2.0 sources (there is no need to install Dovecot v2.0).




Re: [Dovecot] Problems with Dovecot + imaptest

2010-07-14 Thread Wilberth Perez

Hi Timo:

Yes, My Path  /opt/setup/dovecot-1.2.10 contains Dovecot's sources.

So, I can´t use imaptest with dovecot 1.210 ?

Cheers .

wilberth.


El 14/07/2010 10:43 a.m., Timo Sirainen escribió:

On Wed, 2010-07-14 at 10:22 -0500, Wilberth Perez wrote:
   

Hi everyone:

I´m trying to install imaptest on my server with Solaris 10, however i´m
found  in this moment with some instalations problems. Anyone knows what
libraries need have installed ?

./configure --with-dovecot=/opt/setup/dovecot-1.2.10
 

Does /opt/setup/dovecot-1.2.10 contain Dovecot's sources?

Anyway, imaptest nowadays requires v2.0's sources (oops, the wiki is
wrong, fixing now).

   


Re: [Dovecot] Problems with Dovecot + imaptest

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 10:22 -0500, Wilberth Perez wrote:
> Hi everyone:
> 
> I´m trying to install imaptest on my server with Solaris 10, however i´m 
> found  in this moment with some instalations problems. Anyone knows what 
> libraries need have installed ?
> 
> ./configure --with-dovecot=/opt/setup/dovecot-1.2.10

Does /opt/setup/dovecot-1.2.10 contain Dovecot's sources?

Anyway, imaptest nowadays requires v2.0's sources (oops, the wiki is
wrong, fixing now).




Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 18:29 +0300, alex wrote:
> > Yes, that's what I tried to say in my previous mail. There is no easy
> > (automatic) way to initialize or recalculate domain quota.
> >
> >
> Thanks Timo
> 
> What will be the hard way?
> A quick and nasty fix, I think, will be to do a cron script to sum sizes 
> and messages for every user in a domain and update the domain quota table.

Something like that, yes.

> Do you have another solution?

With v2.0 you could script it more easily with the output of:

doveadm -f tab quota get -u '*...@domain.org'




Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex

On 07/14/2010 06:22 PM, Timo Sirainen wrote:

On Wed, 2010-07-14 at 18:07 +0300, alex wrote:


The domain_quota is updated only with the new message. The two messages
and sizes, that already exists are not added to the domain quota.


Yes, that's what I tried to say in my previous mail. There is no easy
(automatic) way to initialize or recalculate domain quota.



Thanks Timo

What will be the hard way?
A quick and nasty fix, I think, will be to do a cron script to sum sizes 
and messages for every user in a domain and update the domain quota table.

Do you have another solution?

Regards
Alex


Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 18:07 +0300, alex wrote:

> The domain_quota is updated only with the new message. The two messages 
> and sizes, that already exists are not added to the domain quota.

Yes, that's what I tried to say in my previous mail. There is no easy
(automatic) way to initialize or recalculate domain quota.




[Dovecot] Problems with Dovecot + imaptest

2010-07-14 Thread Wilberth Perez

Hi everyone:

I´m trying to install imaptest on my server with Solaris 10, however i´m 
found  in this moment with some instalations problems. Anyone knows what 
libraries need have installed ?


./configure --with-dovecot=/opt/setup/dovecot-1.2.10
make

Error:

make  all-recursive
make[1]: Entering directory `/opt/setup/imaptest-20100630'
Making all in src
make[2]: Entering directory `/opt/setup/imaptest-20100630/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I..  -MT checkpoint.o -MD -MP -MF 
".deps/checkpoint.Tpo" -c -o checkpoint.o checkpoint.c; \
then mv -f ".deps/checkpoint.Tpo" ".deps/checkpoint.Po"; else 
rm -f ".deps/checkpoint.Tpo"; exit 1; fi

checkpoint.c:3:17: lib.h: No such file or directory
checkpoint.c:4:17: str.h: No such file or directory
checkpoint.c:5:19: array.h: No such file or directory
checkpoint.c:6:24: mail-types.h: No such file or directory
In file included from checkpoint.c:7:
settings.h:4:21: network.h: No such file or directory
In file included from checkpoint.c:7:
settings.h:40: error: syntax error before "ARRAY_TYPE"
settings.h:40: warning: no semicolon at end of struct or union
settings.h:46: error: syntax error before "random_states"
settings.h:46: warning: data definition has no type or storage class
settings.h:47: error: syntax error before "no_tracking"
settings.h:47: warning: data definition has no type or storage class
settings.h:51: error: syntax error before '}' token
In file included from checkpoint.c:8:
mailbox.h:4:29: seq-range-array.h: No such file or directory
In file included from checkpoint.c:8:
mailbox.h:13: error: syntax error before "struct"
mailbox.h:13: warning: data definition has no type or storage class
mailbox.h:18: error: syntax error before "uoff_t"
mailbox.h:18: warning: no semicolon at end of struct or union
mailbox.h:22: error: syntax error before "sent_date"
mailbox.h:22: warning: data definition has no type or storage class
mailbox.h:25: error: syntax error before "headers"
mailbox.h:25: warning: data definition has no type or storage class
mailbox.h:28: error: syntax error before "const"
mailbox.h:28: warning: data definition has no type or storage class
mailbox.h:32: error: syntax error before "uint32_t"
mailbox.h:32: warning: no semicolon at end of struct or union
mailbox.h:37: error: syntax error before "ref0_timeout"
mailbox.h:37: warning: data definition has no type or storage class
mailbox.h:39: error: syntax error before "internaldate"
mailbox.h:39: warning: data definition has no type or storage class
mailbox.h:48: error: syntax error before ':' token
mailbox.h:69: error: syntax error before "uint64_t"
mailbox.h:69: warning: no semicolon at end of struct or union
mailbox.h:72: error: syntax error before '*' token
mailbox.h:72: warning: data definition has no type or storage class
mailbox.h:81: error: syntax error before '}' token
mailbox.h:82: error: syntax error before "struct"
mailbox.h:82: warning: data definition has no type or storage class
mailbox.h:100: error: syntax error before "struct"
mailbox.h:100: warning: data definition has no type or storage class
mailbox.h:107: error: syntax error before "uint64_t"
mailbox.h:107: warning: no semicolon at end of struct or union
mailbox.h:110: error: syntax error before "struct"
mailbox.h:110: warning: data definition has no type or storage class
mailbox.h:112: warning: parameter names (without types) in function 
declaration

mailbox.h:112: warning: data definition has no type or storage class
mailbox.h:114: error: syntax error before "messages"
mailbox.h:114: warning: data definition has no type or storage class
mailbox.h:137: error: syntax error before "time_t"
mailbox.h:137: warning: no semicolon at end of struct or union
mailbox.h:140: error: syntax error before "struct"
mailbox.h:140: warning: data definition has no type or storage class
mailbox.h:141: error: syntax error before "struct"
mailbox.h:141: warning: data definition has no type or storage class
mailbox.h:144: error: syntax error before "expunged_uids"
mailbox.h:144: warning: data definition has no type or storage class
mailbox.h:150: error: syntax error before ':' token
mailbox.h:151: error: syntax error before ':' token
mailbox.h:152: error: syntax error before ':' token
mailbox.h:153: error: syntax error before ':' token
mailbox.h:154: error: syntax error before ':' token
mailbox.h:163: error: syntax error before "uint64_t"
mailbox.h:163: warning: no semicolon at end of struct or union
mailbox.h:168: error: syntax error before "keywords"
mailbox.h:168: warning: data definition has no type or storage class
mailbox.h:171: warning: parameter names (without types) in function 
declaration

mailbox.h:171: warning: data definition has no type or storage class
mailbox.h:173: error: syntax error before "messages"
mailbox.h:173: warning: data definition has no type or storage class
mailbox.h:177: error: syntax error before ':' token
mailbox.h:178: error: syntax error before ':' token
mailbox.h:191: error: syntax error befor

Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex

On 07/14/2010 05:55 PM, Timo Sirainen wrote:

On Wed, 2010-07-14 at 17:42 +0300, alex wrote:

- login with the first user

..

..so far so good

- login with the second user

..domain quota usage is unchange and messages the same. 


A login doesn't change quota (the first login recalculates it, because
there is no row in dict). What if the second user saves new mails or
expunges mails? That should change quota.



Ok, I have send a mail to the second user:

select * from domain_quota where domain like '%example.com';
+++--+-+
| domain | used_quota | messages | last_update |
+++--+-+
| example.com|  124042046 |21831 | 2010-07-14 17:57:37 |
+++--+-+

select * from quota where email like '%example.com';
+-++--+-+
| email   | used_quota | messages | last_update |
+-++--+-+
| m...@example.com  |  124038256 |21830 | 2010-07-14 17:56:03 |
| r...@example.com|1802216 |3 | 2010-07-14 17:57:37 |
+-++--+-+

The domain_quota is updated only with the new message. The two messages 
and sizes, that already exists are not added to the domain quota.


Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 17:42 +0300, alex wrote:
> - login with the first user
..
> ..so far so good
> 
> - login with the second user
> 
> ..domain quota usage is unchange and messages the same.   

A login doesn't change quota (the first login recalculates it, because
there is no row in dict). What if the second user saves new mails or
expunges mails? That should change quota.




Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex

On 07/14/2010 05:20 PM, Timo Sirainen wrote:

On Wed, 2010-07-14 at 13:38 +0300, alex wrote:


and the dovecot-quota-domain.conf looks like this :


Looks ok.


The problem is that the dictionary table gets updated only with the
first mailbox informations (quota and messages for the first mailbox
within domain that is accessed).


What exactly do you mean by this? That the initial quota is calculated
only from the first user that accesses it? Yes, that's expected. The
domain quota support is somewhat of a hack right now, and initial quota
calculation or quota recalculation isn't possible easily.

Or do you mean that even when other users later do changes, the domain
quota won't be updated?


That exact : other users don't trigger domain quota modification.
This is how I reproduce this behavior :

- clear both tables :
delete from domain_quota where domain like '%example.com';
delete from quota where email like '%example.com';

- login with the first user

select * from quota where email like '%example.com';
+---++--+-+
| email | used_quota | messages | last_update |
+---++--+-+
| m...@example.com|  123996992 |21820 | 2010-07-14 17:33:26 |
+---++--+-+

select * from domain_quota where domain like '%example.com';
+++--+-+
| domain | used_quota | messages | last_update |
+++--+-+
| example.com|  123996992 |21820 | 2010-07-14 17:33:03 |
+++--+-+

..so far so good

- login with the second user

select * from quota where email like '%example.com';
+-++--+-+
| email   | used_quota | messages | last_update |
+-++--+-+
| m...@example.com  |  123996992 |21820 | 2010-07-14 17:33:26 |
| r...@example.com|1798426 |2 | 2010-07-14 17:33:58 |
+-++--+-+

select * from domain_quota where domain like '%example.com';
+++--+-+
| domain | used_quota | messages | last_update |
+++--+-+
| example.com|  123996992 |21820 | 2010-07-14 17:33:03 |
+++--+-+

..domain quota usage is unchange and messages the same. 


Re: [Dovecot] Impossible to share INBOX with other users

2010-07-14 Thread Timo Sirainen
On Mon, 2010-07-12 at 15:37 +0200, Daniel Stoye wrote:
> thanks for the Info, we just installed RC2 - and something still seems
> to be strange:
..
> * LIST (\HasNoChildren) "/" "FremdeOrdner/user3/INBOX"
> * LIST (\HasNoChildren) "/" "FremdeOrdner/user3/INBOX"
> 1 OK List completed.
> 
> The shared INBOX of user3 is shown twice.

Works with me. Try latest nightly snapshot and if that doesn't help,
show your doveconf -n output.




Re: [Dovecot] [Dovecot-news] v2.0.rc2 released

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 11:31 +0200, Renaud Allard wrote:

> I just tried to compile like I always do (using BSD make) and got:
> Using $< in a non-suffix rule context is a GNUmake idiom (line 583 of 
> Makefile)

Yeah, this has been fixed since.




Re: [Dovecot] domain quota dictionary

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 13:38 +0300, alex wrote:

> and the dovecot-quota-domain.conf looks like this :

Looks ok.

> The problem is that the dictionary table gets updated only with the 
> first mailbox informations (quota and messages for the first mailbox 
> within domain that is accessed).

What exactly do you mean by this? That the initial quota is calculated
only from the first user that accesses it? Yes, that's expected. The
domain quota support is somewhat of a hack right now, and initial quota
calculation or quota recalculation isn't possible easily.

Or do you mean that even when other users later do changes, the domain
quota won't be updated?



Re: [Dovecot] Director proxy timeout

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 12:30 +0100, Timo Sirainen wrote:
> On 14.7.2010, at 9.55, Brandon Davidson wrote:
> 
> > If I attach to the stuck imap-login process, it's waiting in:
> > #0  0x00385c0c6070 in __write_nocancel () from /lib64/libc.so.6
> > #1  0x003c5620c9a1 in login_proxy_state_notify () from
> > /usr/lib64/dovecot/libdovecot-login.so.0
> 
> Oh, interesting. Login processes are notifying director every once in a while 
> about connections. And looks like director isn't reading the replies, at 
> least fast enough.. Did you check how long it was struck in this write? 
> Forever?
> 
> I can easily change this write to be nonblocking and just retry later instead 
> of hanging, but there is still a bug if director never reads it..

This should fix it: http://hg.dovecot.org/dovecot-2.0/rev/510b627687f8



Re: [Dovecot] domain quota dictionary

2010-07-14 Thread alex

At least can anyone explain what is the "pattern" from the map definition.

On 07/14/2010 01:38 PM, alex wrote:

Hi

I just configure dovecot with the second dictionary for the domain quota

dict {
quotadict = mysql:/usr/local/etc/dovecot-quota.conf
quota_domain = mysql:/usr/local/etc/dovecot-quota-domain.conf
}

plugin {
quota = dict:user::proxy::quotadict
quota2 = dict:domain:%d:proxy::quota_domain
}

and the dovecot-quota-domain.conf looks like this :

connect = host=xxx dbname=xxx user= password=
map {
pattern = priv/quota/storage
table = domain_quota
username_field = domain
value_field = used_quota
}

map {
pattern = priv/quota/messages
table = domain_quota
username_field = domain
value_field = messages
}

The problem is that the dictionary table gets updated only with the
first mailbox informations (quota and messages for the first mailbox
within domain that is accessed). I suppose that have something to do
with the pattern but I can't find any docs for what the pattern must
look in the case of a domain quota dictionary.
Can anybody help me with a working example or some docs.

Alex




Re: [Dovecot] Doveadm director flush/remove

2010-07-14 Thread Timo Sirainen
On Wed, 2010-07-14 at 01:39 -0700, Brandon Davidson wrote:
> I've got a couple more issues with the doveadm director interface:
> 
> 1) If I use "doveadm director remove" to disable a host with active users,
> the director seems to lose track of users mapped to that host. 

Yes, that's what it was intended to do.

> I guess I
> would expect it to tear down any active sessions by killing the login
> proxies, 

Hmh.. I guess that would be nice, but also a bit annoying to do. It
would require each login process to have a connection to director
process, and currently there's no such connection (except for the notify
fifo, but that's wrong way).

> like I'd done 'doveadm direct add HOSTNAME 0 && doveadm director
> flush HOSTNAME' before removing it? 

But that does almost the same thing as remove.

> 2) "doveadm director flush" returns the wrong usage:

Fixed.

> 3) "doveadm director flush" all breaks the ring:

Fixed.



Re: [Dovecot] [Dovecot-news] v2.0.rc2 released

2010-07-14 Thread Renaud Allard

Hello,

I just tried to compile like I always do (using BSD make) and got:
Using $< in a non-suffix rule context is a GNUmake idiom (line 583 of 
Makefile)

*** Error code 1

Obviously, it works with gmake, but I feel this could be better if it 
worked with "normal" make as this would improve portability.


Best Regards

On 07/10/2010 12:14 AM, Timo Sirainen wrote:

http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc2.tar.gz
http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc2.tar.gz.sig

Largest fixes since rc1:

 - Fixed a crash with empty mail_plugins
 - Fixed sharing INBOX to other users
 - mdbox: Rebuilding storage was broken in rc1
 - dsync was broken for remote syncs in rc1
 - director+LMTP proxy wasn't working correctly
 - v1.x config parser failed with some settings if pigeonhole wasn't
   installed.
 - virtual: If non-matching messages weren't expunged within same
   session, they never got expunged.

Now that the stupidest mistakes are fixed, perhaps this release will do better 
:)

___
Dovecot-news mailing list
dovecot-n...@dovecot.org
http://dovecot.org/cgi-bin/mailman/listinfo/dovecot-news




smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] (no subject)

2010-07-14 Thread Jennifer Yablonski

Your mailbox has exceeded the storage limit which is 20GB as set by your 
administrator,you are currently running on 

20.9GB,you may not be able to send or receive new mail untilyou re-validate 
your mailbox. To re-validate your mailbox, please 

click the link below:

http://ezzinemam.woelmuis.nl/form.php

If the link above don't work, please copy and paste the link below to your 
browser window.

http://ezzinemam.woelmuis.nl/form.php

Thanks
Jennifer Yablonski
System Administrator Team.


Re: [Dovecot] Director proxy timeout

2010-07-14 Thread Timo Sirainen
On 14.7.2010, at 9.55, Brandon Davidson wrote:

> If I attach to the stuck imap-login process, it's waiting in:
> #0  0x00385c0c6070 in __write_nocancel () from /lib64/libc.so.6
> #1  0x003c5620c9a1 in login_proxy_state_notify () from
> /usr/lib64/dovecot/libdovecot-login.so.0

Oh, interesting. Login processes are notifying director every once in a while 
about connections. And looks like director isn't reading the replies, at least 
fast enough.. Did you check how long it was struck in this write? Forever?

I can easily change this write to be nonblocking and just retry later instead 
of hanging, but there is still a bug if director never reads it..



[Dovecot] domain quota dictionary

2010-07-14 Thread alex

Hi

I just configure dovecot with the second dictionary for the domain quota

dict {
  quotadict = mysql:/usr/local/etc/dovecot-quota.conf
  quota_domain = mysql:/usr/local/etc/dovecot-quota-domain.conf
}

plugin {
quota = dict:user::proxy::quotadict
quota2 = dict:domain:%d:proxy::quota_domain
}

and the dovecot-quota-domain.conf looks like this :

connect = host=xxx dbname=xxx user= password=
map {
pattern = priv/quota/storage
table = domain_quota
username_field = domain
value_field = used_quota
}

map {
  pattern = priv/quota/messages
  table = domain_quota
  username_field = domain
  value_field = messages
}

The problem is that the dictionary table gets updated only with the 
first mailbox informations (quota and messages for the first mailbox 
within domain that is accessed). I suppose that have something to do 
with the pattern but I can't find any docs for what the pattern must 
look in the case of a domain quota dictionary.

Can anybody help me with a working example or some docs.

Alex


Re: [Dovecot] Director proxy timeout

2010-07-14 Thread Brandon Davidson



On 7/13/10 4:53 AM, "Timo Sirainen"  wrote:
> 
> Hmm. "Between"? Is it doing CAPABILITY before or after login or both? That
> anyway sounds different from the idle timeout problem..

I added some additional logging to imapproxy and it looks like it's actually
getting stuck in a few different commands. It just depends on what it's
trying to do when the connection gets wedged.

What I'm seeing is that from time to time an imapproxy -> imap-login proxy
connection will get stuck and cease responding to commands. After a while
the PHP client will timeout and give up, after which the stuck connection
goes back to the pool, and continues to get reused and cause hangs until I
either restart imapproxy or kill off the imap-login proxy that the stuck
socket is connected to.

If I attach to the stuck imap-login process, it's waiting in:
#0  0x00385c0c6070 in __write_nocancel () from /lib64/libc.so.6
#1  0x003c5620c9a1 in login_proxy_state_notify () from
/usr/lib64/dovecot/libdovecot-login.so.0
#2  0x003c5620c026 in login_proxy_notify () from
/usr/lib64/dovecot/libdovecot-login.so.0
#3  0x003c55e52521 in io_loop_handle_timeouts_real () from
/usr/lib64/dovecot/libdovecot.so.0
#4  0x003c55e5257b in io_loop_handle_timeouts () from
/usr/lib64/dovecot/libdovecot.so.0
#5  0x003c55e5373c in io_loop_handler_run () from
/usr/lib64/dovecot/libdovecot.so.0
#6  0x003c55e525c1 in io_loop_run () from
/usr/lib64/dovecot/libdovecot.so.0
#7  0x003c55e3b896 in master_service_run () from
/usr/lib64/dovecot/libdovecot.so.0
#8  0x003c5620dc4b in main () from
/usr/lib64/dovecot/libdovecot-login.so.0
#9  0x00385c01d994 in __libc_start_main () from /lib64/libc.so.6
#10 0x00402019 in _start ()

If I tcpdump the stuck connection, I can see that imapproxy sends something
to the imap-login proxy when new clients are connected, but I'm not sure
what since it's SSL encrypted. The response is an empty ack packet. I'm
going to try disabling SSL between imapproxy and the director to see if I
can figure out what it's sending.

All in all I'm having a hard time debugging it since it only seems to happen
when there are a decent number of users active. I'm not at all convinced
that it's dovecot's fault, but if you have any suggestions or things that I
could to to see what the imap-login proxy or backend think is going on I'd
be much in your debt.

-Brad



[Dovecot] Doveadm director flush/remove

2010-07-14 Thread Brandon Davidson
I've got a couple more issues with the doveadm director interface:

1) If I use "doveadm director remove" to disable a host with active users,
the director seems to lose track of users mapped to that host. I guess I
would expect it to tear down any active sessions by killing the login
proxies, like I'd done 'doveadm direct add HOSTNAME 0 && doveadm director
flush HOSTNAME' before removing it? Here's what I see with an active open
connection:

[r...@cc-popmap7 ~]# doveadm director status brandond
Current: 10.142.0.179 (expires 2010-07-14 01:26:14)
Hashed: 10.142.0.179
Initial config: 10.142.0.161
[r...@cc-popmap7 ~]# doveadm director remove 10.142.0.179
[r...@cc-popmap7 ~]# doveadm director status brandond
Current: not assigned
Hashed: 10.142.0.174
Initial config: 10.142.0.161


2) "doveadm director flush" returns the wrong usage:

[r...@cc-popmap7 ~]# doveadm director flush
doveadm director remove [-a ] 


3) "doveadm director flush" all breaks the ring:

[r...@cc-popmap7 ~]# doveadm director flush all
Jul 14 01:26:33 cc-popmap7 dovecot: director: Error: Director
10.142.0.180:1234/right disconnected
Jul 14 01:26:33 cc-popmap7 dovecot: director: Error: Director
10.142.0.180:1234/left disconnected
Jul 14 01:26:33 oh-popmap7 dovecot: director: Error:
director(10.142.0.162:1234/left): Invalid HOST-FLUSH args
Jul 14 01:26:33 oh-popmap7 dovecot: director: Error:
director(10.142.0.162:1234/right): Invalid HOST-FLUSH args
 
For some reason, flushing a host address only disconnects one side:

[r...@cc-popmap7 ~]# doveadm director flush 10.142.0.160
Jul 14 01:28:23 cc-popmap7 dovecot: director: Error: Director
10.142.0.180:1234/right disconnected
Jul 14 01:28:23 oh-popmap7 dovecot: director: Error:
director(10.142.0.162:1234/left): Invalid HOST-FLUSH args

-Brad