Re: [Dovecot] Stalled imaptest10 process

2007-03-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 20 Mar 2007, Timo Sirainen wrote:


http://dovecot.org/patches/debug/imap-append-hang-debug.diff


The maximum stalled time for all three commands is 23 secs now. That's 
OK, I think.


However, imaptest10 finished after approx. 2 houres. The last log entries 
of imaptest are plenty of:

Error: COPY failed: Some of the requested messages no longer exist.

In this time the following info had been logged 88 times:
Info: dvtest: Mailbox is in inconsistent state, please relogin.

There are no core dumps.

The last lines of the dovecot.log file are:

dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115951, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115953, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115954, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115959, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: Disconnected: Mailbox is in 
inconsistent state, please relogin.
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3504]: expunged: uid=115924, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3530]: expunged: uid=115986, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3530]: expunged: uid=115998, 
msgid=[EMAIL PROTECTED], box=box0
dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3530]: expunged: uid=116000, 
msgid=[EMAIL PROTECTED], box=box0

dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3530]: expunged: uid=116004, 
msgid=[EMAIL PROTECTED], box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3530]: expunged: uid=116008, 
msgid=[EMAIL PROTECTED], box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3530]: expunged: uid=116018, 
msgid=[EMAIL PROTECTED], box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3530]: Disconnected
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3504]: expunged: uid=115926, 
msgid=(null), box=box0
[[snip 40 identical lines]]
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3461]: expunged: uid=115960, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3461]: expunged: uid=115961, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3504]: Disconnected: Too many 
invalid IMAP commands.
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3461]: expunged: uid=115981, 
msgid=(null), box=box0
dovecot: Mar 20 17:55:08 Info: IMAP(dvtest) [3461]: Disconnected: Mailbox is in 
inconsistent state, please relogin.

Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRgDsXi9SORjhbDpvAQJKAwf+NqNFsXb0DWkFm7hMV03dlqONpI9cTbqS
gNLCooXiyjLM8E74PjrSzKflYjq94cRwkud+vO0Nf9h8uqtJyIjIOXYT3gSoKCo2
ceRsdmoiQXmYwsywx+uWvTNKgy7wnIRd4zpkKE00R3KzAZ4UMl2Cul+oTzrzTENi
rN+JX0giDLPQ73hS1pTDAaJ9fkXT3Or0obr8C8NWlquHiaq/02kpCYUnJvJUx8+h
DHmZ60aj2D4sbiyxK7dUOlepuLSsmPnAA/Z/DHnGO0TRvaHVbWTN2YmCAFRJrawF
DHk8N7IwWDhQYPPQl8LEohmTIyZwKSHZixGWACsqTu5Jsh7ovVYEAQ==
=+8ZV
-END PGP SIGNATURE-


[Dovecot] home_location or smth like that

2007-03-21 Thread razor

hi dovecot list
help me please

dovecot-1.0.r27
exim
lda
virtual users in ldap base

i decided to start using the sieve pluging so i have to make the homes  
(now my homeDirectory in ldapbase is /nonexistent).
there is a lot of users, so i dont wonna to make changes in every ldap  
record + imho the hard link to userhome in ldap - its a not good idea.


so is there any way to make it easy?
may be like home_location  = bla-bla-bla/%n/home in dovecot.conf (or in  
dovecot-ldap.conf )



sorry for my english

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


[Dovecot] Double homedirs and tilde problems in case of chroot in passwd-file / static dbs.

2007-03-21 Thread Michal Soltys

Recently I've made the post about double homedir problem,
but I couldn't recreate it later. Here're the exact steps to
make it happen (configuration is at the bottom):

1) set configuration as below with passwd-files
2) clean testms dir (not necessary though)
3) reload dovecot (HUP is enough)
4) access the server with any client using testms user
   (make sure no other user accesses server before you)

- on the first access, dovecot will create
  /home/vmail/ppgk.com.pl/testms/Maildir under
  /home/vmail/ppgk.com.pl/testms/
- on every next access, dovecot will access (and create if
  it doesn't exist) proper Maildir under single home path

Situation will repeat itself, if dovecot is reloaded (or killed
and restarted). It happens to both imap and pop3.

Note, that the a single access seems to be enough to fix
the problem to all the other users in passwd-file, should
there be any.



The problem seems to be created by chroot specification in
passwd-file  static (and possibly when other dbs are used).

On the first access, dovecot attempts to recreate whole
/home/vmail directory structure *after* chrooting to the homedir
(or without taking earlier chroot into account), at least
that's how it looks from ktrace.

If I moved /./ to the left by one subdir, dovecot would attempt to do it
under root owned /home/vmail/ppgk.com.pl/ and fail in the process. And so
on.



Tilde is another problem - if in dovecot.userdb I change -

maildir:~/Maildir:
to
mbox:~/Mail:INBOX=~/inbox:

- then single '~' directory will be created under
/home/vmail/ppgk.com.pl/testms/, along the inbox file and Mail dir.

If INBOX, CONTROL and/or INDEX is specified explicitely in maildir
case, '~' won't be created. That leads to the questiom - is tilde
allowed in INBOX under mbox storage at all ?

I can't check '~' in INBOX/mbox case for system accounts atm though.


If you need any more info (like ktrace), let me know.


Configuration:

openbsd 3.9, i386, dovecot 1.0-rc27 (no post rc27 diffs)

dovecot.userdb:
testms::1:1:Test,,,:/home/vmail/ppgk.com.pl/testms/./::userdb_mail=maildir:~/Maildir:

dovecot.passdb:
testms:{PLAIN}test:

base_dir: /var/dovecot/
protocols: imap imaps pop3 pop3s
ssl_listen: *
ssl_ca_file: /etc/ssl/cert_bundle.pem
ssl_cert_file: /etc/ssl/ca_ppgk/certs/fetch_crt.pem
ssl_key_file: /etc/ssl/ca_ppgk/private/fetch_key.pem
verbose_ssl: yes
login_dir: /var/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_greeting: Dovecot IMAP server ready.
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
valid_chroot_dirs: /var/mail:/home/regular:/home/vmail
verbose_proctitle: yes
first_valid_uid: 1999
first_valid_gid: 10
mail_location: mbox:~/Mail:INBOX=/var/mail/%u
mail_debug: yes
fsync_disable: yes
lock_method: fcntl
maildir_copy_with_hardlinks: yes
mbox_read_locks: fcntl
mbox_write_locks: fcntl
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3): outlook-idle
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  mechanisms: plain login
  verbose: yes
  debug: yes
  passdb:
driver: passwd-file
args: /etc/dovecot.passdb
  passdb:
driver: bsdauth
  userdb:
driver: passwd-file
args: /etc/dovecot.userdb
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix
master:



Re: [Dovecot] Thanks!

2007-03-21 Thread Marcin Gryszkalis
On Wednesday of March 21 2007, Kyle Wheeler wrote:
 to allow folders to
 be LIST'd/SELECT'd/etc. with a trailing separator (to satisfy my pine
 users). If anyone's interested, I can generate a patch for that
 stuff.

I have many pine users (pine as imap client) on one of servers that I want to 
migrate to dovecot - I'd be happy to see the patch. Maybe is could be merged 
to mainstream dovecot (do you think it breaks imap specs?)
regards
-- 
Marcin Gryszkalis, PGP 0x9F183FA3 
jabber jid:[EMAIL PROTECTED], gg:2532994
http://the.fork.pl


Re: [Dovecot] Thanks!

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 14:39 +0100, Marcin Gryszkalis wrote:
 
  be LIST'd/SELECT'd/etc. with a trailing separator (to satisfy my
 pine
  users). If anyone's interested, I can generate a patch for that
  stuff.

Isn't SELECT the only command where that's needed?

 I have many pine users (pine as imap client) on one of servers that I
 want to 
 migrate to dovecot - I'd be happy to see the patch. Maybe is could be
 merged 
 to mainstream dovecot (do you think it breaks imap specs?) 

Note that the behavior that the patch adds worked that way ONLY in BINC
imapd. Both Courier and Cyrus give the same NO Mailbox doesn't exist
error that Dovecot does. I'm not really interested in adding kludges to
make a few Pine user's life a bit easier. I'd rather see someone at
least try to get that fixed (or changed..) in Pine.



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


Re: [Dovecot] Thanks!

2007-03-21 Thread Kyle Wheeler

On Wednesday, March 21 at 03:48 PM, quoth Timo Sirainen:

On Wed, 2007-03-21 at 14:39 +0100, Marcin Gryszkalis wrote:
be LIST'd/SELECT'd/etc. with a trailing separator (to satisfy my 
pine users). If anyone's interested, I can generate a patch for 
that stuff.


Isn't SELECT the only command where that's needed?


No, unfortunately; after working with one of my pine users, we found 
that several commands had to be modified because pine uses the same 
tab-completion in several different ways (e.g. such as when picking a 
folder to save a message into---where it will use either LIST or 
LSUB). The solution (read: hack) was essentially identical to the 
SELECT solution, so it was easy to do.


Note that the behavior that the patch adds worked that way ONLY in 
BINC imapd. Both Courier and Cyrus give the same NO Mailbox doesn't 
exist error that Dovecot does. I'm not really interested in adding 
kludges to make a few Pine user's life a bit easier. I'd rather see 
someone at least try to get that fixed (or changed..) in Pine.


Huh... I wonder why pine does what it does, then.

sigh Yet Another Reason to use mutt.

~Kyle
--
America is the only country that went from barbarism to decadence 
without civilization in between.

-- Oscar Wilde


pgp6ogZTeERes.pgp
Description: PGP signature


Re: [Dovecot] Thanks!

2007-03-21 Thread Marcin Gryszkalis
On Wednesday of March 21 2007, you wrote:
 Note that the behavior that the patch adds worked that way ONLY in BINC
 imapd. Both Courier and Cyrus give the same NO Mailbox doesn't exist

Good, so as (almost former) Courier user I do not have to worry.
regards
-- 
Marcin Gryszkalis, PGP 0x9F183FA3 
jabber jid:[EMAIL PROTECTED], gg:2532994
http://the.fork.pl


[Dovecot] Unexpected behaviour when deleteing a big mailbox

2007-03-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

my last tests left me with a mailbox with  80'000 messages in 
Maildir. Dovecot served them fine. No problem. I usually use IMAP's Mark 
messages a deleted function and expunge later.


Because the Move to Trash is default in many MUAs, I decided to try it 
on this mailbox.


I do think that it is hard to detect and prevent such problem, but could 
it be implemented that when the client connection times out, the COPY 
process is terminated and rolled back? I mean, as long as the messages are 
copied/linked to */tmp nothing is done, yet, hence, a simple cleanup of 
*/tmp would result in a rollback. Due to the timeout, the EXPUNGE wasn't 
issued so far and the source mailbox is unchanged.
Or, is it possible to prevent two COPYs of an overlapping message range 
into the same destination folder simultaneously?

Or, can I prevent to COPY such a huge range of messages at once?

I know 80'000 messages are much, but I have users with an INBOX of at 
least 40'000, eventually moving all files into an archive mailbox.


I'm also surprised to find that I didn't get two full copies of the source 
mailbox.


==

Start situation:
4.8G.box1
(I didn't recorded the individual subdirs, unfortunately.)

# find .box1 -type f | wc -l
84273

Newly created .Trash.

===

I started Thunderbird, let sync the mailbox, selected them all, and 
pressed Delete.

Some time later: Connection timed out.
I, wondered, and hit Delete a second time.
Again, connection timed out.

===

I was surprised, however, to see that the Dovecot log with still active 
telling me that mails are copied to Trash.


I ended up with two processes copying all messages to .Trash/tmp on the 
server. The process I traced a bit later linked any file after the other. 
What I wondered right from the beginning was, that


du -hs .??*

displayed about 3.5GB in .Trash, but still 4.8GB in .box1.
So, why are there 3.5GB additional files in .Trash, when I configured 
Dovecot to use hardlinks?


The end situation is that .box1 contains all messages still, but any 
Unseen messages are moved to .box1/cur, and .Trash contains:


7.4G.Trash/cur
791M.Trash/new
76K .Trash/tmp

# find .Trash/ -type f | wc -l
121713

The size nearly doubled.
# du -hs .box1 ; du -sh .Trash/
4.8G.box1
8.2G.Trash/



Last lines in Dovecot log:
dovecot: Mar 21 11:46:15 Info: IMAP(dvtest) [11535]: copy - Trash: 
uid=83964, 
msgid=[EMAIL PROTECTED], 
box=box1
dovecot: Mar 21 11:46:15 Info: IMAP(dvtest) [11535]: copy - Trash: 
uid=83965, msgid=[EMAIL PROTECTED], box=box1
dovecot: Mar 21 11:46:29 Info: IMAP(dvtest) [11535]: Disconnected: Mailbox 
is in inconsistent state, please relogin.


Last lines of strace:
fstat64(13, {st_mode=S_IFREG|0600, st_size=1341104, ...}) = 0
stat64(/var/cache/dovecot/31045/index/.box1/dovecot.index, 
{st_mode=S_IFREG|0600, st_size=1341104, ...}) = 0

alarm(120)  = 0
fcntl64(13, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}, 
0xbfe562d4) = 0

alarm(0)= 120
fstat64(13, {st_mode=S_IFREG|0600, st_size=1341104, ...}) = 0
mmap2(NULL, 1341104, PROT_READ|PROT_WRITE, MAP_SHARED, 13, 0) = 0xb3ffc000
munmap(0xb4285000, 1341104) = 0
write(1, * 7998 FETCH (FLAGS ($Label2 $La..., 2067) = 2067
write(1, * 8091 FETCH (FLAGS (\\Answered \\..., 2056) = -1 EPIPE (Broken 
pipe)

- --- SIGPIPE (Broken pipe) @ 0 (0) ---
munmap(0xb7cbc000, 1341104) = 0
fcntl64(13, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 
0xbfe56394) = 0

write(2, \1IDisconnected: Mailbox is in in..., 66) = 66

# /usr/local/dovecot.rc27/sbin/dovecot -n
# /usr/local/dovecot.rc27/etc/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot/dovecot.log
protocols: imap imaps pop3 pop3s
ssl_ca_file: /etc/ssl/certs/ca.crt
ssl_cert_file(default): /etc/ssl/certs/imap.pem
ssl_cert_file(imap): /etc/ssl/certs/imap.pem
ssl_cert_file(pop3): /etc/ssl/certs/pop3.pem
ssl_key_file(default): /etc/ssl/private/imap.key
ssl_key_file(imap): /etc/ssl/private/imap.key
ssl_key_file(pop3): /etc/ssl/private/pop3.key
disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /var/run/dovecot//login
login_executable(default): 
/usr/local/dovecot.rc27/libexec/dovecot/imap-login

login_executable(imap): /usr/local/dovecot.rc27/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/dovecot.rc27/libexec/dovecot/pop3-login
login_log_format_elements: %p: user=%u method=%m rip=%r lip=%l %c
verbose_proctitle: yes
first_valid_uid: 1000
mail_location: 
maildir:%h/MailDir:CONTROL=/var/cache/dovecot/%i/control:INDEX=/var/cache/dovecot/%i/index

mail_debug: yes
dotlock_use_excl: yes
maildir_copy_with_hardlinks: yes
maildir_copy_preserve_filename: yes
mail_drop_priv_before_exec: yes
mail_executable(default): /usr/local/dovecot.rc27/libexec/dovecot/imap
mail_executable(imap): /usr/local/dovecot.rc27/libexec/dovecot/imap
mail_executable(pop3): 

Re: [Dovecot] I wrote a managesieve server for Dovecot

2007-03-21 Thread Robert Schetterer
Harley Peters schrieb:
 Neale Pickett wrote:
 I have written a managesieve server from scratch in Python.  I did
 just enough work to get it working with avelsieve (the squirrelmail
 plugin), smartsieve, and KDE's sieve kioplugin.  It supports the
 entire Internet draft.  Since I didn't have a working sieve server to
 compare against, I'm not sure if it's 100% compatible with timsieved. 
 Client applications seem to work okay anyway.

 I wrote it in such a way as to decouple how authentication is carried
 out and how sieve scripts are actually stored, so you could for
 instance modify this to work with SASL and Exim.  Currently it only
 has code for PAM and Dovecot's LDA, because I run Postfix :).  TLS
 support is in the code but disabled because I had problems writing a
 unit test for it.  All my connections are from localhost anyway.

 http://woozle.org/~neale/repos/pysieved if anyone is interested.

 I haven't looked closely at Stephan Bosch's managesieve server in C
 but I do want to acknowledge that he has written a C managesieve
 server that currently exists as a patch to the Dovecot source code. 
 People looking for a managesieve implementation in C are encouraged to
 try his patch out: http://sinas.rename-it.nl/~sirius/

 Neale

 
 
 Thanks for the managesieve server !
 
 I am running this via xinetd with a mysql database and smartsieve as the
 client.I tried using it as a daemon but it becomes unresponsive over time.
 I am running it as the same user that the dovecot lda runs as it store's
 the smartsieve script with 0600 permisions.
 Haven't run it to long yet but so far so good.
 
 Harley
 
Hi ask Neale directly,
try running it as deamon with -d -d -d

like python pysieved.py -d -d -d
i havent tried mysql , i used saslauthd deamon,


-- 
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

https://www.schetterer.org
Munich/Bavaria/Germany



Re: [Dovecot] Unexpected behaviour when deleteing a big mailbox

2007-03-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 21 Mar 2007, Steffen Kaiser wrote:

Just to add:

Without the mail_log plugin, the 80'000 message are copied almost in 
time to Trash; the timeout occured while renaming the files from tmp to 
cur or new.


==

I noticed with EXPUNGE that the client feedback is sent after all messages 
are deleted, when this is the same with COPY, could one sent some feedback 
to the client in order to keep the connection open?


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRgFRiC9SORjhbDpvAQLKrgf9GBOjl3zK/28wLpRDIKm4On/jxqcKxNKO
Cm8yG02uFaS1164rvTZwmEY3wPU1dolJJ9U/49P25NIlRIdXyKhPh4FJh82Ujwtr
peMa1g4AM+yn9WLjrPpi5L2RCUUlSYUaoIHHPCJEQipwTjypp8sVPj0RKxBynbrZ
J7N5aWwzEhXc4DwT4z5ejqQT21jmiV3VJ2iE48d/JkDSHptJjYslH0VlDEMSxuAF
n3wldvB7bfkTDJLQHYP1Jxd98+v9wHMnFsZYyA6hTdUgWY6qm9SV466AflXOpQM4
7uGASJR974ttY6M998ZV8pdY146y7BbmTEEeOfOQg6Q8HGBIYPwGdQ==
=S6C1
-END PGP SIGNATURE-


Re: [Dovecot] Unexpected behaviour when deleteing a big mailbox

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 16:38 +0100, Steffen Kaiser wrote:
 I noticed with EXPUNGE that the client feedback is sent after all messages 
 are deleted, when this is the same with COPY, could one sent some feedback 
 to the client in order to keep the connection open?

Does the attached patch help?

? src/imap/log
? src/imap/ns.sh
? src/imap/ref.sh
? src/lib-storage/maildir-sync-stayalive.diff
? src/lib-storage/index/maildir/diff
? src/lib-storage/index/mbox/debug
? src/lib-storage/index/mbox/diff
Index: src/imap/client.c
===
RCS file: /var/lib/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.67.2.9
diff -u -r1.67.2.9 client.c
--- src/imap/client.c	14 Mar 2007 12:46:10 -	1.67.2.9
+++ src/imap/client.c	21 Mar 2007 17:57:13 -
@@ -148,6 +148,7 @@
 
 	if (o_stream_sendv(client-output, iov, 2)  0)
 		return -1;
+	client-last_output = ioloop_time;
 
 	if (o_stream_get_buffer_used_size(client-output) =
 	CLIENT_OUTPUT_OPTIMAL_SIZE) {
@@ -172,6 +173,8 @@
 	(void)o_stream_send(client-output,  , 1);
 	(void)o_stream_send_str(client-output, data);
 	(void)o_stream_send(client-output, \r\n, 2);
+
+	client-last_output = ioloop_time;
 }
 
 void client_send_command_error(struct client_command_context *cmd,
Index: src/imap/cmd-copy.c
===
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-copy.c,v
retrieving revision 1.35
diff -u -r1.35 cmd-copy.c
--- src/imap/cmd-copy.c	6 Mar 2006 18:13:54 -	1.35
+++ src/imap/cmd-copy.c	21 Mar 2007 17:57:14 -
@@ -1,12 +1,29 @@
-/* Copyright (C) 2002 Timo Sirainen */
+/* Copyright (C) 2002-2007 Timo Sirainen */
 
 #include common.h
 #include str.h
+#include ostream.h
 #include commands.h
 #include imap-search.h
 
-static int fetch_and_copy(struct mailbox_transaction_context *t,
-			  struct mailbox *srcbox,
+#include time.h
+
+#define COPY_CHECK_INTERVAL 100
+
+static void client_send_sendalive_if_needed(struct client *client)
+{
+	time_t now;
+
+	now = time(NULL);
+	if (now - client-last_output  MAIL_STORAGE_STAYALIVE_SECS) {
+		o_stream_send_str(client-output, * OK Hang in there..\r\n);
+		o_stream_flush(client-output);
+		client-last_output = now;
+	}
+}
+
+static int fetch_and_copy(struct client *client,
+			  struct mailbox_transaction_context *t,
 			  struct mail_search_arg *search_args)
 {
 	struct mail_search_context *search_ctx;
@@ -14,9 +31,10 @@
 	struct mail_keywords *keywords;
 	const char *const *keywords_list;
 	struct mail *mail;
+	unsigned int copy_count = 0;
 	int ret;
 
-	src_trans = mailbox_transaction_begin(srcbox, 0);
+	src_trans = mailbox_transaction_begin(client-mailbox, 0);
 	search_ctx = mailbox_search_init(src_trans, NULL, search_args, NULL);
 
 	mail = mail_alloc(src_trans, MAIL_FETCH_STREAM_HEADER |
@@ -28,6 +46,9 @@
 			break;
 		}
 
+		if ((++copy_count % COPY_CHECK_INTERVAL) != 0)
+			client_send_sendalive_if_needed(client);
+
 		keywords_list = mail_get_keywords(mail);
 		keywords = strarray_length(keywords_list) == 0 ? NULL :
 			mailbox_keywords_create(t, keywords_list);
@@ -92,7 +113,7 @@
 
 	t = mailbox_transaction_begin(destbox,
   MAILBOX_TRANSACTION_FLAG_EXTERNAL);
-	ret = fetch_and_copy(t, client-mailbox, search_arg);
+	ret = fetch_and_copy(client, t, search_arg);
 
 	if (ret = 0)
 		mailbox_transaction_rollback(t);
Index: src/lib-storage/mail-storage.h
===
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.107.2.5
diff -u -r1.107.2.5 mail-storage.h
--- src/lib-storage/mail-storage.h	28 Dec 2006 16:27:42 -	1.107.2.5
+++ src/lib-storage/mail-storage.h	21 Mar 2007 17:57:14 -
@@ -5,6 +5,9 @@
 
 #include mail-types.h
 
+/* If some operation is taking long, call notify_ok every n seconds. */
+#define MAIL_STORAGE_STAYALIVE_SECS 15
+
 enum mail_storage_flags {
 	/* Print debugging information while initializing the storage */
 	MAIL_STORAGE_FLAG_DEBUG			= 0x01,
Index: src/lib-storage/index/maildir/maildir-sync.c
===
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.77.2.7
diff -u -r1.77.2.7 maildir-sync.c
--- src/lib-storage/index/maildir/maildir-sync.c	14 Mar 2007 16:17:47 -	1.77.2.7
+++ src/lib-storage/index/maildir/maildir-sync.c	21 Mar 2007 17:57:14 -
@@ -210,12 +210,17 @@
 	const char *new_dir, *cur_dir;
 	bool partial;
 
+	unsigned int move_count, check_count;
+	time_t last_touch, last_notify;
+
 	struct maildir_uidlist_sync_ctx *uidlist_sync_ctx;
 struct maildir_index_sync_context *index_sync_ctx;
 };
 
 struct maildir_index_sync_context {
 struct maildir_mailbox *mbox;
+	struct maildir_sync_context *maildir_sync_ctx;
+
 	struct mail_index_view *view;
 	struct mail_index_sync_ctx *sync_ctx;
 struct maildir_keywords_sync_ctx *keywords_sync_ctx;
@@ 

Re: [Dovecot] compiling dovecot on aix gcc 3.3.2

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 00:29 +0200, funkypunky drunky wrote:
 When i check the /usr/local/lib/dovecot/imap/lib10_quota_plugin.so i see
 that it is a link which is pointing
 /usr/local/lib/dovecot/lib10_quota_plugin.so . But there is no
 lib10_quota_plugin.so .

What is in src/plugins/quota/.libs/ directory after compiling the
sources? If it's in there, copy it manually if make install for some
reason decided not to copy it.



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


Re: [Dovecot] Index files in .imap directory

2007-03-21 Thread Timo Sirainen
On Mon, 2007-03-19 at 14:38 -0500, Steven F Siirila wrote:

 A few RC releases ago we had a problem where a user's restored home
 directory
 contained a .imap folder either from a previous RC release or perhaps
 it was
 a different server.  In any event, restoration of the user caused
 problems
 since Dovecot choked on the restored .imap index files.  Removing
 those index
 files cleared the problem.  I'm wondering if this is still an issue,
 and
 therefore whether we need to find and remove all .imap folders prior
 to
 archiving users, so that they are not restored with potentially
 old/bad
 index files.  I would like to NOT have to worry about them, but rather
 have
 Dovecot be smart about when to simply re-create them if it detects
 something
 it does not like about them. 

Well, as far as I know there are no problems. But how about you try with
a few users first? If there are problems, let me know and I'll fix them.



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


[Dovecot] Getting more spam

2007-03-21 Thread [EMAIL PROTECTED]

Hi

I am taking part in writing an anti spam filter for my uni project.

However at the moment I am not getting much spam to my mail server - 
running dovecot and postfix :)


Do you have any suggestions for getting more?

Thanks
Tom


Re: [Dovecot] Exceptions to MyNetworks

2007-03-21 Thread chandler . lists
 Dovecot != Postfix


Oh son of a...


My apologies.

-- Jay



Re: [Dovecot] Getting more spam

2007-03-21 Thread [EMAIL PROTECTED]

Hi

Thanks for the offer.

What is a a spam sink, can you redirect it via MX records?

I am interested, as you say, in genuine spam, but not too bothered what 
the source is.


I do not use this account for anything else, so there are no non-spam 
messages in it.


Thanks
Tom

Neale Pickett wrote:

On Wednesday 21 March 2007 1:47 pm, [EMAIL PROTECTED] wrote:


However at the moment I am not getting much spam to my mail server -
running dovecot and postfix :)


You need to be really careful about this.  It turns out that getting a *clean* 
spam feed is quite challenging.  You want to make sure it's:


* Verbatim spam (not forwarded, classified, or otherwise messed with)
* 100% spam, in other words you want to be absolutely certain that 
a legitimate email didn't slip in, for instance, you want to make sure 
people aren't able to taint it by redirecting real email from their 
mother-in-law
* An accurate representation of the sort of spam you're interested in.  For 
instance, do you care about things that postfix could drop by checking the 
hostname given with HELO?  Are you interested in spam resulting from usenet 
posts, web spiders, or something else?


I have a spam sink--currently turned off--that I can re-enable for you if you 
aren't too picky about the last point.  Better, I think, would be for you to 
seed your own spam sink, but that takes time and maybe you can't wait.


Neale


Re: [Dovecot] Getting more spam

2007-03-21 Thread [EMAIL PROTECTED]
Also, I am running a custom smtp proxy in front of postfix to log all 
SMTP transactions, and postfix is configured to be very lenient in terms 
of checking.


Tom

[EMAIL PROTECTED] wrote:

Hi

Thanks for the offer.

What is a a spam sink, can you redirect it via MX records?

I am interested, as you say, in genuine spam, but not too bothered what 
the source is.


I do not use this account for anything else, so there are no non-spam 
messages in it.


Thanks
Tom

Neale Pickett wrote:

On Wednesday 21 March 2007 1:47 pm, [EMAIL PROTECTED] wrote:


However at the moment I am not getting much spam to my mail server -
running dovecot and postfix :)


You need to be really careful about this.  It turns out that getting a 
*clean* spam feed is quite challenging.  You want to make sure it's:


* Verbatim spam (not forwarded, classified, or otherwise messed with)
* 100% spam, in other words you want to be absolutely certain that a 
legitimate email didn't slip in, for instance, you want to make sure 
people aren't able to taint it by redirecting real email from their 
mother-in-law
* An accurate representation of the sort of spam you're interested 
in.  For instance, do you care about things that postfix could drop by 
checking the hostname given with HELO?  Are you interested in spam 
resulting from usenet posts, web spiders, or something else?


I have a spam sink--currently turned off--that I can re-enable for you 
if you aren't too picky about the last point.  Better, I think, would 
be for you to seed your own spam sink, but that takes time and maybe 
you can't wait.


Neale


Re: [Dovecot] Getting more spam

2007-03-21 Thread chandler . lists
 Hi

 I am taking part in writing an anti spam filter for my uni project.

 However at the moment I am not getting much spam to my mail server -
 running dovecot and postfix :)

 Do you have any suggestions for getting more?

 Thanks
 Tom


Oh, Doggy, do I ever:

First, set up a few tagged addresses.

Post to usenet with some addresses from your server.

Respond to a few spams listing your email address as the contact information.

Remove all the spam filtering rejection rules from Postfix-- i.e. don't
require FQDN for anything, use none of the RBLs, etc...

Make a post or three to BugTraq.

Post to Slashdot with an address from this domain.

Click on popups (in a sandboxed environment-- no point in being stupid!)
and give an address at that domain for contact info.

This is what my users do, and then wonder why they get spam...

-- Jay

Request mortgage information, again with that email adress



Re: [Dovecot] deliver to subfolder with dovecot's LDA

2007-03-21 Thread Timo Sirainen
On Mon, 2007-03-19 at 19:28 +0100, Koen Vermeer wrote:
   passdb passwd-file {
 args = /var/mail/vhosts/vermeer.tv/shadow
   }
 
   userdb static {
 args = uid=1002 gid=1002 home=/var/mail/vhosts/%d/homes/%n/
 mail=maildir:/var/mail/vhosts/%d/%n/
   }
 
 The required data is there: The shadow-file contains a list of valid
 usernames. It would be nice to have something like an extra option for
 userdb static to tell it to have a look in this list and see if a user
 exists. Maybe a 'userlist = /var/mail/vhosts/vermeer.tv/shadow' entry or
 something like that. Running a database just for this purpose seems to
 be a bit too much...

Well... Fine: http://dovecot.org/list/dovecot-cvs/2007-March/008265.html
http://dovecot.org/list/dovecot-cvs/2007-March/008266.html


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


Re: [Dovecot] Dovecot 'suicide'

2007-03-21 Thread John Andrea



dovecot: Time just moved backwards by 6 seconds


So this will show up when systems move from daylight savings time to 
standard time ?



As others mentioned, using ntpd avoids this problem entirely.


Not entirely. If you need to restart ntpd, the time can jump when 
catching up with  'step-tickers'. 



Re: [Dovecot] Dovecot 'suicide'

2007-03-21 Thread John Robinson

On 21/03/2007 19:35, John Andrea wrote:

As others mentioned, using ntpd avoids this problem entirely.


Not entirely. If you need to restart ntpd, the time can jump when 
catching up with  'step-tickers'.


Which is a good reason for starting ntpd before other network services, 
because once it's running, you avoid the problem entirely.


Cheers,

John.


Re: [Dovecot] Stalled imaptest10 process

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 09:26 +0100, Steffen Kaiser wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Tue, 20 Mar 2007, Timo Sirainen wrote:
 
  http://dovecot.org/patches/debug/imap-append-hang-debug.diff
 
 The maximum stalled time for all three commands is 23 secs now. That's 
 OK, I think.

Hmm. Wonder if it means that there's a bug in Dovecot. Or that there's a
bug in imaptest.. Do you get the hangs (without the patch) without
making imaptest do copying?

 However, imaptest10 finished after approx. 2 houres. The last log entries 
 of imaptest are plenty of:
 Error: COPY failed: Some of the requested messages no longer exist.

Well, that's pretty normal. COPY command fails if any of the requested
messages had been expunged already by another session.

 Info: dvtest: Mailbox is in inconsistent state, please relogin.

This indicates an error.
 dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115951, 
 msgid=(null), box=box0
 dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115953, 
 msgid=(null), box=box0
 dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115954, 
 msgid=(null), box=box0
 dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: expunged: uid=115959, 
 msgid=(null), box=box0
 dovecot: Mar 20 17:55:07 Info: IMAP(dvtest) [3620]: Disconnected: Mailbox is 
 in inconsistent state, please relogin.
..

But none of these log lines were errors. Try grep Error|tail -20, what
does it show?



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


Re: [Dovecot] Getting more spam

2007-03-21 Thread Neale Pickett
On Wednesday 21 March 2007 2:01 pm, [EMAIL PROTECTED] wrote:

 What is a a spam sink, can you redirect it via MX records?

It's just a mail account that gets nothing but spam (I hope).  It seems to be 
well-seeded on the spam CDs so I'm sure to get the same kind of spam that a 
real person would get, just that this account gets nothing else.  I don't 
know if it gets a truly accurate sampling of spam though: by now the address 
may have been removed from the more expensive spam CDs, despite my efforts to 
keep it secret.  Or maybe somebody's trying to poison it with custom-crafted 
spam, in an attempt to throw off training data.  I kind of doubt it but who 
knows.

I can't turn the firehose on to you with MX records, sorry.  For a while I had 
a mail list set up that people could subscribe to, in order to get a mirror, 
but that turned out to be a bad idea.  If you (or anyone else reading this) 
would like to get at my spam I'll need to have some assurances that you're 
not a spammer looking to somehow taint my precious river of pure spam.

What a crazy world.

You're probably best off following Jay's suggestions.  It won't take long for 
spam to start coming in.  Another suggestion is to surf a lot of porn and 
sign up for as much free porn as you can.  Not only do you get loads of 
spam, you also get to surf for porn and call it classwork!

Neale


Re: [Dovecot] rc27 assert, mbox format

2007-03-21 Thread Timo Sirainen
On Mon, 2007-03-19 at 09:31 -0400, Jeff A. Earickson wrote:
 
 Mar 19 00:10:46 karst dovecot: [ID 107833 mail.error] IMAP(user): file
 mbox-sync-rewrite.c: line 423: assertion failed: (need_space ==
 (uoff_t)-mails[idx].space) 

Hmm. A bit dangerous to do this many changes to mbox code now that it
finally seemed to work pretty well, but..: 

1) http://dovecot.org/list/dovecot-cvs/2007-March/008271.html
2) http://dovecot.org/list/dovecot-cvs/2007-March/008273.html

It doesn't fix anything, but it does more error checking and gives a
better error message instead of just the assert.



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


Re: [Dovecot] deliver to subfolder with dovecot's LDA

2007-03-21 Thread Koen Vermeer
Op wo, 21-03-2007 te 22:13 +0200, schreef Timo Sirainen:
 On Mon, 2007-03-19 at 19:28 +0100, Koen Vermeer wrote:
  The required data is there: The shadow-file contains a list of valid
  usernames. It would be nice to have something like an extra option for
  userdb static to tell it to have a look in this list and see if a user
  exists. Maybe a 'userlist = /var/mail/vhosts/vermeer.tv/shadow' entry or
  something like that. Running a database just for this purpose seems to
  be a bit too much...
 Well... Fine: http://dovecot.org/list/dovecot-cvs/2007-March/008265.html
 http://dovecot.org/list/dovecot-cvs/2007-March/008266.html

Thanks! I patched the Debian rc27 package, and ran a quick test. The new
folder isn't created anymore, which is good news! The bad news is that
the message is now bounced ('user unknown'). I'm not sure where the
problem is: postfix, dovecot, some mis-communication between those two,
or just my config...

Koen



Re: [Dovecot] rc27 assert, mbox format

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 23:59 +0200, Timo Sirainen wrote:
 On Mon, 2007-03-19 at 09:31 -0400, Jeff A. Earickson wrote:
  
  Mar 19 00:10:46 karst dovecot: [ID 107833 mail.error] IMAP(user): file
  mbox-sync-rewrite.c: line 423: assertion failed: (need_space ==
  (uoff_t)-mails[idx].space) 
 
 Hmm. A bit dangerous to do this many changes to mbox code now that it
 finally seemed to work pretty well, but..: 
 
 1) http://dovecot.org/list/dovecot-cvs/2007-March/008271.html
 2) http://dovecot.org/list/dovecot-cvs/2007-March/008273.html
 
 It doesn't fix anything, but it does more error checking and gives a
 better error message instead of just the assert.

Oh and this makes the check more reliable with OSes and FSes supporting
it: http://dovecot.org/list/dovecot-cvs/2007-March/008275.html

Looks like Solaris 10 does at least with UFS, don't know about NFSv4.



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


Re: [Dovecot] Doubled mails and UIDs

2007-03-21 Thread Adam Lackorzynski

On Wed Mar 21, 2007 at 22:37:10 +0200, Timo Sirainen wrote:
 On Mon, 2007-03-19 at 16:19 +0100, Adam Lackorzynski wrote:
  
dovecot: Mar 18 22:08:05 Error: POP3(joe): mbox sync: UID inserted
  in the middle of mailbox /home/joe/Mail/INBOX (442671  80, seq=10,
  idx_msgs=153)
   
   Show me your dovecot -n output? Where are the index files located?
  
  The index files are on NFS (home directory), ~/Mail/INBOX points to
  /var/mail/joe on local fs. 
 
 Is Dovecot running on more than one computer? That error message looks
 exactly like what would happen if Dovecot saw two different INBOXes but
 the same index files were tried to be used with both of them.

Our IMAP(s)/POP3(s) server is a single host so this should not happen.
 
 http://wiki.dovecot.org/MboxProblems anyway lists all the possible
 reasons for that problem.

I've now put the whole Mail directory of the user on a local filesystem
to see if that makes a difference.



Adam
-- 
Adam [EMAIL PROTECTED]
  Lackorzynski http://os.inf.tu-dresden.de/~adam/


Re: [Dovecot] Wiki needs updating: Dovecot LDA + Dovecot Sieve + Exim

2007-03-21 Thread Timo Sirainen
On Tue, 2007-03-20 at 15:00 +, Stephen Usher wrote:
 So as to make sure that Dovecot Sieve's vacation system works Exim has to be 
 forced to generate a Reply-To: header in the message (which it doesn't do 
 by default). The current example for using the Dovecot LDA with Exim doesn't 
 do this.

Hmm. Really? Not in my tests and I don't see hardly anything related to
Reply-To in the code. It should send it to the address specified in
Return-Path.



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


[Dovecot] Solaris Dovecot dovecot dovecot-1.0.rc27

2007-03-21 Thread Randall Svancara
To all,

I am using Dovecot on solaris 10.  Home directories are mounted using
NFS.  However, they are not readable by root.


I compiled Dovecot from the source.  I set the following environment
variables:

export LDFLAGS='-L/local/software/openssl/lib
-R/local/software/openssl/lib'

export CPPFLAGS=-I/local/software/openssl/include

Then I ran gmake
and the gmake install.

In the server logs, when I attempt to connect to port 993 using imap
over SSL, i receive the following error:

dovecot: Mar 21 15:34:25 Info: imap-login: Login: user=someusername,
method=PLAIN, rip=134.121.92.228, lip=134.121.5.141, TLS
dovecot: Mar 21 15:34:25 Error: IMAP(someusername): ld.so.1: imap:
fatal: libgcc_s.so.1: open failed: No such file or directory
dovecot: Mar 21 15:34:25 Error: child 13085 (imap) killed with signal 9

Has anyone seen similar issues?

Randall




Re: [Dovecot] Solaris Dovecot dovecot dovecot-1.0.rc27

2007-03-21 Thread Chris Wakelin


Randall Svancara wrote:
 In the server logs, when I attempt to connect to port 993 using imap
 over SSL, i receive the following error:
 
 dovecot: Mar 21 15:34:25 Info: imap-login: Login: user=someusername,
 method=PLAIN, rip=134.121.92.228, lip=134.121.5.141, TLS
 dovecot: Mar 21 15:34:25 Error: IMAP(someusername): ld.so.1: imap:
 fatal: libgcc_s.so.1: open failed: No such file or directory
 dovecot: Mar 21 15:34:25 Error: child 13085 (imap) killed with signal 9
 
 Has anyone seen similar issues?
 

You need the GCC runtime libraries (package SFWgcc34l or similar) installed.

Hope this helps,
Chris

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,   [EMAIL PROTECTED]
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK  Fax: +44 (0)118 975 3094


Re: [Dovecot] Solaris Dovecot dovecot dovecot-1.0.rc27

2007-03-21 Thread Phil Oleson

Randall Svancara wrote:


dovecot: Mar 21 15:34:25 Info: imap-login: Login: user=someusername,
method=PLAIN, rip=134.121.92.228, lip=134.121.5.141, TLS
dovecot: Mar 21 15:34:25 Error: IMAP(someusername): ld.so.1: imap:
fatal: libgcc_s.so.1: open failed: No such file or directory
dovecot: Mar 21 15:34:25 Error: child 13085 (imap) killed with signal 9

Has anyone seen similar issues?


The RPATH for the dovecot binaries appear to not include the path to where
libgcc_s.so.1 exists at.   run 'dump -Lv binary' to see what RPATH is embeded
in the binary, and recompile either fixing the -R args used when linking or set
LD_RUN_PATH to a colon delimited list of paths for the RPATH to be set to when
your compiling.


-Phil.




[Dovecot] How does vpopmail support works?

2007-03-21 Thread Oliver Schulze L.

Hi,
I'm still trying to migrate a running qmail + vpopmail to sendmail + 
dovecot.

I need the milter stuff from sendmail.

I got sendmail + dovecot running using the migrated tables from the vpopmail
DB, but I'm facing the UID problem in pop3.

So, now I'm following the vpopmail authdb path.

My questions are:
- what do I need, a running vpopmail server (lib + binary, etc)?
- or only the DB?

This is on Centos 4.4

Many thanks
Oliver

--
Oliver Schulze L.   | Get my e-mail after a captcha in:
Asuncion - Paraguay | http://tinymailto.com/oliver 



[Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Don O'Neil
I'm experiencing timeouts from time to time from both Mac Mail and Outlook
when connecting to my server. I originally suspected that it might be
process # related, so I increased the auth  login process counts but that
hasn't seemed to make a difference. 

I'm running 1.0rc10 which came with my DirectAdmin control panel. I'm
wondering if this problem is known and was fixed in a later release? I'm
waiting for instructions from the DirectAdmin folks on building a new
version in case they do something special.

Any ideas?

Thanks!



Re: [Dovecot] Solaris Dovecot dovecot dovecot-1.0.rc27

2007-03-21 Thread Randall Svancara
Everyone,

I went ahead and added -L/usr/sfw/lib and -R/usr/sfw/lib to the LDFLAGS
environment variable prior to running configure, make and make
install.  

dump -Lv dovecot now reveals /usr/sfw/lib in the RPATH. 

Above all, I am not receiving any errors. 

Thanks,

Randall


On Wed, 2007-03-21 at 17:17 -0700, Tom Bombadil wrote:
 Phil Oleson wrote:
  Randall Svancara wrote:
 
  dovecot: Mar 21 15:34:25 Info: imap-login: Login: user=someusername,
  method=PLAIN, rip=134.121.92.228, lip=134.121.5.141, TLS
  dovecot: Mar 21 15:34:25 Error: IMAP(someusername): ld.so.1: imap:
  fatal: libgcc_s.so.1: open failed: No such file or directory
  dovecot: Mar 21 15:34:25 Error: child 13085 (imap) killed with signal 9
 
  Has anyone seen similar issues?
  
  The RPATH for the dovecot binaries appear to not include the path to where
  libgcc_s.so.1 exists at.   run 'dump -Lv binary' to see what RPATH is
  embeded
  in the binary, and recompile either fixing the -R args used when linking
  or set
  LD_RUN_PATH to a colon delimited list of paths for the RPATH to be set
  to when
  your compiling.
  
  
  -Phil.
  
  
  
 
 Not the best thing to do, but you could just run this:
 
 # crle -u -l /dir/where/libgcc_s.so.1/is/located
 
 This is the ldconfig equivalent for solaris.
 
 But recompiling with the proper -R and -L paths in LDFLAGS, as Phil
 suggested is the way to go.
 
 Cheers


Re: [Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 17:15 -0700, Don O'Neil wrote:

 I'm experiencing timeouts from time to time from both Mac Mail and
 Outlook
 when connecting to my server. I originally suspected that it might be
 process # related, so I increased the auth  login process counts but
 that
 hasn't seemed to make a difference. 
 
 I'm running 1.0rc10 which came with my DirectAdmin control panel. I'm
 wondering if this problem is known and was fixed in a later release?
 I'm
 waiting for instructions from the DirectAdmin folks on building a new
 version in case they do something special.

Do you use SSL? It hangs before it can log in? What does Dovecot's logs
show (set auth_verbose=yes)?

There's one bug related to that:

v1.0.rc15 2006-11-19  Timo Sirainen [EMAIL PROTECTED]
- Potential SSL hang fix at the beginning of the connection

And what do you use as passdb/userdb? Post the whole dovecot -n output?



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


Re: [Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Don O'Neil
 
I have SSL setup, but I'm not specifically using it myself when I get the
hangs I'll have to set the log up and post the results next time it
happens..

Here's the config output though:

# /etc/dovecot.conf
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/exim.cert
ssl_key_file: /etc/exim.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: Dovecot DA ready.
login_processes_count: 16
verbose_proctitle: yes
mail_extra_groups: mail
default_mail_env: maildir:~/Maildir
umask: 7
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
auth default:
  username_chars:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
  count: 5
  passdb:
driver: passwd
  passdb:
driver: passwd-file
args: /etc/virtual/%d/passwd
  userdb:
driver: passwd
  userdb:
driver: passwd-file
args: /etc/virtual/%d/passwd

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Timo Sirainen
Sent: Wednesday, March 21, 2007 5:54 PM
To: Don O'Neil
Cc: dovecot@dovecot.org
Subject: Re: [Dovecot] Timeouts connecting via POP3

On Wed, 2007-03-21 at 17:15 -0700, Don O'Neil wrote:

 I'm experiencing timeouts from time to time from both Mac Mail and 
 Outlook when connecting to my server. I originally suspected that it 
 might be process # related, so I increased the auth  login process 
 counts but that hasn't seemed to make a difference.
 
 I'm running 1.0rc10 which came with my DirectAdmin control panel. I'm 
 wondering if this problem is known and was fixed in a later release?
 I'm
 waiting for instructions from the DirectAdmin folks on building a new 
 version in case they do something special.

Do you use SSL? It hangs before it can log in? What does Dovecot's logs show
(set auth_verbose=yes)?

There's one bug related to that:

v1.0.rc15 2006-11-19  Timo Sirainen [EMAIL PROTECTED]
- Potential SSL hang fix at the beginning of the connection

And what do you use as passdb/userdb? Post the whole dovecot -n output?




Re: [Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Timo Sirainen
On Wed, 2007-03-21 at 18:00 -0700, Don O'Neil wrote:

 auth default:
   username_chars:
 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
   count: 5
   passdb:
 driver: passwd
   passdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd
   userdb:
 driver: passwd
   userdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd

Where does passwd find the users? Are you using nss_ldap or something?
Maybe the hangs are related to it? With newer Dovecot versions you can
use blocking=yes setting, which does the passwd lookups in separate
dovecot-auth worker processes, and if they use up all the processes it
logs an error and returns Internal error to client instead of hanging.

Also if you have more virtual users than NSS users, it's faster to put
the passwd-file passdb/userdb before the passwd, so that that the
passwd-file lookups are done first.



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


Re: [Dovecot] Bug tracking system

2007-03-21 Thread Timo Sirainen
Took a while to reply because I haven't wanted to spend time on thinking
about this.

On Thu, 2007-02-15 at 22:23 +0100, Udo Rader wrote:
  Also I'd rather not require users to register into the BTS at all to add
  new bugs. Just writing the bug subject, description and giving an email
  address should be enough.
 
 Yes, that is possible as well. There are two options for this:
 
 #1 Users remain unidentified and the bug is posted as a global user
 
 #2 Users are looked up based upon their email address. If an unknown
 email address enters a bug report or adds note to an existing bug
 report, it is automatically added as a BTS user.
 
 The latter has the big advantage that users can identify their own
 bugreports/notes much easier later on.

Yep. 2) is good.

 Well, the disadvantage of this however is that it requires some
 countermeasures to prevent spammers from using it as their way to make
 us all happy with their lottery winnings, enlargment stuff and
 such :-)

Would be nice to get it integrated with this mailing list's
subscriptions list. Subscribers can send bugs immediately,
non-subscribers' bugs get moderated. Just like they are now. And bugs
sent via web page wouldn't require moderation but a really simple
captcha (like wiki.dovecot.org has now), which should prevent all
spambots.

Maybe the Mailman's subscriptions list could be pushed to the
bugreporting system whenever it changes.

   #3: allow email based replies based on the subject line that go back 
   directly into the bugtracker
  
  Also from people not registered to the bug tracker? What about
  creating/preserving Message-ID / References headers so that the comments
  in one bug also show up as a single thread in the mailing list?
 
 Yes, that is #2 from above. And about the headers ... the bugzilla email
 interface support this, mantis however (which I would favour for various
 reasons) does not support this out of the box AFAIK, but it is OSS, so
 it should not be too difficult to patch it.
 
 Threading however is always possible based upon the subject of the
 autogenerated mails coming from the BTS.

I just always hate it when people break the threads in this mailing
list. Evolution uses only References/In-Reply-To headers to track them.

   All this can be easily setup for bugzilla and mantis (the only ones that
   I personally have dealt with to a greater extent so far).
   
   If help is needed to get such a configuration working (also including
   hosting of such a solution), I personally (and the company I work for)
   would be happy to help out.
  
  If the above two things could be made to work, I guess we could finally
  have a bug tracker. :)
 
 Sure, if I can provide anything to get things working, just let me know.

I'd at least like to try this. It would be nice to get a working bug
tracker before v1.0 release. But I still have doubts about how annoying
it would be to actually use, and how much time it would require to
change everything to work just the way I want. I've already spend too
much time changing MoinMoin, and Mailman's reply-to-list changes were
kind of a waste of time too :)

As for Bugzilla vs. Mantis, I'm not that big of a fan of Bugzilla, but I
pretty much hate how Mantis looks like at least in
http://www.futureware.biz/mantisdemo/. It's way too confusing.
Bugzilla's default look is OK, although in either case I'd want the
report new bug page to look something like
http://dovecot.org/tmp/bug.html


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


[Dovecot] 1.0.rc28 / v1.0 plans

2007-03-21 Thread Timo Sirainen
I'll probably release 1.0.rc28 in a few days. Would be nice to get some
testing for it first. http://dovecot.org/nightly/dovecot-latest.tar.gz
contains pretty much what it's supposed to be.

I've now replied to all the mails I was planning on replying, excluding
the few patches that are v1.1 material. If you think I forgot to reply
to some mail, please resend it.

I think the documentation in Wiki is finally beginning to look pretty
good. All the important things are done. The only things in my would be
nice TODO list are:

 - Add a new page about index files and their configuration. I'll
probably do this before rc28.
 - PasswordSchemes and Authentication/Mechanisms are pretty heavy
reading. Could be made easier to understand. Possibly also create some
mechanism-specific pages describing how to configure them in Dovecot and
in clients.
 - Design documents would also be nice, but not very useful for
non-programmers and pretty big job to write them

I'm planning on adding the Wiki pages to doc/wiki/ in the tarball and
changing:

 - http://wiki.dovecot.org/* links to doc/wiki/*.txt in
dovecot-example.conf
   - doc/variables.txt could be removed and links to it updated to
doc/wiki/Variables.txt
 - doc/auth-protocol.txt is also already in wiki. Maybe create
doc/design/ and put the AuthProtocol.txt there and other design wiki
pages there as well.

As for v1.0, it looks like there aren't many bug reports anymore about
rc27. If there are as few for rc28, I'll release v1.0 in about a month.
So unless something special happens, I'll fix only the simplest bugs
after rc28 and leave the rest to v1.1/v1.0.1. Hmm. Looks like 13.4. is
Friday. Perhaps that's a good day for a release. :)

Looks like I ended up adding a few more new features to rc28:

* deliver + userdb static: Verify the user's existence from passdb,
  unless allow_all_users=yes
* dovecot --exec-mail: Log to configured log files instead of stderr

+ When copying/syncing a lot of mails, send * OK Hang in there
  replies to client every 15 seconds so it doesn't just timeout the
  connection.
+ Added idxview and logview utilities to examine Dovecot's index files
+ passdb passwd and shadow support blocking=yes setting now also
+ mbox: If mbox file changes unexpectedly while we're writing to it,
  log an error.
+ deliver: Ignore -m  parameter to make calling it easier.
+ deliver: Added new -n parameter to disable autocreating mailboxes.
  It affects both -m parameter and Sieve plugin's fileinto action
- auth cache: If unknown user was found from cache, we didn't properly
  return unknown user status, which could have caused problems in
  deliver.
- Index view syncing fixes
- rc27 didn't compile with some non-GCC compilers
- vpopmail support didn't compile in rc27
- NFS check with chrooting broke home direcotry for the first login
- deliver: If user lookup returned unknown user, it logged
  BUG: Unexpected input
- convert plugin didn't convert INBOX



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


Re: [Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Don O'Neil
Nope, not running nss_ldap... All of my users are virtual ones, so I've
re-organized like you suggested.

Once I get the directions from the DA folks on updating I'll try the
dovecot-auth blocking option if I still have the hanging. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Timo Sirainen
Sent: Wednesday, March 21, 2007 6:38 PM
To: Don O'Neil
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] Timeouts connecting via POP3

On Wed, 2007-03-21 at 18:00 -0700, Don O'Neil wrote:

 auth default:
   username_chars:
 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
   count: 5
   passdb:
 driver: passwd
   passdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd
   userdb:
 driver: passwd
   userdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd

Where does passwd find the users? Are you using nss_ldap or something?
Maybe the hangs are related to it? With newer Dovecot versions you can use
blocking=yes setting, which does the passwd lookups in separate dovecot-auth
worker processes, and if they use up all the processes it logs an error and
returns Internal error to client instead of hanging.

Also if you have more virtual users than NSS users, it's faster to put the
passwd-file passdb/userdb before the passwd, so that that the passwd-file
lookups are done first.




Re: [Dovecot] Timeouts connecting via POP3

2007-03-21 Thread Don O'Neil
Ok... It got stuck... Here is what was in the log:

Mar 21 20:00:28 kermit dovecot[25235]: pop3-login: Disconnected: Inactivity:
rip=72.193.85.114, lip=64.69.41.217

When it works right, this is what is there:

Mar 21 20:04:42 kermit dovecot[34276]: pop3-login: Login:
user=[EMAIL PROTECTED], method=PLAIN, rip=72.193.85.114, lip=64.69.41.217
Mar 21 20:04:42 kermit dovecot[34276]: POP3([EMAIL PROTECTED]):
Disconnected: Logged out top=0/0, retr=0/0, del=0/175, size=4992146 

Any clues from this? Could it be related to the DirectAdmin pop-before-smtp
code? Or maybe stunnel? I haven't updated to the latest RC yet, so this may
go away, but it's quite bothersome at the moment.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Timo Sirainen
Sent: Wednesday, March 21, 2007 6:38 PM
To: Don O'Neil
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] Timeouts connecting via POP3

On Wed, 2007-03-21 at 18:00 -0700, Don O'Neil wrote:

 auth default:
   username_chars:
 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
   count: 5
   passdb:
 driver: passwd
   passdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd
   userdb:
 driver: passwd
   userdb:
 driver: passwd-file
 args: /etc/virtual/%d/passwd

Where does passwd find the users? Are you using nss_ldap or something?
Maybe the hangs are related to it? With newer Dovecot versions you can use
blocking=yes setting, which does the passwd lookups in separate dovecot-auth
worker processes, and if they use up all the processes it logs an error and
returns Internal error to client instead of hanging.

Also if you have more virtual users than NSS users, it's faster to put the
passwd-file passdb/userdb before the passwd, so that that the passwd-file
lookups are done first.




Re: [Dovecot] Solaris Dovecot dovecot dovecot-1.0.rc27

2007-03-21 Thread Bart Smaalders

Randall Svancara wrote:

To all,

I am using Dovecot on solaris 10.  Home directories are mounted using
NFS.  However, they are not readable by root.


I compiled Dovecot from the source.  I set the following environment
variables:

export LDFLAGS='-L/local/software/openssl/lib
-R/local/software/openssl/lib'

export CPPFLAGS=-I/local/software/openssl/include

Then I ran gmake
and the gmake install.

In the server logs, when I attempt to connect to port 993 using imap
over SSL, i receive the following error:

dovecot: Mar 21 15:34:25 Info: imap-login: Login: user=someusername,
method=PLAIN, rip=134.121.92.228, lip=134.121.5.141, TLS
dovecot: Mar 21 15:34:25 Error: IMAP(someusername): ld.so.1: imap:
fatal: libgcc_s.so.1: open failed: No such file or directory
dovecot: Mar 21 15:34:25 Error: child 13085 (imap) killed with signal 9

Has anyone seen similar issues?

Randall





I see you found a solution, but I'm perplexed as to why you have this
problem.  Did you use the gcc in /usr/sfw/bin?

- Bart



Re: [Dovecot] Throttling Logins

2007-03-21 Thread Sean Kamath

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Mar 21, 2007, at 11:22 AM, Timo Sirainen wrote:
http://dovecot.org/tools/imaptest.c is a nice tool to try stress  
testing

logins. Use it something like: imaptest user=dummy password=something
clients=100 - select=0


The issue is not to be able to let someone run even more attempts at  
logging in faster. . . :-)



Some people want to limit number of connections coming to one user, so
this kind of blacklisting feature could be implemented at the same  
time.

Maybe for v2.0 or something..


Yeah, I know, and that's fine.  What I'm hoping for is something like  
if host X connects 600 times, start telling it to go away for a few  
hours. :-)


Sean
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGAhiUA7vyqo9ewCgRAllKAJ0XvV1QX8R117tJG0UUiFLT3RlL1QCeMksx
aV8g3GdQ6X+8boMxQe+EO1w=
=mlIA
-END PGP SIGNATURE-