Re: [Dovecot] Expire/Quota error

2009-06-06 Thread e-frog
Matt Rude wrote:
 Using both 1.2rc5 and hg version a9d3108d0cec from today, when I run the
 expire tools program, I receive the following error.
 
 # /usr/local/sbin/dovecot --exec-mail ext
 /usr/local/libexec/dovecot/expire-tool --test
 
 /usr/local/sbin/dovecot --exec-mail ext
 /usr/local/libexec/dovecot/expire-tool --testError:
 dlopen(/usr/local/lib/dovecot/imap/lib10_quota_plugin.so) failed:
 /usr/local/lib/dovecot/imap/lib10_quota_plugin.so: undefined symbol:
 mountpoint_get
 

The expire-tool uses now mail_plugins defined in protocol imap section.

Read the following thread for a workaround:

http://dovecot.org/pipermail/dovecot/2009-June/040118.html


Re: [Dovecot] Password environment variable - logging the password

2009-06-06 Thread Donovan Craig
 look at the setting:

 # In case of password mismatches, log the passwords and used scheme so the #
problem can be debugged. Requires auth_debug=yes to be set.
 #auth_debug_passwords = no

Thanks for your replies so far.

As mentioned, I¹d like to be able to log the username and password in plain
text after successful login.

I¹m using the mysql userdb, but the passwords are stored in MD5.

I want to be able to get the password within the post login script, not from
the log file.

Is there any way to do this?

Thanks.

Donovan







[Dovecot] expire-tool --test: timestamps

2009-06-06 Thread e-frog

$ /usr/sbin/dovecot --exec-mail ext expire-tool --test
Info: Trash: timestamp 1243963680 (Tue Jun  2 19:28:00 2009
) - 1244307774 (Tue Jun  2 19:28:00 2009
)

Both human readable timestamps are equal as ctime() returns a pointer
to a static buffer. In addition there are some newline characters added
by ctime(). The following patch is a try to fix this for 1.2.rc5.


--- expire-tool.c.orig  2009-06-06 13:29:31.0 +0200
+++ expire-tool.c   2009-06-06 15:17:07.0 +0200
@@ -351,9 +351,13 @@ static void expire_run(bool testrun)
} else if (!testrun)
dict_set(trans, key, new_value);
else {
-   i_info(%s: timestamp %s (%s) - %s (%s),
-  userp, value, ctime(expire_time),
-  new_value, ctime(oldest));
+   char *expire_ctime = 
i_strdup(ctime(expire_time));
+   char *oldest_ctime = i_strdup(ctime(oldest));
+   i_info(%s: timestamp %s (%.24s) - %s (%.24s),
+  userp, value, expire_ctime,
+  new_value, oldest_ctime);
+   i_free(expire_ctime);
+   i_free(oldest_ctime);
}
}
}



Re: [Dovecot] Password environment variable - logging the password

2009-06-06 Thread Timo Sirainen

On Jun 6, 2009, at 5:19 AM, Donovan Craig wrote:


I’m using the mysql userdb, but the passwords are stored in MD5.

I want to be able to get the password within the post login script,  
not from

the log file.

Is there any way to do this?


user_query = SELECT '%w' as plain_pass, ...

then it should be in $PLAIN_PASS environment in post-login script.



[Dovecot] shared folders in v1.2 with one uid per user

2009-06-06 Thread Ezequiel Alfíe
Hello everyone.

I'm new to dovecot and I'm setting up a server for one domain only. I
have not yet decided whether I will be using one uid per user or one
uid for all of them.

What are the steps for correctly setting up shared folders with acls
if I choose one uid per user?

What advantages or disadvantages has setting one uid for all users vs
one uid per user, considering I wish to setup shared folders
(including security, performance, etc) ?

Thanks in advance,

Ezequiel


[Dovecot] LAYOUT=fs vs LAYOUT=maildir++ and quota

2009-06-06 Thread Ezequiel Alfíe
Hi everyone.

I'm confused about LAYOUT=fs...

Does using LAYOUT=fs breaks maildir++ quota, if I use this quota scheme?

What are the advantages anyway of using LAYOUT=fs vs LAYOUT=maildir++ ?

(it's not important in my case if users can't create folders with dots '.')

Thanks in advance,

Ezequiel


[Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Hallo,

I am running dovecot on a PC (a workstation) to have a mail client 
independent storage for my mails. Now I would like to have the system 
clock set correctly by using ntpd or ntpdate (using debian/sid).


The problem is, that the PC is not online at boot time, but is set 
online on demand manually using pon to start the pppd later. So ntpd 
cannot sync the time on boot time before dovecot gets started.


First I was using ntpdate that was started in ppp's if.up.d/ directory. 
This tool does set the time very hard instead of just slightly shifting 
some milliseconds. So dovecot did stop itself, reporting:


Fatal: Time just moved backwards by 118 seconds. This might cause a lot 
of problems, so I'll just kill myself now.


So I have tried ntpd as I thought it shifts the time in smaller time 
deltas. But this takes much time (several seconds) when booting, giving 
up on all configured servers, because they are not reachable when 
booting (as going online later manually). This turns off ntp 
functionality because ntpd does think that all servers are unreachable 
for ever. (I have tried a command dynamic in ntp.conf but this did not 
change anything and ntpd reports it to be obsolete.)


My idea now is to not start ntpd on system boot, but only on if-up. But 
this brings up the same fatal error of dovecot as ntpd seems to hardly 
set the time, too. The only idea I have left is to stop dovecot, start 
ntpd and then start dovecot again on if-up.


Is there a more elegant way to use dovecot and ntpd on a manually dialed 
in PC?


Thanks,
Arno


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread John Gateley

Arno Wald wrote:

Is there a more elegant way to use dovecot and ntpd on a manually dialed 
in PC?


2 things might help: 1, run ntpd in cron every 10 minutes or so.
That should avoid the startup issue. 2, sync your hardware
clock every time. That should keep your clock closer to
accurate.

You may want to write a script that checks to see if the
'net is up, and only if it is does ntp.

j


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Timo Sirainen

On Jun 6, 2009, at 11:19 AM, Arno Wald wrote:

My idea now is to not start ntpd on system boot, but only on if-up.  
But this brings up the same fatal error of dovecot as ntpd seems to  
hardly set the time, too. The only idea I have left is to stop  
dovecot, start ntpd and then start dovecot again on if-up.


Is there a more elegant way to use dovecot and ntpd on a manually  
dialed in PC?


Wonder if http://cr.yp.to/clockspeed.html would work better than ntpd?



Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Scott Haneda wrote:

Can you explain why the system clock gets so far out of time?


No, I cannot, I do not know. Is it possible that the clock is out of order?

I did compare the times with another PC that is ntpd controlled. And 
after 1 hour the times differ for 1 second again. It seems that my PC is 
too fast :)


After some days (I do not know when the last ntp-sync did really happen 
because of the problems with ntpd that I have described) my PC was about 
2 minutes in the future.


--


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Timo Sirainen wrote:

 Wonder if http://cr.yp.to/clockspeed.html would work better than ntpd?

This is interesting, thank you. I will give it a try if ntpd or ntpdate 
will be no solution for me. But as there is no package for this in 
debian I would like to use the ntp stuff instead first.


Arno



Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

John Gateley wrote:

 2 things might help:

Thank you for your suggestions. This reminded me of an ntpdate option: 
ntpdate can be configured to change the time not in a big step on 
startup by using the option


-B
 Force the time to always be slewed using the adjtime() system call, 
even if the measured offset is greater than +-128 ms...


I try if this will help. (I just do not understand if ntpdate keeps 
changing the time until it is correct or if it only is changing it a bit 
each time it is executed.)


Arno




Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Harlan Stenn
Have you seen http://support.ntp.org/Support ?

You said your clock is running fast, so it's not a clock interrupt
issue.

If your OS supports it, and you have a *steady* problem with your clock,
you might be able to correct this problem with the tickadj program and
then ntpd should be able to keep the clock in sync.

H


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Pascal Volk
On 06/06/2009 09:22 PM Arno Wald wrote:
 This is interesting, thank you. I will give it a try if ntpd or ntpdate 
 will be no solution for me. But as there is no package for this in 
 debian I would like to use the ntp stuff instead first.

On Debian systems I'm very happy with the OpenBSD NTP daemon.
Package: openntpd
This ntpd adjusts the local time in little steps.


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


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Pascal Volk wrote:

On Debian systems I'm very happy with the OpenBSD NTP daemon.
Package: openntpd
This ntpd adjusts the local time in little steps.


Also on startup? ntpd uses little steps while running, too. But only at 
startup it seems to do a big step.


But as I have found in the Debian-Changelog ntpd should handle the 
unreachable server situation automatically in current versions. This is 
way the dynamic command is obsolete. Maybe I did not wait long enough 
when testing this. So I could try ntpd again. But good to know there is 
the alternative openntp


From the openntp package description: Alternative packages which 
provide similar functionality are ntp and chrony.


And chrony does what clockspeed seems to do. ;) `chronyd' determines 
the rate at which the computer gains or loses time, and compensates for 
this.


Arno


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Harlan Stenn
Pascal Volk wrote:
 On Debian systems I'm very happy with the OpenBSD NTP daemon.
 Package: openntpd
 This ntpd adjusts the local time in little steps.

The last I checked openntpd was an SNTP implementation, not NTP.

If it works for you, great.

H


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Juergen Daubert
On Sat, Jun 06, 2009 at 08:19:14PM +0200, Arno Wald wrote:
 Hallo,

 I am running dovecot on a PC (a workstation) to have a mail client  
 independent storage for my mails. Now I would like to have the system  
 clock set correctly by using ntpd or ntpdate (using debian/sid).

 The problem is, that the PC is not online at boot time, but is set  
 online on demand manually using pon to start the pppd later. So ntpd  
 cannot sync the time on boot time before dovecot gets started.

Chrony is what you are looking for, see http://chrony.sunsite.dk/

Greetings
Juergen


-- 
Juergen Daubert  |  mailto:j...@jue.li  
Korb, Germany|  http://jue.li/crux



Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Harlan Stenn
Juergen wrote:
  How will chrony help here if the PC is not online at boot time?
 
 From http://chrony.sunsite.dk/guide/chrony.html
 
 - chronyd can perform usefully in an environment where access to the time
   reference is intermittent. chronyd estimates both the current time
   offset and the rate at which the computer's clock gains or loses time,
   and can use that rate estimate to trim the clock after the reference
   disappears.

Doesn't apply to the use case.  This is *before* the PC goes online.

 - chronyd provides support to work out the gain or loss rate of the
   `real-time clock', i.e. the clock that maintains the time when the
   computer is turned off. It can use this data when the system boots to
   set the system time from a corrected version of the real-time clock.

There is no corrected version of the real-time clock before the PC goes
online.

H


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Juergen Daubert
On Sat, Jun 06, 2009 at 05:06:50PM -0400, Harlan Stenn wrote:
 Juergen wrote:
   How will chrony help here if the PC is not online at boot time?
  
  From http://chrony.sunsite.dk/guide/chrony.html
  
  - chronyd can perform usefully in an environment where access to the time
reference is intermittent. chronyd estimates both the current time
offset and the rate at which the computer's clock gains or loses time,
and can use that rate estimate to trim the clock after the reference
disappears.
 
 Doesn't apply to the use case.  This is *before* the PC goes online.
 
  - chronyd provides support to work out the gain or loss rate of the
`real-time clock', i.e. the clock that maintains the time when the
computer is turned off. It can use this data when the system boots to
set the system time from a corrected version of the real-time clock.
 
 There is no corrected version of the real-time clock before the PC goes
 online.

I'd suggest to read chrony's manual. Chrony stores the reference values
collected while running online for further use after reboot, even if we
have no online connection at that point.
Of course, this doesn't work if you never have synced with an NTP server.


-- 
Juergen Daubert  |  mailto:j...@jue.li  
Korb, Germany|  http://jue.li/crux



Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Juergen Daubert wrote:

Chrony is what you are looking for, see http://chrony.sunsite.dk/


chrony does exactly look like what I need. But there is one big 
disadvantage when using it on manual dial up PCs: You have to configure 
the NTP-servers by IP-address instead of there names. I do not like to 
hardcode IP-addresses in a config file. (Also server-pools will not work 
(if I am right) where one server name returns different IP addresses 
each time for better load balancing or whatever.)


It would be much better if chrony would look up the server addresses 
again when it does recieve the online state command. It seems that 
there is no option to turn on such a functionality.


Thanks,
Arno


Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Harlan Stenn
Juergen wrote:
 Harlan wrote:
  There is no corrected version of the real-time clock before the PC goes
  online.
 
 I'd suggest to read chrony's manual. Chrony stores the reference values
 collected while running online for further use after reboot, even if we
 have no online connection at that point.

I'm pretty familiar with ntp in particular and computer timekeeping in
general.

I've also seen a fair number of situations where the hardware clock is
just wrong, especially after a reboot.

In my world, it's about getting things to work right in as many cases as
possible.

 Of course, this doesn't work if you never have synced with an NTP
 server.

And more often than one might think, if one has just rebooted a machine.

H



Re: [Dovecot] dovecot and ntp: Fatal: Time just moved backwards

2009-06-06 Thread Arno Wald

Arno Wald wrote:
It would be much better if chrony would look up the server addresses 
again when it does recieve the online state command. It seems that 
there is no option to turn on such a functionality.


For completeness, even if it is getting OT in this mailing list (Sorry):

http://chrony.sunsite.dk/faq.php#question_5.2
The problem is that chronyd (currently) isn't designed in a way that 
allows hostname-IP address lookups during normal operation.  I hope to 
work on this problem very soon. (How old is this entry? ;) )



The solution is to restart chrony at ppp ip-up:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=268289

My /etc/ppp/ip-up.d/chrony now is:
-
#!/bin/sh

sleep 1
invoke-rc.d chrony restart
sleep 1

... the original unmodified script follows here ...
-

Arno


Re: [Dovecot] Password environment variable - logging the password

2009-06-06 Thread Donovan Craig
 On Jun 6, 2009, at 5:19 AM, Donovan Craig wrote:
 Im using the mysql userdb, but the passwords are stored in MD5.
 I want to be able to get the password within the post login script,
 not from
 the log file.

 Is there any way to do this?

 Timo Sirainen wrote:
 user_query = SELECT '%w' as plain_pass, ...
 then it should be in $PLAIN_PASS environment in post-login script.

This would be great if it worked, but unfortunately this %w is empty when I
try to use it.

From the documentation, it seems that this variable is only available during
auth.

http://wiki.dovecot.org/Variables

Is there any other way I can get the plain password within the
postloginscripting?

Thanks again.

Donovan