[Dovecot] dovecot init script

2011-07-16 Thread Brandon Lamb
Anyone have a working startup script for ubuntu 11.04? Ive used debian
forever, but apparently /var/run is now a tmpfs, so there is no
dovecot directory on a reboot. Its all brand new to me so I dont know
if there is a standard way to have it created on boot (obviously other
system scripts are creating directories).

I dont even know if this is something that goes in an init.d script or
configured elsewhere. I came across something that mentioned systemd
and /etc/tmpfiles.d (or something like that) which didnt seem to do
anything.

Anyway, any help or a point in the right direction would be awesome =D

Thanks!

Brandon


Re: [Dovecot] dovecot init script

2011-07-16 Thread Brandon Lamb
On Sat, Jul 16, 2011 at 2:22 PM, Brandon Lamb brandonl...@gmail.com wrote:
 Anyone have a working startup script for ubuntu 11.04? Ive used debian
 forever, but apparently /var/run is now a tmpfs, so there is no
 dovecot directory on a reboot. Its all brand new to me so I dont know
 if there is a standard way to have it created on boot (obviously other
 system scripts are creating directories).

 I dont even know if this is something that goes in an init.d script or
 configured elsewhere. I came across something that mentioned systemd
 and /etc/tmpfiles.d (or something like that) which didnt seem to do
 anything.

 Anyway, any help or a point in the right direction would be awesome =D

 Thanks!

 Brandon

Oh, hm. Apparently what I have just magically worked weird. I was
trying to get I think nginx working on a different server and it
complained about the dir not existing. Oh well, this is working so,
disregard!


[Dovecot] mdbox, quota, ns, maildir quota?

2011-03-25 Thread Brandon Lamb
Hello,

I pasted my config below, hoping someone can point out something obvious.

In my dovecot.log I am seeing:
Warning: quota: Namespace '' is not Maildir, skipping for Maildir++ quota

I am using mysql userdb_* and passing maildir:~/maildir or
mdbox:~/mdbox for mail. When its maildir its fine, I had that
originally then used dsync to convert to mdbox, updated mysql entry to
point to mdbox:~/mdbox and now I keept getting those quota errors.

It IS possible to have mixed environment still correct? Some users can
be maildir and some can be mdbox since Im using the per-user userdb
options?

Any hints here? I would swear this was all working on a different
server I had setup but Im no longer employed there so I cant peek at
the config =P

Thanks for any help or tips

Brandon

---

root@mail1:~# dovecot -n
# 2.0.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.37-2-amd64 x86_64 Debian wheezy/sid
auth_cache_negative_ttl = 30 secs
auth_cache_size = 4 k
auth_cache_ttl = 30 secs
auth_default_realm = greencrane.com
auth_mechanisms = plain login
auth_username_format = %Lu
auth_verbose = yes
auth_worker_max_count = 60
base_dir = /var/run/dovecot
debug_log_path = /var/log/dovecot/debug.log
default_client_limit = 1024
default_internal_user = mail
default_login_user = mail
deliver_log_format = %s from %f %$
dict/expire = mysql:/etc/dovecot/conf.d/dovecot-dict-expire.conf.ext
disable_plaintext_auth = no
first_valid_gid = 8
first_valid_uid = 8
info_log_path = /var/log/dovecot/info.log
last_valid_gid = 8
last_valid_uid = 8
log_path = /var/log/dovecot/dovecot.log
log_timestamp = %Y-%m-%d %H:%M:%S 
login_log_format = %s
login_log_format_elements = (%u) (%r)
mail_access_groups = mail
mail_fsync = never
mail_gid = 8
mail_location = maildir:~/maildir
mail_log_prefix = %Ls %u: 
mail_max_userip_connections = 4
mail_plugins = quota expire
mail_privileged_group = mail
mail_uid = 8
mailbox_idle_check_interval = 1 mins
maildir_very_dirty_syncs = yes
passdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
}
plugin/auth_socket_path = /var/run/dovecot/auth-master
plugin/autocreate = Trash
plugin/autocreate2 = Sent
plugin/autocreate3 = Drafts
plugin/autocreate4 = Spam
plugin/autosubscribe = Trash
plugin/autosubscribe2 = Sent
plugin/autosubscribe3 = Drafts
plugin/autosubscribe4 = Spam
plugin/quota = maildir:User quota
plugin/quota_warning = storage=95%% quota-warning 95 %u
plugin/quota_warning2 = storage=80%% quota-warning 80 %u
protocols = imap pop3
service auth {
  executable = /usr/local/libexec/dovecot/auth
  unix_listener auth-client {
group = mail
mode = 0666
user = mail
  }
  unix_listener auth-master {
group = mail
mode = 0666
user = mail
  }
  unix_listener auth-userdb {
group = mail
mode = 0666
user = mail
  }
  vsz_limit = 512 M
}
service dict {
  unix_listener dict {
group = mail
mode = 0666
  }
}
service imap-login {
  chroot = login
  client_limit = 512
  executable = /usr/local/libexec/dovecot/imap-login
  process_limit = 20
  process_min_avail = 4
  service_count = 0
  user = dovecot
  vsz_limit = 128 M
}
service imap {
  drop_priv_before_exec = no
  executable = /usr/local/libexec/dovecot/imap
  vsz_limit = 512 M
}
service pop3-login {
  chroot = login
  client_limit = 512
  executable = /usr/local/libexec/dovecot/pop3-login
  process_limit = 20
  process_min_avail = 4
  service_count = 0
  user = dovecot
  vsz_limit = 128 M
}
service pop3 {
  drop_priv_before_exec = no
  executable = /usr/local/libexec/dovecot/pop3
  vsz_limit = 512 M
}
service quota-warning {
  executable = script /etc/dovecot/quota-warning.sh
  user = mail
}
ssl_cert = /etc/dovecot/ssl/dovecot-cert.pem
ssl_key = /etc/dovecot/ssl/dovecot-key.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
}
valid_chroot_dirs = /mail
verbose_proctitle = yes
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-userdb
  info_log_path = /var/log/dovecot/deliver.log
  lda_mailbox_autocreate = yes
  lda_mailbox_autosubscribe = yes
  log_path = /var/log/dovecot/deliver.log
  mail_fsync = optimized
  mail_plugin_dir = /usr/local/lib/dovecot
  mail_plugins = quota expire trash autocreate
  postmaster_address = postmas...@greencrane.com
  quota_full_tempfail = yes
  rejection_reason = Your message to %t with subject of %s was
automatically rejected:%n%r
  rejection_subject = Mailbox Full: %s
  sendmail_path = /usr/sbin/exim
}
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
  imap_id_log = *
  imap_logout_format = bytes=%i/%o
  imap_max_line_length = 64 k
  mail_max_userip_connections = 20
  mail_plugin_dir = /usr/local/lib/dovecot
  mail_plugins = quota expire imap_quota autocreate trash
}
protocol pop3 {
  mail_max_userip_connections = 2
  mail_plugin_dir = /usr/local/lib/dovecot
  mail_plugins = quota expire
  pop3_client_workarounds = 

[Dovecot] Why do these keep showing up?

2010-10-08 Thread Brandon Lamb
2010-10-08 14:37:29 imap hma...@olypen.com: Error: Mailbox Removed:
Expunged GUID mismatch for UID 1257: ceb413227b55e8aa14cf86ec86f2b652
vs 32b06aa8bc66762bbd6af15228072949

I keep getting a bunch of these, which turn out to be customer cant
delete messages from folder X. I just deleted all dovecot indexes
(find -name dovecot* -type f -delete) from all users this morning and
this is still happening.

Any ideas? Using maildir format


Re: [Dovecot] Why do these keep showing up?

2010-10-08 Thread Brandon Lamb
On Fri, Oct 8, 2010 at 2:58 PM, Brandon Lamb brandonl...@gmail.com wrote:
 2010-10-08 14:37:29 imap hma...@olypen.com: Error: Mailbox Removed:
 Expunged GUID mismatch for UID 1257: ceb413227b55e8aa14cf86ec86f2b652
 vs 32b06aa8bc66762bbd6af15228072949

 I keep getting a bunch of these, which turn out to be customer cant
 delete messages from folder X. I just deleted all dovecot indexes
 (find -name dovecot* -type f -delete) from all users this morning and
 this is still happening.

 Any ideas? Using maildir format

Or I suppose it is possible this find command didnt delete all the
index files. Maybe I will just write a script to manually delete the
specific files.


[Dovecot] mdbox, doveadm force-resync crashing

2010-09-10 Thread Brandon Lamb
doveadm force-resync -u jo...@vinemaker.com INBOX
doveadm(jo...@vinemaker.com): Error: Corrupted index file
/mail/mail2/j/vinemaker.com/johnh/./mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index:
messages_count too large (414  385)
doveadm(jo...@vinemaker.com): Warning: fscking index file
/mail/mail2/j/vinemaker.com/johnh/./mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index
doveadm(jo...@vinemaker.com): Error: Fixed index file
/mail/mail2/j/vinemaker.com/johnh/./mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index:
messages_count 414 - 385
doveadm(jo...@vinemaker.com): Error: Fixed index file
/mail/mail2/j/vinemaker.com/johnh/./mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index:
seen_messages_count 386 - 379
doveadm(jo...@vinemaker.com): Panic: file mail-index-write.c: line 188
(mail_index_write): assertion failed: (index-log_locked)
doveadm(jo...@vinemaker.com): Error: Raw backtrace:
/usr/local/lib/dovecot/libdovecot.so.0(+0x39c1a) [0x7f39c4bf5c1a] -
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x37)
[0x7f39c4bf5cf7] - /usr/local/lib/dovecot/libdovecot.so.0(i_error+0)
[0x7f39c4bd3026] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mail_index_write+0x793)
[0x7f39c56eac73] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mail_index_fsck+0xc7e)
[0x7f39c56d5cee] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0x42577)
[0x7f39c56d8577] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mail_index_map+0x59)
[0x7f39c56d8a79] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0x3d599)
[0x7f39c56d3599] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(mail_index_open+0x118)
[0x7f39c56d3938] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_storage_mailbox_open+0xbc)
[0x7f39c5705e9c] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(dbox_mailbox_open+0x61)
[0x7f39c5720f61] -
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0x2e161)
[0x7f39c56c4161] - /usr/local/bin/doveadm() [0x409518] -
/usr/local/bin/doveadm() [0x4095cf] - /usr/local/bin/doveadm()
[0x409aee] - /usr/local/bin/doveadm(doveadm_mail_single_user+0x53)
[0x409be3] - /usr/local/bin/doveadm() [0x409f51] -
/usr/local/bin/doveadm(doveadm_mail_try_run+0x141) [0x40a191] -
/usr/local/bin/doveadm(main+0x381) [0x40e091] -
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f39c446dc4d] -
/usr/local/bin/doveadm() [0x409319]
Aborted


[Dovecot] Panic, rawtrace, log, etc

2010-08-26 Thread Brandon Lamb
While running some doveadm expunge -A mailbox Spam savedbefore 30d and
doveadm purge -A after

2010-08-26 16:20:51 auth: Error: net_accept() failed: Too many open files
2010-08-26 16:20:51 master: Warning: service(auth): process_limit
reached, client connections are being dropped
2010-08-26 16:21:21 auth: Panic: file auth-request-handler.c: line 85
(auth_request_handler_unref): assertion failed:
(hash_table_count(handler-requests) == 0)
2010-08-26 16:21:21 auth: Error: Raw backtrace:
/usr/local/lib/dovecot/libdovecot.so.0(+0x39c1a) [0x7fe41f5f5c1a] -
/usr/local/lib/dovecot/libdovecot.so.0(+0x39c6a) [0x7fe41f5f5c6a] -
/usr/local/lib/dovecot/libdovecot.so.0(i_error+0) [0x7fe41f5d3026] -
dovecot/auth [8 wait, 0 passdb, 0 userdb]() [0x412153] - dovecot/auth
[8 wait, 0 passdb, 0 userdb]() [0x40c3ad] - dovecot/auth [8 wait, 0
passdb, 0 userdb](auth_client_connections_deinit+0x41) [0x40c461] -
dovecot/auth [8 wait, 0 passdb, 0 userdb](main+0x2ea) [0x4168ca] -
/lib/libc.so.6(__libc_start_main+0xfd) [0x7fe41e60ac4d] -
dovecot/auth [8 wait, 0 passdb, 0 userdb]() [0x40b1f9]
2010-08-26 16:21:21 master: Error: service(auth): child 14880 killed
with signal 6 (core dumps disabled)
2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
client 14875
2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
client 14873
2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
client 14873
2010-08-26 16:21:21 auth: Error: Master requested auth for client
14874 with invalid cookie
2010-08-26 16:21:21 auth: Error: Master requested auth for client
14874 with invalid cookie
2010-08-26 16:21:21 auth: Error: Master requested auth for client
14875 with invalid cookie
2010-08-26 16:21:21 auth: Error: Master requested auth for client
14876 with invalid cookie
2010-08-26 16:21:21 auth: Error: Master requested auth for client
14875 with invalid cookie


Re: [Dovecot] Panic, rawtrace, log, etc

2010-08-26 Thread Brandon Lamb
On Thu, Aug 26, 2010 at 4:35 PM, Brandon Lamb brandonl...@gmail.com wrote:
 While running some doveadm expunge -A mailbox Spam savedbefore 30d and
 doveadm purge -A after

 2010-08-26 16:20:51 auth: Error: net_accept() failed: Too many open files
 2010-08-26 16:20:51 master: Warning: service(auth): process_limit
 reached, client connections are being dropped
 2010-08-26 16:21:21 auth: Panic: file auth-request-handler.c: line 85
 (auth_request_handler_unref): assertion failed:
 (hash_table_count(handler-requests) == 0)
 2010-08-26 16:21:21 auth: Error: Raw backtrace:
 /usr/local/lib/dovecot/libdovecot.so.0(+0x39c1a) [0x7fe41f5f5c1a] -
 /usr/local/lib/dovecot/libdovecot.so.0(+0x39c6a) [0x7fe41f5f5c6a] -
 /usr/local/lib/dovecot/libdovecot.so.0(i_error+0) [0x7fe41f5d3026] -
 dovecot/auth [8 wait, 0 passdb, 0 userdb]() [0x412153] - dovecot/auth
 [8 wait, 0 passdb, 0 userdb]() [0x40c3ad] - dovecot/auth [8 wait, 0
 passdb, 0 userdb](auth_client_connections_deinit+0x41) [0x40c461] -
 dovecot/auth [8 wait, 0 passdb, 0 userdb](main+0x2ea) [0x4168ca] -
 /lib/libc.so.6(__libc_start_main+0xfd) [0x7fe41e60ac4d] -
 dovecot/auth [8 wait, 0 passdb, 0 userdb]() [0x40b1f9]
 2010-08-26 16:21:21 master: Error: service(auth): child 14880 killed
 with signal 6 (core dumps disabled)
 2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
 client 14875
 2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
 client 14873
 2010-08-26 16:21:21 auth: Error: Master requested auth for nonexistent
 client 14873
 2010-08-26 16:21:21 auth: Error: Master requested auth for client
 14874 with invalid cookie
 2010-08-26 16:21:21 auth: Error: Master requested auth for client
 14874 with invalid cookie
 2010-08-26 16:21:21 auth: Error: Master requested auth for client
 14875 with invalid cookie
 2010-08-26 16:21:21 auth: Error: Master requested auth for client
 14876 with invalid cookie
 2010-08-26 16:21:21 auth: Error: Master requested auth for client
 14875 with invalid cookie

And i see the process limit and stuff warnings, just reporting because
I seem to remember Timo saying any error is considered a bug, so just
in case...

Going to double my process limit from 100 to 256 and bump up the
vsz_limit and see if I can make it go away


Re: [Dovecot] Home directories

2010-08-25 Thread Brandon Lamb
On Wed, Aug 25, 2010 at 10:46 AM, Timo Sirainen t...@iki.fi wrote:
 On Wed, 2010-08-25 at 09:36 +0200, Rainer Frey wrote:
  Also whenever I try to suggest using a separate home and mail directory,
  the answer is way too often: But I'm using virtual users. (They don't
  have home directories.)
 
  So I started wondering. Maybe simply renaming the home to something
  else would help here at least some.

 OTOH you'd need to make distinction between system and virtual users in docs
 everywhere home is used, like:
 mail_location: relative paths are based on $home for system users, and on
 $vhome for virtual users.

 That text is wrong though. Relative paths are strongly discouraged. They
 probably are based on home, but that's only by chance and may not work
 in all situations..

Does that mean you do NOT recommend using maildir:~/ as a
mail_location in preference of maildir:/full/path/to/maildir ?


Re: [Dovecot] Home directories

2010-08-24 Thread Brandon Lamb
On Tue, Aug 24, 2010 at 7:57 AM, Timo Sirainen t...@iki.fi wrote:
 I've noticed that a lot of people are using e.g.:

 mail_location = maildir:/var/vmail/%d/%n

 Then either they don't have home directory set, or their home directory
 is the same as the maildir. http://wiki.dovecot.org/VirtualUsers/Home
 explains all the problems of not separate home and mail directories.

 Also whenever I try to suggest using a separate home and mail directory,
 the answer is way too often: But I'm using virtual users. (They don't
 have home directories.)

 So I started wondering. Maybe simply renaming the home to something
 else would help here at least some. Make all of the documentation use
 only the new word, and add alias for userdb so that the new name and the
 home both work (I guess docs would need to keep using the home as
 field name for some more years).

 So far I've only come up with vhome as the replacement name. Other
 ideas?

Id like to share my experience that I just went through Sunday.

Four years ago I took over as sysadmin, and one of the things I did
was clean up our mail system. One of the decisions I made was to get
rid of what at the time seemed like an unnecessary extra folder called
.maildir in every user's directory, which was only mail. So I moved
all data to just /mail/domain/initial/username and that seemed to be
great.

Now however, I am wishing I never did that. I seem to be having issues
giving /mail/domain/initial/username as the home and maildir:~/ as the
maildir (per user userdb mysql etc).

So I started a new quick project to move back to having a maildir
folder in the user directory, also so I could then migrate to mdbox by
having an mdbox folder there. Well on Sunday I had a mixup and i set
all my user's home's to maildir:~/ which had a side effect of *moving*
my entire domain folder to a different location, all 468 gigs of it
and I thought it had all been deleted, total panic attack and a good
two hours of going WTF and wanting to cry since my backup had also
started running at the same time so I was missing all kinds of stuff
on my live backup server, and to top it off, my third incremental
backup server had a bad drive so that was totally flaky.

Anyway, I learned two lessons here. 1) Dont procrastinate fixing your
backup server even if you have a third and think its not a big deal at
the time and 2) I wish I would have kept the maildir folder in the
user's home directory, even if they are virtual users.

On a side note, I happened to find my domain's mail directory and
successfully merged it back with only minor noise from customers
noticing. Good thing it was a sunday and the fair was in town.

/rookiemove FTL


Re: [Dovecot] Home directories

2010-08-24 Thread Brandon Lamb
On Tue, Aug 24, 2010 at 7:57 AM, Timo Sirainen t...@iki.fi wrote:
 I've noticed that a lot of people are using e.g.:

 mail_location = maildir:/var/vmail/%d/%n

 Then either they don't have home directory set, or their home directory
 is the same as the maildir. http://wiki.dovecot.org/VirtualUsers/Home
 explains all the problems of not separate home and mail directories.

 Also whenever I try to suggest using a separate home and mail directory,
 the answer is way too often: But I'm using virtual users. (They don't
 have home directories.)

 So I started wondering. Maybe simply renaming the home to something
 else would help here at least some. Make all of the documentation use
 only the new word, and add alias for userdb so that the new name and the
 home both work (I guess docs would need to keep using the home as
 field name for some more years).

 So far I've only come up with vhome as the replacement name. Other
 ideas?

My $0.02 is userdir over the others, but at the same time home and
maildir made sense to me as it is.

userdir / user_dir
userpath / user_path
userlocation / user_location
userroot / user_root
userbase / user_base


Re: [Dovecot] DSYNC needs a lot more documentation

2010-08-21 Thread Brandon Lamb
On Sat, Aug 21, 2010 at 11:00 AM, Charles Marcus
cmar...@media-brokers.com wrote:
 On 2010-08-21 12:51 PM, Marc Perkel m...@perkel.com wrote:
 When you write software you never have to learn it so you don't have
 the perspective of someone who never heard of it before and wondering
 what is this?

 Mark, is this another case of your absolute failure to even *try* to
 google the answer for yourself? You do know that man pages are not the
 only place (and quite often definitely not the best place) to find
 documentation for any given software?

 http://www.lmgtfy.com/?q=dsync+dovecot+wiki

 --

 Best regards,

 Charles

Haha! That is an awesome link thanks!


[Dovecot] Dovecot 2 and expire

2010-07-26 Thread Brandon Lamb
expire_dict = proxy::expire

I found this expire_dict somewhere, might have been the 1.x wiki, but
on the expire plugin page there is no mention of it. I am trying to
troubleshoot why my mysql table has no entries. Do I need this line?
Is that correct for using mysql?

In dict {} I have

expire = mysql:/etc/dovecot/conf.d/dovecot-dict-expire.conf.ext

and in plugin {} i have

expire_dict = proxy::expire
expire = Trash 30d
expire2 = Trash/* 30d
expire3 = Spam 14d
expire4 = Spam/Removed 6h
expire5 = Spam/Delivered 2d
expire6 = Deleted* 30d
expire7 = Archive 30d

Contents of dovecot-dict-expire.conf.ext

connect = host=servername dbname=mail user=un password=pw

map {
pattern = shared/expire/$user/$mailbox
table = expires
value_field = ts_expires

fields {
username = $user
mailbox = $mailbox
}
}

I must admit I dont understand what pattern means, I just copied from
something when I was setting this up.


Re: [Dovecot] Dovecot 2 and expire

2010-07-26 Thread Brandon Lamb
On Mon, Jul 26, 2010 at 11:30 AM, Timo Sirainen t...@iki.fi wrote:
 On Mon, 2010-07-26 at 10:31 -0700, Brandon Lamb wrote:
 expire_dict = proxy::expire

 I found this expire_dict somewhere, might have been the 1.x wiki, but
 on the expire plugin page there is no mention of it. I am trying to
 troubleshoot why my mysql table has no entries. Do I need this line?
 Is that correct for using mysql?

 Yes, you need it and it's correct. Added also to wiki2 now.

 and in plugin {} i have

 expire_dict = proxy::expire
 expire = Trash 30d
 expire2 = Trash/* 30d
 expire3 = Spam 14d
 expire4 = Spam/Removed 6h
 expire5 = Spam/Delivered 2d
 expire6 = Deleted* 30d
 expire7 = Archive 30d

 Remove the dates from these lines. Now it's assuming you want to use
 expire for mailbox called Trash 30d. The dates are set in doveadm
 expunge query, e.g.:

 doveadm expunge \( mailbox Trash savedbefore 30d \) or \
 \( mailbox Trash/* savedbefore 30d \) or \
 \( mailbox Spam savedbefore 14d \) or \
 etc..

Oh! Okay will do thanks!


Re: [Dovecot] v2.0.rc3 released

2010-07-20 Thread Brandon Lamb
On Tue, Jul 20, 2010 at 1:57 PM, Timo Sirainen t...@iki.fi wrote:
 http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc3.tar.gz
 http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc3.tar.gz.sig

 A lot of dsync fixes. I think I've fixed now all of the bugs ever
 reported about dsync and I'm hopeful that it's now stable. All the rest
 of Dovecot looks pretty good too. Maybe v2.0.0 will be out next week.

 Changes since rc2:

        * Single-dbox is now called sdbox instead of dbox.
          dbox will stay as an alias for it for now.

        + Added mail_temp_dir setting, used by deliver and lmtp for creating
          temporary mail files. Default is /tmp.
        + doveadm: Added director map command to list user - host mappings.
        - imap: Fixed checking if list=children namespace has children.
        - director: If all login processes died, director stopped reading
          proxy-notify input and caused future login processes to hang
        - mail_log plugin configuration was broken
        - Using more than 2 plugins could have caused broken behavior
        - mdbox: Race condition fixes related to copying and purging
        - dsync: Lots of fixes

Hey do you also want reports on ANY errors/output from dsync? I have a
couple mailboxes that I kept getting errors about virtual and/or
physical sizes and indexes being corrupt but I just assumed it was a
warning or ignorable? If you consider that a bug let me know


Re: [Dovecot] v2.0.rc3 released

2010-07-20 Thread Brandon Lamb
On Tue, Jul 20, 2010 at 4:10 PM, Timo Sirainen t...@iki.fi wrote:
 On 21.7.2010, at 0.07, Brandon Lamb wrote:

 Hey do you also want reports on ANY errors/output from dsync?

 I was hoping they'd all be gone in rc3.

 I have a
 couple mailboxes that I kept getting errors about virtual and/or
 physical sizes and indexes being corrupt but I just assumed it was a
 warning or ignorable? If you consider that a bug let me know

 Were you using NFS? I doubt those are dsync bugs but rather generic index 
 corruption problems and such that dsync just brings to surface because it 
 goes through all mails.

At one point I was using nfs yes, and also have only been using
dovecot lda for 1-2 years so probably lots of old mail with
missing/wrong sizes (maildir)


Re: [Dovecot] dsync segmentation fault

2010-07-19 Thread Brandon Lamb
On Mon, Jul 19, 2010 at 9:28 AM, Timo Sirainen t...@iki.fi wrote:
 On Sun, 2010-07-18 at 00:08 -0700, Brandon Lamb wrote:
 dsync -u bran...@olypen.com mirror mdbox~/mdbox

 What version? Maybe I already fixed it?

 ./dsync -u tss mirror mdbox~/mdbox
 dsync(tss): Fatal: execvp(mdbox~/mdbox) failed: No such file or directory
 dsync-local(tss): Error: read() from worker server failed: EOF
 dsync-local(tss): Error: Unexpected reply from server:

2.0.rc2


Re: [Dovecot] dsync segmentation fault

2010-07-19 Thread Brandon Lamb
On Mon, Jul 19, 2010 at 9:45 AM, Brandon Lamb brandonl...@gmail.com wrote:
 On Mon, Jul 19, 2010 at 9:28 AM, Timo Sirainen t...@iki.fi wrote:
 On Sun, 2010-07-18 at 00:08 -0700, Brandon Lamb wrote:
 dsync -u bran...@olypen.com mirror mdbox~/mdbox

 What version? Maybe I already fixed it?

 ./dsync -u tss mirror mdbox~/mdbox
 dsync(tss): Fatal: execvp(mdbox~/mdbox) failed: No such file or directory
 dsync-local(tss): Error: read() from worker server failed: EOF
 dsync-local(tss): Error: Unexpected reply from server:

 2.0.rc2

dsync -u tss mirror mdbox~/mdbox
Segmentation fault

=P


[Dovecot] mdbox, mdbox_rotate_size 2m default

2010-07-18 Thread Brandon Lamb
Anyone else test using different values?
Was 2M chosen as a default based on anything specific?
Is there any kind of known range where performance starts to go
downhill if its greater than x or less than y?

Im curious if there would be any obvious reason why I shouldnt set it
to 5-10 megs


[Dovecot] dsync segmentation fault

2010-07-18 Thread Brandon Lamb
dsync -u bran...@olypen.com mirror mdbox~/mdbox
Segmentation fault

Took me 3 tries before I noticed the missing colon after mdbox


[Dovecot] Haha wow, thats freakin cool... mdbox

2010-07-18 Thread Brandon Lamb
It didnt really click until I had a ls -ald * on watch while I moved
messages around folders using mdbox... I moved about 200 first to an
Archive folder, and scratched my head wondering why i didnt see any
new m.* files being created after the move. So then I moved some 5k
other messages from other folders to my archive folder...

Then it dawned on me, how damn cool, the data never changes, dovecot
just updates its index of what folder the message is in?!

That is awesome!

Also, I ended up answering my own question on the 2m
mdbox_rotate_size, if a 10 meg email comes through it will write a 10
meg file, so thats cool too.


[Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
I cannot seem to get exim/lda working...

In my exim log i just see these
2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
R=router_pop T=dovecot_deliver defer (2): No such file or directory:
failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index

Now I have all the debugging on as far as i can tell, and exim is
obviously being returned some value from dovecot because it knows
about the maildir that i return from sql, but yet there is zero being
logged in debug or anything else. If I run the dovecot-lda from the
command line with the same then it works and i get logs entered

command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d
$local_p...@$domain -m $acl_m1

I am returning a home and mail with userdb, the directory does exist,
owned by mail.mail... Im stumped

dovecot -n
# 2.0.rc2: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian squeeze/sid
auth_cache_negative_ttl = 30 s
auth_cache_size = 4096
auth_cache_ttl = 30 s
auth_debug = yes
auth_default_realm = olypen.com
auth_mechanisms = plain login
auth_username_format = %Lu
auth_verbose = yes
auth_worker_max_count = 60
base_dir = /var/run/dovecot
debug_log_path = /var/log/dovecot/debug.log
default_client_limit = 1024
default_internal_user = mail
default_login_user = mail
default_vsz_limit = 1073741824
deliver_log_format = %s from %f %$
dict {
  expire = mysql:/etc/dovecot/conf.d/dovecot-dict-expire.conf.ext
}
disable_plaintext_auth = no
dotlock_use_excl = yes
first_valid_gid = 8
first_valid_uid = 8
info_log_path = /var/log/dovecot/info.log
last_valid_gid = 8
last_valid_uid = 8
log_path = /var/log/dovecot/dovecot.log
log_timestamp = %Y-%m-%d %H:%M:%S
login_log_format = %s
login_log_format_elements = (%u) (%r)
mail_access_groups = mail
mail_debug = yes
mail_fsync = never
mail_gid = 8
mail_location = maildir:~/:INDEX=~/dovecot-index
mail_log_prefix = %Ls %u:
mail_max_userip_connections = 4
mail_plugins = quota
mail_privileged_group = mail
mail_uid = 8
mailbox_idle_check_interval = 60 s
maildir_very_dirty_syncs = yes
mdbox_rotate_size = 10485760
namespace {
  hidden = no
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  auth_socket_path = /var/run/dovecot/auth-master
  autocreate = Trash
  autocreate2 = Spam
  autocreate3 = Spam.Delivered
  autocreate4 = Spam.Removed
  autocreate5 = Sent
  autocreate6 = Drafts
  autosubscribe = Trash
  autosubscribe2 = Sent
  expire = Trash 30d
  expire2 = Trash/* 30d
  expire3 = Spam 14d
  expire4 = Spam/Removed 6h
  expire5 = Spam/Delivered 2d
  expire6 = Deleted* 30d
  expire7 = Archive 30d
  expire_dict = proxy::expire
  qoute_rule5 = Spam.Delivered:ignore
  quota = maildir:User quota
  quota_rule2 = Trash:ignore
  quota_rule3 = Deleted Items:ignore
  quota_rule4 = Spam:ignore
  quota_rule6 = Spam.Removed:ignore
  quota_warning = storage=95%% /etc/dovecot/quota-warning.sh 95
  quota_warning2 = storage=80%% /etc/dovecot/quota-warning.sh 80
  trash = /etc/dovecot/conf.d/dovecot-trash.conf.ext
  zlib_save = bz2
  zlib_save_level = 6
}
protocols = imap pop3
service auth {
  executable = /usr/local/libexec/dovecot/auth
  unix_listener auth-client {
group = mail
mode = 0666
user = mail
  }
  unix_listener auth-master {
group = mail
mode = 0666
user = mail
  }
  unix_listener auth-userdb {
group = mail
mode = 0666
user = mail
  }
  vsz_limit = 536870912
}
service imap-login {
  client_limit = 512
  executable = /usr/local/libexec/dovecot/imap-login
  process_limit = 20
  process_min_avail = 4
  service_count = 0
  user = dovecot
  vsz_limit = 134217728
}
service imap {
  drop_priv_before_exec = no
  executable = /usr/local/libexec/dovecot/imap
  vsz_limit = 536870912
}
service pop3-login {
  client_limit = 512
  executable = /usr/local/libexec/dovecot/pop3-login
  process_limit = 20
  process_min_avail = 4
  service_count = 0
  user = dovecot
  vsz_limit = 134217728
}
service pop3 {
  drop_priv_before_exec = no
  executable = /usr/local/libexec/dovecot/pop3
  vsz_limit = 536870912
}
ssl_cert = /etc/dovecot/ssl/dovecot-cert.pem
ssl_key = /etc/dovecot/ssl/dovecot-key.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
}
valid_chroot_dirs = /mail
verbose_proctitle = yes
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-userdb
  info_log_path = /var/log/dovecot/deliver.log
  lda_mailbox_autocreate = yes
  lda_mailbox_autosubscribe = yes
  log_path = /var/log/dovecot/deliver.log
  mail_fsync = optimized
  mail_plugin_dir = /usr/local/lib/dovecot/lda
  mail_plugins = $mail_plugins
  postmaster_address = postmas...@olypen.com
  quota_full_tempfail = yes
  rejection_reason = Your message to %t with subject of %s was
automatically rejected:%n%r
  rejection_subject = Mailbox Full: %s
  sendmail_path = /usr/sbin/exim
}
protocol imap {
  imap_client_workarounds = delay-newmail 

Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index
 ..
 command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d
 $local_p...@$domain -m $acl_m1

 Why are you giving -k parameter?

I dont remember, its something I had entered at some point long ago,
i'll remove it

 I am returning a home and mail with userdb, the directory does exist,
 owned by mail.mail... Im stumped

 It looks like you're returning 
 maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory.

I know that was my thought too! But below are the fields in mysql, and
there are also no logs being entered to give me hints at what might be
wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda
from the command line??

home: /mail/mail2/b/olypen.com/brandon
maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index

and dovecot-sql.conf-ext
# Password query
password_query = SELECT 8 AS userdb_uid, \
8 AS userdb_gid, \
password, \
CONCAT(username, '@', domain) AS user, \
mail_pop.home AS userdb_home, \
mail_pop.maildir AS userdb_mail, \
CONCAT('*:storage=', quota, 'M') AS quota_rule, \
'~/dovecot.sieve' AS userdb_sieve \
FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
'enabled' LIMIT 1

# User query
user_query = SELECT mail_pop.home AS home, \
mail_pop.maildir AS mail, \
8 AS uid, \
8 AS gid, \
CONCAT('*:storage=', quota, 'M') AS quota_rule, \
'~/dovecot.sieve' AS sieve \
FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
'enabled' LIMIT 1

And the directory:
server:/mail/mail2/b/olypen.com/brandon# ls -al
total 8
drwxrwx---  4 mail mail   32 Jul 18 00:54 .
drwxrwx---  3 mail mail   20 Jul 18 00:53 ..
drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir
drwx-w  4 mail mail 4096 Jul 18 01:20 mdbox


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index
 ..
 command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d
 $local_p...@$domain -m $acl_m1

 Why are you giving -k parameter?

 I dont remember, its something I had entered at some point long ago,
 i'll remove it

 I am returning a home and mail with userdb, the directory does exist,
 owned by mail.mail... Im stumped

 It looks like you're returning 
 maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory.

 I know that was my thought too! But below are the fields in mysql, and
 there are also no logs being entered to give me hints at what might be
 wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda
 from the command line??

 home: /mail/mail2/b/olypen.com/brandon
 maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index

 and dovecot-sql.conf-ext
 # Password query
 password_query = SELECT 8 AS userdb_uid, \
 8 AS userdb_gid, \
 password, \
 CONCAT(username, '@', domain) AS user, \
 mail_pop.home AS userdb_home, \
 mail_pop.maildir AS userdb_mail, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS userdb_sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 # User query
 user_query = SELECT mail_pop.home AS home, \
 mail_pop.maildir AS mail, \
 8 AS uid, \
 8 AS gid, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 And the directory:
 server:/mail/mail2/b/olypen.com/brandon# ls -al
 total 8
 drwxrwx---  4 mail mail   32 Jul 18 00:54 .
 drwxrwx---  3 mail mail   20 Jul 18 00:53 ..
 drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir
 drwx-w  4 mail mail 4096 Jul 18 01:20 mdbox

I also just now tried changing the maildir field to absolute paths and
now I still get :

No such file or directory: failed to chdir to
maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index

And still nothing in dovecot's logs showing that exim even talked to it..


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 12:17 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index
 ..
 command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d
 $local_p...@$domain -m $acl_m1

 Why are you giving -k parameter?

 I dont remember, its something I had entered at some point long ago,
 i'll remove it

 I am returning a home and mail with userdb, the directory does exist,
 owned by mail.mail... Im stumped

 It looks like you're returning 
 maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory.

 I know that was my thought too! But below are the fields in mysql, and
 there are also no logs being entered to give me hints at what might be
 wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda
 from the command line??

 home: /mail/mail2/b/olypen.com/brandon
 maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index

 and dovecot-sql.conf-ext
 # Password query
 password_query = SELECT 8 AS userdb_uid, \
 8 AS userdb_gid, \
 password, \
 CONCAT(username, '@', domain) AS user, \
 mail_pop.home AS userdb_home, \
 mail_pop.maildir AS userdb_mail, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS userdb_sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 # User query
 user_query = SELECT mail_pop.home AS home, \
 mail_pop.maildir AS mail, \
 8 AS uid, \
 8 AS gid, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 And the directory:
 server:/mail/mail2/b/olypen.com/brandon# ls -al
 total 8
 drwxrwx---  4 mail mail   32 Jul 18 00:54 .
 drwxrwx---  3 mail mail   20 Jul 18 00:53 ..
 drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir
 drwx-w  4 mail mail 4096 Jul 18 01:20 mdbox

 I also just now tried changing the maildir field to absolute paths and
 now I still get :

 No such file or directory: failed to chdir to
 maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index

 And still nothing in dovecot's logs showing that exim even talked to it..


Curious, I just changed the maildir field to
/mail/mail2/b/olypen.com/brandon/Maildir and now it delivered,
curious!

Its like it didnt understand the mailbox type or something?


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 12:27 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:17 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:13 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sun, Jul 18, 2010 at 12:06 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index
 ..
 command = /usr/local/libexec/dovecot/ -e -k -f $sender_address -d
 $local_p...@$domain -m $acl_m1

 Why are you giving -k parameter?

 I dont remember, its something I had entered at some point long ago,
 i'll remove it

 I am returning a home and mail with userdb, the directory does exist,
 owned by mail.mail... Im stumped

 It looks like you're returning 
 maildir:~/maildir:INDEX=~/maildir/dovecot-index as the home directory.

 I know that was my thought too! But below are the fields in mysql, and
 there are also no logs being entered to give me hints at what might be
 wrong. It isnt logging to debug, but it DOES if I run the dovecot-lda
 from the command line??

 home: /mail/mail2/b/olypen.com/brandon
 maildir: maildir:~/maildir:INDEX=~/maildir/dovecot-index

 and dovecot-sql.conf-ext
 # Password query
 password_query = SELECT 8 AS userdb_uid, \
 8 AS userdb_gid, \
 password, \
 CONCAT(username, '@', domain) AS user, \
 mail_pop.home AS userdb_home, \
 mail_pop.maildir AS userdb_mail, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS userdb_sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 # User query
 user_query = SELECT mail_pop.home AS home, \
 mail_pop.maildir AS mail, \
 8 AS uid, \
 8 AS gid, \
 CONCAT('*:storage=', quota, 'M') AS quota_rule, \
 '~/dovecot.sieve' AS sieve \
 FROM `auth` LEFT JOIN (mail_pop) ON (mail_pop.user_id = auth.user_id)
 WHERE username = '%n' AND domain = '%d' AND mail_pop.status =
 'enabled' LIMIT 1

 And the directory:
 server:/mail/mail2/b/olypen.com/brandon# ls -al
 total 8
 drwxrwx---  4 mail mail   32 Jul 18 00:54 .
 drwxrwx---  3 mail mail   20 Jul 18 00:53 ..
 drwxrwx--- 27 mail mail 4096 Jul 18 11:22 maildir
 drwx-w  4 mail mail 4096 Jul 18 01:20 mdbox

 I also just now tried changing the maildir field to absolute paths and
 now I still get :

 No such file or directory: failed to chdir to
 maildir:/mail/mail2/b/olypen.com/brandon/maildir:INDEX=/mail/mail2/b/olypen.com/brandon/maildir/dovecot-index

 And still nothing in dovecot's logs showing that exim even talked to it..


 Curious, I just changed the maildir field to
 /mail/mail2/b/olypen.com/brandon/Maildir and now it delivered,
 curious!

 Its like it didnt understand the mailbox type or something?

So I switched mysql back to sending full path for home, and
maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap
works just fine, it seems like just lda doesnt understand the returned
mail field


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
 So I switched mysql back to sending full path for home, and
 maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap
 works just fine, it seems like just lda doesnt understand the returned
 mail field

I meant maildir:~/maildir and mdbox:~/mdbox for *mail* field not home


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 12:47 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 20.40, Brandon Lamb wrote:

 So I switched mysql back to sending full path for home, and
 maildir:~/maildir and mdbox:~/mdbox for my two test accounts. Imap
 works just fine, it seems like just lda doesnt understand the returned
 mail field

 What does lda log with mail_debug=yes and auth_debug=yes?


Nothing, thats why Im scratching my head... If I return
maildir:~/maildir or maildir:~/fullpath NOTHING is logged, but
exim logs the error about no file or directory. But if I return just
fullpath for mail, then it delivers mail AND logs debugging. seems
like maybe it bails out before writing a log or something.


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 1:02 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 In my exim log i just see these
 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index

 Actually, there is no such error message in Dovecot code. It's exim that logs 
 this error..

Right but that means exim is talking to dovecot-lda because it is
getting the maildir:~/maildir value, no way exim could no that unless
dovecot told it. So then there SHOULD be a log in debug or deliver
from lda if exim got that showing *something* right?


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 1:33 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 21.28, Brandon Lamb wrote:

 On Sun, Jul 18, 2010 at 1:02 PM, Timo Sirainen t...@iki.fi wrote:
 On 18.7.2010, at 19.57, Brandon Lamb wrote:

 In my exim log i just see these
 2010-07-18 11:51:08 1OaYOJ-0003Vn-2P == bran...@olypen.com
 R=router_pop T=dovecot_deliver defer (2): No such file or directory:
 failed to chdir to maildir:~/maildir:INDEX=~/maildir/dovecot-index

 Actually, there is no such error message in Dovecot code. It's exim that 
 logs this error..

 Right but that means exim is talking to dovecot-lda because it is
 getting the maildir:~/maildir value, no way exim could no that unless
 dovecot told it. So then there SHOULD be a log in debug or deliver
 from lda if exim got that showing *something* right?

 Or is it possible that Exim looks up mail field as a home directory from the 
 database? I think this error happens before dovecot-lda is even run (it's 
 chdiring before running it).

But I thought exim just pipes the mail to dovecot-lda and then
dovecot-lda looks up the user info, home and mail location and
actually writes the file, exim doesnt do any database lookups or am I
totally in the dark?

OH! Well damn, look I have a router_home_directory, so... hm, do I
assume exim passes this to dovecot-lda somehow as an environment
variable or something?

I swear I looked at this like 50 times last night...

router_pop:
debug_print= R: dovecot_deliver for $local_p...@$domain
driver = accept
transport = dovecot_deliver
local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN
(SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username =
'${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('',
'${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') )
AND SQL_POP.status != 'disabled'
router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir
FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id =
SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND
domain = '${quote_mysql:$domain}' LIMIT 1}}
user = 8
group = 8


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
 Or is it possible that Exim looks up mail field as a home directory from the 
 database? I think this error happens before dovecot-lda is even run (it's 
 chdiring before running it).

 But I thought exim just pipes the mail to dovecot-lda and then
 dovecot-lda looks up the user info, home and mail location and
 actually writes the file, exim doesnt do any database lookups or am I
 totally in the dark?

 OH! Well damn, look I have a router_home_directory, so... hm, do I
 assume exim passes this to dovecot-lda somehow as an environment
 variable or something?

 I swear I looked at this like 50 times last night...

 router_pop:
    debug_print= R: dovecot_deliver for $local_p...@$domain
    driver = accept
    transport = dovecot_deliver
    local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN
 (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username =
 '${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('',
 '${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') )
 AND SQL_POP.status != 'disabled'
    router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir
 FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id =
 SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND
 domain = '${quote_mysql:$domain}' LIMIT 1}}
    user = 8
    group = 8

Look its MAGIC! Removed the route_home_directory line and BAM! I have
my mail! Dood you rock! I seriously need to buy one of those dinner
bells to ring at work for stuff like this that has been a 5 hour
struggle =P


Re: [Dovecot] Arghh, dovecot-2 and lda

2010-07-18 Thread Brandon Lamb
On Sun, Jul 18, 2010 at 1:40 PM, Brandon Lamb brandonl...@gmail.com wrote:
 Or is it possible that Exim looks up mail field as a home directory from 
 the database? I think this error happens before dovecot-lda is even run 
 (it's chdiring before running it).

 But I thought exim just pipes the mail to dovecot-lda and then
 dovecot-lda looks up the user info, home and mail location and
 actually writes the file, exim doesnt do any database lookups or am I
 totally in the dark?

 OH! Well damn, look I have a router_home_directory, so... hm, do I
 assume exim passes this to dovecot-lda somehow as an environment
 variable or something?

 I swear I looked at this like 50 times last night...

 router_pop:
    debug_print= R: dovecot_deliver for $local_p...@$domain
    driver = accept
    transport = dovecot_deliver
    local_parts = mysql; SELECT username FROM SQL_AUTH LEFT JOIN
 (SQL_POP) ON (SQL_POP.user_id = SQL_AUTH.user_id) WHERE username =
 '${quote_mysql:$local_part}' AND domain = (SELECT IF( STRCMP('',
 '${quote_mysql:$domain}'), '${quote_mysql:$domain}', 'olypen.com') )
 AND SQL_POP.status != 'disabled'
    router_home_directory = ${lookup mysql {SELECT SQL_POP.maildir
 FROM SQL_AUTH LEFT JOIN (SQL_POP) ON (SQL_POP.user_id =
 SQL_AUTH.user_id) WHERE username = '${quote_mysql:$local_part}' AND
 domain = '${quote_mysql:$domain}' LIMIT 1}}
    user = 8
    group = 8

 Look its MAGIC! Removed the route_home_directory line and BAM! I have
 my mail! Dood you rock! I seriously need to buy one of those dinner
 bells to ring at work for stuff like this that has been a 5 hour
 struggle =P

You may want to add some hint about this on the wiki, something to the
effect of watching whether your router passes a home directory if you
are expecting the userdb field to be used, etc


Re: [Dovecot] mdbox expunge purge question

2010-07-17 Thread Brandon Lamb
On Sat, Jul 17, 2010 at 6:29 AM, Daniel Luttermann dan...@dlutt.de wrote:
 Hi,

 I'm testing Dovecot 2.0rc2 with mdbox mail format and I'm not sure
 what this exactly means:

 http://wiki2.dovecot.org/MailboxFormat/dbox

 Quote from wiki page:

 =
 Expunging a message only decreases the message's refcount. The space
 is later freed in purge step. This may be done automatically within
 the session or later in a nightly cronjob when there's less disk I/O.
 =

 So this means that even if a user deletes a mail the space gets only
 freed if I run doveadm purge manually or an user requests this over
 his mail client?

 When the expunge plugin is used the deleted mails are stored in a
 special mailbox in the users mailbox so it's needed to use the expire
 plugin too if this should be done automatically?

 Is it recommend to run doveadm purge periodically if mdbox is used?

 Btw: when I try to run

 doveadm -Dv expunge -u testu...@dlutt.de mailbox Trash savedbefore 30d

 for example I get such an error:

 doveadm(root): Debug: Loading modules from directory: /usr/lib/dovecot/modules
 doveadm(root): Debug: Module loaded: 
 /usr/lib/dovecot/modules/lib01_acl_plugin.so
 doveadm(root): Debug: Loading modules from directory: 
 /usr/lib/dovecot/modules/doveadm
 doveadm(root): Error: 
 dlopen(/usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so) 
 failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: 
 undefined symbol: expire_set_lookup
 doveadm(root): Error: 
 dlopen(/usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so) 
 failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: 
 undefined symbol: quota_user_module

 Plugin expire or expunge is not currently enabled in Dovecot's config.

 Thanks for any hints.

 Daniel

I was curious about that as well but had already posted a million
questions yesterday =P

What is the default mailbox file size (the m* files?), what actually
happens when a message is delivered, when is a new file created, when
a user deletes a single mail what happens, or if they delete multiple
mails, if a users client does the move to trash then mark as deleted
then purge, what happens inside? There was mention of no file
truncating, so does that mean if a user deletes mails, and they are in
3 different mail storage files, that those messages are written to 3
new (or existing with free space?) mail storage files and the old ones
just sit around using space?

And if you never run a purge or expunge script, will your data store
just keep growing, is there no self cleanup? With maildir, you delete
a message and the file goes away.

I guess if someone had time to write a slightly more detailed
explanation of how mdbox works than what is on the wiki that would be
cool. Also maybe a if you run mdbox, you are going to want to know
this and that, and do this and this and this


Re: [Dovecot] mdbox expunge purge question

2010-07-17 Thread Brandon Lamb
On Sat, Jul 17, 2010 at 11:19 AM, Timo Sirainen t...@iki.fi wrote:
 On 17.7.2010, at 18.55, Brandon Lamb wrote:

 What is the default mailbox file size (the m* files?),

 mdbox_rotate_size = 2M

 what actually
 happens when a message is delivered, when is a new file created,

 It tries to find an existing file to append to, and creates a new one if it 
 can't. The details of this aren't really perfect yet and the code should be 
 rewritten.

 when a user deletes a single mail what happens, or if they delete multiple
 mails,

 A few bytes are written to index files.

 if a users client does the move to trash then mark as deleted
 then purge, what happens inside?

 That's a COPY + delete. Same as above.

 There was mention of no file
 truncating, so does that mean if a user deletes mails, and they are in
 3 different mail storage files, that those messages are written to 3
 new (or existing with free space?) mail storage files and the old ones
 just sit around using space?

 doveadm purge goes through all files that have expunged messages. It writes 
 them to other files the exactly the same way as any other new messages are 
 written (so they can be written to other existing files). After it's finished 
 writing them, the old files are deleted.

 And if you never run a purge or expunge script, will your data store
 just keep growing, is there no self cleanup? With maildir, you delete
 a message and the file goes away.

 There is currently no self cleanup. There used to be for a while, but its 
 performance sucked.

 I guess if someone had time to write a slightly more detailed
 explanation of how mdbox works than what is on the wiki that would be
 cool.

 Maybe some day :)

 Also maybe a if you run mdbox, you are going to want to know
 this and that, and do this and this and this

 Purging is pretty much the only important part. Then there are the couple of 
 mdbox_* settings.

Great info thanks, I think that actually answered everything I had
questions about!


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-17 Thread Brandon Lamb
On Sat, Jul 17, 2010 at 11:03 AM, Timo Sirainen t...@iki.fi wrote:
 On 17.7.2010, at 4.46, Brandon Lamb wrote:

 Ok I got all migrated over to dovecot2 configuration, and started to
 dive into this converting business... one thing I immediately fell
 into is that the wiki doesnt say anything about namespace issues. I
 return maildir:~/maildir in my current setup via prefetch/sql, and I
 got errors trying to do

 dsync -u bran...@olypen.com mirror mdbox:~/mdbox

 What errors did you get?

 Do I need some special namespace configuation/setup?

 No..

 I think I may have got it, I added the following to my 10-mail.conf

 # maildir
 namespace {
    type = private
    separator = /
    prefix =
 #   location = maildir:~/maildir
    inbox = yes
    hidden = no
 }

 # mdbox
 namespace {
    type = private
    separator = /
    prefix = #mdbox/
    location = mdbox:~/mdbox
    inbox = no
    hidden = no
 }

 This shouldn't be necessary.


Without any namespaces it told me that I had to define the heirarchy
separator. Then I added the namespaces initially with both of them
specifying a location. But then when I tried to run dsync again, it
told me the namespace of the one to be mirrored should have no
location so I had to remove that. Then it worked.

I just wiped out and rebuilt my raid on my second box im working on so
once thats back and i restore my base maildir i'll run it again to get
the actual error output =P


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-17 Thread Brandon Lamb
On Sat, Jul 17, 2010 at 1:09 PM, Timo Sirainen t...@iki.fi wrote:
 On 17.7.2010, at 20.39, Brandon Lamb wrote:

 Without any namespaces it told me that I had to define the heirarchy
 separator.

 Yes, that you need to set. But you need only one namespace.

Oh! I'll try that instead soon thanks!


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-17 Thread Brandon Lamb
On Sat, Jul 17, 2010 at 1:10 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Sat, Jul 17, 2010 at 1:09 PM, Timo Sirainen t...@iki.fi wrote:
 On 17.7.2010, at 20.39, Brandon Lamb wrote:

 Without any namespaces it told me that I had to define the heirarchy
 separator.

 Yes, that you need to set. But you need only one namespace.

 Oh! I'll try that instead soon thanks!

So I had another thought, if I have a user that has 500 megs of mail
but its mostly large attachments, with the default mailfile size at 2
megs this means a 25 meg attachment is going to have to write to and
read from 13 files every time? And if so I guess this is just a
tradeoff of the usual case of mails being 100k so fitting lots into
the 2m files?


[Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-16 Thread Brandon Lamb
Hello,

So ive spent the last 45 minutes or so searching the list for dbox
stuff, but Im not seeing anything real definitive.

My question is basically whether the dbox format is ready for
production environment, is sdbox or mdbox more stable/ready than the
other or does it matter? What are people's experience/review with
running this format (and if you reply can you tell me which one you're
using).

Is there any docs/wiki page for migrating from maildir - dbox?
Searching for dbox on the wiki only returns two results, and only
one is actually for dbox.

What I have (maildir format) is working, but who doesnt like shiny new toys? =P

I have ~450gigs / 14k pop accounts I would have to migrate. Oh thats
another question, I have seen hybrid throw around, can I take this
to mean dbox/mdbox/both support both formats, maybe only new mail goes
into the dbox stuff? And if so (or even if not) is there any way to
actually convert from maildir to dbox?

If anyone has any links that I cant seem to find by consulting the
oracle (google) that would be fantastic

=)


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-16 Thread Brandon Lamb
On Fri, Jul 16, 2010 at 2:19 PM, Brandon Lamb brandonl...@gmail.com wrote:
 Hello,

 So ive spent the last 45 minutes or so searching the list for dbox
 stuff, but Im not seeing anything real definitive.

 My question is basically whether the dbox format is ready for
 production environment, is sdbox or mdbox more stable/ready than the
 other or does it matter? What are people's experience/review with
 running this format (and if you reply can you tell me which one you're
 using).

 Is there any docs/wiki page for migrating from maildir - dbox?
 Searching for dbox on the wiki only returns two results, and only
 one is actually for dbox.

 What I have (maildir format) is working, but who doesnt like shiny new toys? 
 =P

 I have ~450gigs / 14k pop accounts I would have to migrate. Oh thats
 another question, I have seen hybrid throw around, can I take this
 to mean dbox/mdbox/both support both formats, maybe only new mail goes
 into the dbox stuff? And if so (or even if not) is there any way to
 actually convert from maildir to dbox?

 If anyone has any links that I cant seem to find by consulting the
 oracle (google) that would be fantastic

 =)

Another question, if there is such a conversion tool, does it break
UIDLs and require pop3 clients to redownload messages?


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-16 Thread Brandon Lamb
On Fri, Jul 16, 2010 at 2:31 PM, Timo Sirainen t...@iki.fi wrote:
 On 16.7.2010, at 22.19, Brandon Lamb wrote:

 My question is basically whether the dbox format is ready for
 production environment, is sdbox or mdbox more stable/ready than the
 other or does it matter? What are people's experience/review with
 running this format (and if you reply can you tell me which one you're
 using).

 sdbox is really simple. mdbox is more complex. A few people have used sdbox 
 with v1.x, but it's more or less rewritten with v2.0. With v2.0 I'm not aware 
 of any sdbox installations, but there is at least one somewhat large mdbox 
 installation. They've had some problems, but I think those are mostly gone 
 now.

Any recommendation of one over the other? I came across a 2009 mailing
list entry where you showed some benchmark tests that had mdbox as the
fastest. Without any experience yet, my only possible hangup is being
able to restore individual (lost, whatever other reason) mails for
customers. Doesnt really happen but being able to restore individual
versus their whole mailbox is nice, but it happens so rarely it may be
a non issue.

 Is there any docs/wiki page for migrating from maildir - dbox?

 dsync migrates between any two mailbox formats and does it as perfectly as it 
 can. http://wiki2.dovecot.org/Tools/Dsync

Awesome, I'll go do some reading and mess with that

 I have ~450gigs / 14k pop accounts I would have to migrate. Oh thats
 another question, I have seen hybrid throw around, can I take this
 to mean dbox/mdbox/both support both formats, maybe only new mail goes
 into the dbox stuff? And if so (or even if not) is there any way to
 actually convert from maildir to dbox?

 v1.x had some kind of a maildir/dbox hybrid.. until I realized it was just a 
 bad idea. You can have per-user mail location defined in userdb though, so 
 you can convert users a few at a time.

 Another question, if there is such a conversion tool, does it break
 UIDLs and require pop3 clients to redownload messages?

 dsync is awesome and preserves everything. But test it anyway just in case. 
 I'd anyway recommend setting pop3_save_uidl=yes and sometimes after that 
 (when you think everyone's logged in at least once) switching to 
 pop3_uidl_format=%g while still running maildir. With Maildir the new UIDLs 
 are then the filenames and with dbox the UIDLs will be message GUIDs. Those 
 are much more permanent than anything based on IMAP UIDs. Not a requirement, 
 but still :)

Cool, if anything I could just have a script login to every users
account and logout and that would do the same thing right? Or does it
have to perform some kind of list or other action?

Any main/major/big reasons to try to go with mdbox over sdbox? sdbox
being really simple = less prone to typos and other bad things
happening?

Oh, what about if i migrate to sdbox, then decide to go with mdbox,
will I want to know for sure ahead of time? Granted I guess thats kind
of an obvious yes, but any big gotchas to know about if I did?

Oh yea and dovecot kicks ass btw =P


[Dovecot] dovecot 2.0 (latest on website), client workarounds?

2010-07-16 Thread Brandon Lamb
What are the current valid imap_client_workarounds and
pop3_client_workarounds? I had a tb-folder one, and outlook-idle i
imap, and i kept getting errors. The only one that would seem to not
give an error was

imap.conf:  imap_client_workarounds = delay-newmail
pop3.conf:  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh


Re: [Dovecot] Questions about dbox (sdbox?), mdbox

2010-07-16 Thread Brandon Lamb
On Fri, Jul 16, 2010 at 8:34 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Fri, Jul 16, 2010 at 4:07 PM, Brandon Lamb brandonl...@gmail.com wrote:
 On Fri, Jul 16, 2010 at 2:31 PM, Timo Sirainen t...@iki.fi wrote:
 On 16.7.2010, at 22.19, Brandon Lamb wrote:

 My question is basically whether the dbox format is ready for
 production environment, is sdbox or mdbox more stable/ready than the
 other or does it matter? What are people's experience/review with
 running this format (and if you reply can you tell me which one you're
 using).

 sdbox is really simple. mdbox is more complex. A few people have used sdbox 
 with v1.x, but it's more or less rewritten with v2.0. With v2.0 I'm not 
 aware of any sdbox installations, but there is at least one somewhat large 
 mdbox installation. They've had some problems, but I think those are mostly 
 gone now.

 Any recommendation of one over the other? I came across a 2009 mailing
 list entry where you showed some benchmark tests that had mdbox as the
 fastest. Without any experience yet, my only possible hangup is being
 able to restore individual (lost, whatever other reason) mails for
 customers. Doesnt really happen but being able to restore individual
 versus their whole mailbox is nice, but it happens so rarely it may be
 a non issue.

 Is there any docs/wiki page for migrating from maildir - dbox?

 dsync migrates between any two mailbox formats and does it as perfectly as 
 it can. http://wiki2.dovecot.org/Tools/Dsync

 Awesome, I'll go do some reading and mess with that

 I have ~450gigs / 14k pop accounts I would have to migrate. Oh thats
 another question, I have seen hybrid throw around, can I take this
 to mean dbox/mdbox/both support both formats, maybe only new mail goes
 into the dbox stuff? And if so (or even if not) is there any way to
 actually convert from maildir to dbox?

 v1.x had some kind of a maildir/dbox hybrid.. until I realized it was just 
 a bad idea. You can have per-user mail location defined in userdb though, 
 so you can convert users a few at a time.

 Another question, if there is such a conversion tool, does it break
 UIDLs and require pop3 clients to redownload messages?

 dsync is awesome and preserves everything. But test it anyway just in case. 
 I'd anyway recommend setting pop3_save_uidl=yes and sometimes after that 
 (when you think everyone's logged in at least once) switching to 
 pop3_uidl_format=%g while still running maildir. With Maildir the new UIDLs 
 are then the filenames and with dbox the UIDLs will be message GUIDs. Those 
 are much more permanent than anything based on IMAP UIDs. Not a 
 requirement, but still :)

 Cool, if anything I could just have a script login to every users
 account and logout and that would do the same thing right? Or does it
 have to perform some kind of list or other action?

 Any main/major/big reasons to try to go with mdbox over sdbox? sdbox
 being really simple = less prone to typos and other bad things
 happening?

 Oh, what about if i migrate to sdbox, then decide to go with mdbox,
 will I want to know for sure ahead of time? Granted I guess thats kind
 of an obvious yes, but any big gotchas to know about if I did?

 Oh yea and dovecot kicks ass btw =P

 Ok I got all migrated over to dovecot2 configuration, and started to
 dive into this converting business... one thing I immediately fell
 into is that the wiki doesnt say anything about namespace issues. I
 return maildir:~/maildir in my current setup via prefetch/sql, and I
 got errors trying to do

 dsync -u bran...@olypen.com mirror mdbox:~/mdbox

 Do I need some special namespace configuation/setup?


I think I may have got it, I added the following to my 10-mail.conf

# maildir
namespace {
type = private
separator = /
prefix =
#   location = maildir:~/maildir
inbox = yes
hidden = no
}

# mdbox
namespace {
type = private
separator = /
prefix = #mdbox/
location = mdbox:~/mdbox
inbox = no
hidden = no
}


Re: [Dovecot] Best location for indexes?

2010-05-11 Thread Brandon Lamb
On Mon, May 10, 2010 at 11:21 PM, Curtis Maloney cmalo...@cardgate.net wrote:
 On 05/11/10 16:05, Brandon Lamb wrote:

 I cant seem to find anything via a google search, so if this has been
 answered I apologize.

 I am wondering if INDEX=MEMORY is going to give the best performance
 versus files? I have a server with directly attached storage, 8 gigs
 of ram, about 500 gigs of data.

 I am ok with losing and having to rebuild the indexes on a reboot as
 the last uptime was over 200 days

 Last I checked, INDEX=MEMORY rebuilds the index on demand, on each
 _connection_.

 Your best bet is to keep the indices on disk.  Certainly, if you can keep
 them on a separate spindle from the mail store, you may find a performance
 improvement through parallelism and lack of seek clash.

 --
 Curtis Maloney

Oh damnit haha. I thought it saved it in memory like a ramdisk or some
kind of implementation like that, not only the duration of a
connection =\

Back to disk then!

Thanks! =)


Re: [Dovecot] Dovecot 2.0b4 configuration issue, listen config option?

2010-04-14 Thread Brandon Lamb
On Tue, Apr 13, 2010 at 10:36 PM, Andreas Schulze
andreas.schu...@datev.de wrote:
 Am 13.04.2010 22:23 schrieb Brandon Lamb:
 Hi,

 In my 1.2 setup I have pop3 running on ip x.x.x.2 and imap on x.x.x.7

 In 2.0 how do I say listen x.x.x.2:110 x.x.x.7:143 so that pop3 is not
 listening on the .7 ip? I tried putting a listen = ip in the listener
 section but it complained. I cant figure it out and cant seem to find
 any 2.0 specific documentation, trying to search in the wiki directory
 of /usr/local/share/doc/dovecot/wiki but so far no help.

 I realize I can firewall that off but I dont want to rely on that. Is
 this no longer possible?

 that works for me:

 service imap-login {
  inet_listener imap {
    address = imap01.t6-isa.de
  }
  inet_listener imaps {
    address = imap01.t6-isa.de
  }
 }

 service pop3-login {
  inet_listener pop3 {
    address = pop01.t6-isa.de
  }
  inet_listener pop3s {
    address = pop01.t6-isa.de
  }
 }
 an in case you like different certs:

 protocol imap {
  ssl = yes
  ssl_cert = /etc/ssl/imap01.t6-isa.de/cert+root.pem
  ssl_key = /etc/ssl/private/imap01.t6-isa.de-key.pem
 }

 protocol pop3 {
  ssl = yes
  ssl_cert = /etc/ssl/pop01.t6-isa.de/cert+root.pem
  ssl_key = /etc/ssl/private/pop01.t6-isa.de-key.pem
 }



 --
 Andreas Schulze
 Internetdienste | P532

 DATEV eG
 90329 Nürnberg | Telefon +49 911 319-0 | Telefax +49 911 319-3196
 E-Mail info @datev.de | Internet www.datev.de
 Sitz: 90429 Nürnberg, Paumgartnerstr. 6-14 | Registergericht Nürnberg, GenReg 
 Nr.70
 Vorstand
 Prof. Dieter Kempf (Vorsitzender)
 Dipl.-Kfm. Wolfgang Stegmann (stellvertretender Vorsitzender)
 Dipl.-Kfm. Michael Leistenschneider
 Jörg Rabe v. Pappenheim
 Dipl.-Vw. Eckhard Schwarzer
 Vorsitzender des Aufsichtsrates: Reinhard Verholen


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

 iJwEAQECAAYFAkvFVFgACgkQGXQ4Obkc43nWJwP9HOZ/A3q6SKIJKQL23we7KwVG
 hwmxiT6ayhy73s6oE5VKCSwSdNH452FPbQsB+Qg3lEvdmX7MhKDbNIc2N2qEGCPS
 CmED/q7V6ppQPaPeBw4tdfOMlCJ0EEsmYWFrIyakyQiRcDbLDsK/3D5VnAdLLxCS
 a5tXfsTxT1ZqZKvPv8w=
 =yx2R
 -END PGP SIGNATURE-

O address, very good thank you!!


Re: [Dovecot] Dovecot 2.0b4 configuration issue, listen config option?

2010-04-14 Thread Brandon Lamb
On Wed, Apr 14, 2010 at 5:27 AM, Timo Sirainen t...@iki.fi wrote:
 On Tue, 2010-04-13 at 22:23 -0700, Brandon Lamb wrote:
 Hi,

 In my 1.2 setup I have pop3 running on ip x.x.x.2 and imap on x.x.x.7

 In 2.0 how do I say listen x.x.x.2:110 x.x.x.7:143 so that pop3 is not
 listening on the .7 ip?

 Did you try simply doing it the exact same way as with v1.2? It should
 have logged a few obsolete setting warnings, suggested how to change
 the config to new format, and finally just worked (and doveconf would
 have outputted the new format). If it didn't do that, send me your
 config and I'll fix it.

No I have been trying to not use the old config options, figure I
might as well learn how to use the new stuff if this is the new thing.


[Dovecot] Any secret dovecot 2.0 lda configuration documentation anywhere? =)

2010-04-14 Thread Brandon Lamb
I successfully got imap/pop3 working using 2.0b4, now im trying to
also get lda working with exim but im totally confused. I dont know
what should run as what user, getting confused on auth sockets, what
to call them or set or whatever.

My exim runs as user/group mail/mail, dovecot has user dovecot but
user mail for mail_user/group settings.

At one point running deliver -d user -f user gave me an error userdb
lookup not possible with only userdb prefetch.

Here is my config at this particular point in time, probably will be
hacked up again in a few seconds =P

# 2.0.beta4: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-3-amd64 x86_64 Debian squeeze/sid
auth_cache_negative_ttl = 3600 s
auth_cache_size = 4096
auth_debug = yes
auth_debug_passwords = yes
auth_default_realm = olypen.com
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
auth_username_format = %Lu
auth_worker_max_count = 60
base_dir = /var/run/dovecot
debug_log_path = /var/log/dovecot/debug.log
default_vsz_limit = 536870912
deliver_log_format = %s from %f %$
disable_plaintext_auth = no
dotlock_use_excl = yes
first_valid_gid = 8
first_valid_uid = 8
fsync_disable = yes
info_log_path = /var/log/dovecot/info.log
last_valid_gid = 8
last_valid_uid = 8
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot/dovecot.log
log_timestamp = %Y-%m-%d %H:%M:%S
login_log_format = %s
login_log_format_elements = (%u) (%r)
mail_access_groups = mail
mail_debug = yes
mail_gid = 8
mail_location = maildir:~/:INDEX=~/dovecot-index
mail_log_prefix = %Ls %u:
mail_plugins = quota
mail_privileged_group = mail
mail_uid = 8
mailbox_idle_check_interval = 60 s
namespace {
  hidden = yes
  inbox = yes
  list = yes
  location = maildir:%h/:INDEX=~/dovecot-index
  prefix =
  separator = /
  type = private
}
namespace {
  hidden = yes
  list = no
  location = virtual:/etc/dovecot/virtual:INDEX=~/dovecot-index
  prefix = virtual/
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  autocreate = Trash
  autocreate2 = Spam
  autocreate3 = Sent
  autocreate4 = Drafts
  quota = maildir
  quota_rule2 = Trash:ignore
  quota_rule3 = Deleted Items:ignore
  quota_rule4 = Spam:ignore
  quota_warning = storage=95%% /etc/dovecot/quota-warning.sh 95
  quota_warning2 = storage=80%% /etc/dovecot/quota-warning.sh 80
}
postmaster_address = postmas...@olypen.com
protocols = imap pop3
quota_full_tempfail = yes
rejection_reason = Your message to %t with subject of %s was
automatically rejected:%n%r
rejection_subject = Mailbox Full: %s
sendmail_path = /usr/sbin/exim
service auth {
  unix_listener /var/spool/exim/auth-userdb {
group = mail
mode = 0666
user =
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  process_min_avail = 5
  service_count = 0
  vsz_limit = 134217728
}
service imap {
  process_limit = 1024
  vsz_limit = 1073741824
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  process_min_avail = 5
  service_count = 0
  vsz_limit = 134217728
}
service pop3 {
  process_limit = 1024
  vsz_limit = 1073741824
}
ssl = no
userdb {
  driver = prefetch
}
valid_chroot_dirs = /mail
verbose_proctitle = yes
protocol pop3 {
  mail_max_userip_connections = 1
  mail_plugins = $mail_plugins virtual
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_enable_last = no
  pop3_lock_session = no
  pop3_logout_format = retr=%r/%b, del=%d/%m, size=%s
  pop3_no_flag_updates = yes
  pop3_reuse_xuidl = no
  pop3_save_uidl = yes
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  auth_socket_path = auth-master
  info_log_path = /var/log/dovecot/deliver.log
  log_path = /var/log/dovecot/deliver.log
  mail_plugins = quota
}
protocol imap {
  imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
  imap_idle_notify_interval = 120 s
  imap_logout_format = bytes=%i/%o
  imap_max_line_length = 65536
  mail_max_userip_connections = 15
  mail_plugins = $mail_plugins imap_quota autocreate virtual
}


[Dovecot] Dovecot 2.0b4 configuration issue, listen config option?

2010-04-13 Thread Brandon Lamb
Hi,

In my 1.2 setup I have pop3 running on ip x.x.x.2 and imap on x.x.x.7

In 2.0 how do I say listen x.x.x.2:110 x.x.x.7:143 so that pop3 is not
listening on the .7 ip? I tried putting a listen = ip in the listener
section but it complained. I cant figure it out and cant seem to find
any 2.0 specific documentation, trying to search in the wiki directory
of /usr/local/share/doc/dovecot/wiki but so far no help.

I realize I can firewall that off but I dont want to rely on that. Is
this no longer possible?


Re: [Dovecot] Dovecot blog

2010-02-19 Thread Brandon Lamb
On Fri, Feb 19, 2010 at 8:14 AM, Charles Marcus
cmar...@media-brokers.com wrote:
 On 2010-02-19 9:20 AM, Timo Sirainen wrote:
 http://blog.dovecot.org/

 I was thinking that I could blog about:

 I for one will most likely enjoy reading whatever you deem worthy of
 blogging about. Thanks Timo!

 --

 Best regards,

 Charles

Now where is the Like button to this thread


Re: [Dovecot] GlusterFs - Any new progress reports?

2010-02-18 Thread Brandon Lamb
On Wed, Feb 17, 2010 at 11:55 AM, Steve stev...@gmx.net wrote:

  Original-Nachricht 
 Datum: Wed, 17 Feb 2010 20:15:30 +0100
 Von: alex handle alex.han...@gmail.com
 An: Dovecot Mailing List dovecot@dovecot.org
 Betreff: Re: [Dovecot] GlusterFs - Any new progress reports?

 
  Anyone had success using some other clustered/HA filestore with dovecot
 who
  can share their experience? (OCFS/GFS over DRBD, etc?)
 
  My interest is more in bootstrapping a more highly available system from
  lower quality (commodity) components than very high end use

 we use drbd with ext3 in a active/passive setup for more than 1
 mailboxes.
 works like a charm!

 I'm not really trusting cluster filesystems and most cluster
 filesystems are not made for small
 files.

 I use GlusterFS with Dovecot and it works without issues. The GlusterFS team 
 has made huge progress since 2.0 and with the new 3.0 version they have again 
 proved that GlusterFS can get better.


 Alex

 Steve

Hi Steve,

I was wondering if perhaps I might snag a copy of your glusterfs
server/client configs to see what you are doing? I am interested in
using it in our mail setup, but last I tried a little over a month ago
I got a bunch of corrupted mails, so far I am only using for a web
cluster and that seems to be working but different use case I guess.

Thanks!

Brandon


[Dovecot] Recommended method?

2010-01-27 Thread Brandon Lamb
Hopefully this isnt TOO general of a question.

I have a raid server that runs dovecot and exports via nfs the maildir
format store.
I have 4 mail servers running exim that use dovecot to deliver over nfs

I have been examing our entire setup and had the thought, would it be
recommended to instead have another exim process running directly on
the raid server and have my mail servers deliver mail to that rather
than over nfs, if that makes sense?

So mail would go from our postini frontend = mail cluster = final
delivery via exim on raid server.

Seems like this way I could make all the nfs config options go away and such.

Thoughts?


Re: [Dovecot] Recommended method?

2010-01-27 Thread Brandon Lamb
On Wed, Jan 27, 2010 at 5:07 PM, Timo Sirainen t...@iki.fi wrote:
 On 28.1.2010, at 2.37, Brandon Lamb wrote:

 Hopefully this isnt TOO general of a question.

 I have a raid server that runs dovecot and exports via nfs the maildir
 format store.
 I have 4 mail servers running exim that use dovecot to deliver over nfs

 What about your Dovecot servers, how many of them do you have?

 I have been examing our entire setup and had the thought, would it be
 recommended to instead have another exim process running directly on
 the raid server and have my mail servers deliver mail to that rather
 than over nfs, if that makes sense?

 So mail would go from our postini frontend = mail cluster = final
 delivery via exim on raid server.

 Seems like this way I could make all the nfs config options go away and such.

 The problems with NFS go away if user's mails are never concurrently accessed 
 by more than one server. It doesn't matter if the other server is another NFS 
 client or the NFS server itself.

 So if you have a single Dovecot IMAP/POP server, the only way to avoid NFS 
 issues is by having that same server also deliver the mails.

Thats what I am thinking. I run the single imap/pop dovecot server
directly on the raid, been working fantastic for us with some 16k pop
accounts, 450gigs or so.

Now I am thinking of taking that same thinking and getting rid of the
deliver over nfs and deliver directly to the raid server like you
said.


[Dovecot] Virtual mailbox plugin, crashing?

2009-05-10 Thread Brandon Lamb
Hello,

Using virtual mailbox plugin and all of a sudden started getting
these. Deleted the indexes from ~/Maildir/virtual/Inboxmail and all
was good again.

dovecot: 2009-05-10 10:05:44 Error: child 26607 (imap) killed with
signal 11 (core dumps disabled)

Inboxmail/dovecot-virtual:
virtual/All
  inthread refs x-mailbox INBOX

All/dovecot-virtual:
*
-Archive/
-Drafts/
-Trash/
-Trash/*
-Deleted*
-Junk*
-Spam/
-Sent*
  all

I have had this happen 2 or 3 times now, I thought maybe the first
couple were flukes from messing with the dovecot-virtual files, then
sometime between last night and now this started to give those errors.
I am taking a guess that is it is some kind of indexing issue since
just deleting those seems to fix it. Not sure what other info I could
send, turning mail_debug = yes didnt give any useful info in
dovecot.log


Re: [Dovecot] Virtual mailbox plugin, crashing?

2009-05-10 Thread Brandon Lamb
On Sun, May 10, 2009 at 10:11 AM, Brandon Lamb brandonl...@gmail.com wrote:
 Hello,

 Using virtual mailbox plugin and all of a sudden started getting
 these. Deleted the indexes from ~/Maildir/virtual/Inboxmail and all
 was good again.

 dovecot: 2009-05-10 10:05:44 Error: child 26607 (imap) killed with
 signal 11 (core dumps disabled)

 Inboxmail/dovecot-virtual:
 virtual/All
  inthread refs x-mailbox INBOX

 All/dovecot-virtual:
 *
 -Archive/
 -Drafts/
 -Trash/
 -Trash/*
 -Deleted*
 -Junk*
 -Spam/
 -Sent*
  all

 I have had this happen 2 or 3 times now, I thought maybe the first
 couple were flukes from messing with the dovecot-virtual files, then
 sometime between last night and now this started to give those errors.
 I am taking a guess that is it is some kind of indexing issue since
 just deleting those seems to fix it. Not sure what other info I could
 send, turning mail_debug = yes didnt give any useful info in
 dovecot.log

Just got this now in dovecot.log

dovecot: 2009-05-10 10:08:05 Panic: imap y...@olypen.com: file
virtual-sync.c: line 575 (virtual_sync_mailbox_box_add): assertion
failed: (src  rec_count)
dovecot: 2009-05-10 10:08:05 Error: imap y...@olypen.com: Raw
backtrace: imap [0x4a3042] - imap [0x4a30c3] - imap [0x4a2796] -
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so [0x7f25e0a5bd14]
- 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x1418)
[0x7f25e0a5d1b8] - imap(mailbox_sync+0x30) [0x46a7c0] -
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0xee7)
[0x7f25e0a5cc87] - imap(mailbox_sync+0x30) [0x46a7c0] -
imap(cmd_select_full+0x383) [0x420613] - imap [0x422d8c] - imap
[0x422e4a] - imap(client_handle_input+0x35) [0x4234b5] -
imap(client_input+0x63) [0x423963] - imap(io_loop_handler_run+0xcb)
[0x4aae9b] - imap(io_loop_run+0x18) [0x4aa328] - imap(main+0x52b)
[0x42b7fb] - /lib/libc.so.6(__libc_start_main+0xe6) [0x7f25e12915a6]
- imap [0x41bcf9]
dovecot: 2009-05-10 10:08:05 Error: child 28046 (imap) killed with
signal 6 (core dumps disabled)
dovecot: 2009-05-10 10:11:55 Panic: imap y...@olypen.com: file
virtual-sync.c: line 575 (virtual_sync_mailbox_box_add): assertion
failed: (src  rec_count)
dovecot: 2009-05-10 10:11:55 Error: imap y...@olypen.com: Raw
backtrace: imap [0x4a3042] - imap [0x4a30c3] - imap [0x4a2796] -
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so [0x7f05f9718d14]
- 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x1418)
[0x7f05f971a1b8] - imap(mailbox_sync+0x30) [0x46a7c0] -
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0xee7)
[0x7f05f9719c87] - imap(mailbox_sync+0x30) [0x46a7c0] -
imap(cmd_select_full+0x383) [0x420613] - imap [0x422d8c] - imap
[0x422e4a] - imap(client_handle_input+0x35) [0x4234b5] -
imap(client_input+0x63) [0x423963] - imap(io_loop_handler_run+0xcb)
[0x4aae9b] - imap(io_loop_run+0x18) [0x4aa328] - imap(main+0x52b)
[0x42b7fb] - /lib/libc.so.6(__libc_start_main+0xe6) [0x7f05f9f4e5a6]
- imap [0x41bcf9]
dovecot: 2009-05-10 10:11:55 Error: child 29696 (imap) killed with
signal 6 (core dumps disabled)


Re: [Dovecot] Some POP3 questions

2009-05-06 Thread Brandon Lamb
On Wed, May 6, 2009 at 5:25 AM, Kenneth Kalmer kenneth.kal...@gmail.com wrote:
 On Tue, May 5, 2009 at 11:39 PM, Timo Sirainen t...@iki.fi wrote:

 On Tue, 2009-05-05 at 23:32 +0200, Kenneth Kalmer wrote:
   * NFS server which is the same server that houses single Courier-IMAP
   installation (Gentoo, 3GB memory)
   * 2x Postfix instances delivering to NFS
  
  
   NFS may be problematic. Dovecot expects a perfectly working NFS setup,
   which seems to be a bit rare to find. http://wiki.dovecot.org/NFS
  
 
  Just for the record, dovecot will be access the mail directly on the
 disks,
  it will be the LDA's on the postfix instances coming in over NFS. I'm
  reading the NFS again to make sure I understand the risks

 If the LDA is Dovecot deliver, it's the same problem since it also
 updates index/control files that cause the problems. But if you're using
 something else that does nothing but write the maildir files, then it's
 fine.


 I'm looking to use the Dovecot LDA so the caches are updated and the
 filenames are correct, to get good POP3 performance.

 I'm looking forward to giving Dovecot a go, but I'll rig up a staging
 environment first.

 Thanks for the encouraging responses everyone.

 Best

 --
 Kenneth Kalmer
 kenneth.kal...@gmail.com
 http://opensourcery.co.za
 @kennethkalmer

I moved from a 4 gig nfs server with eight mailheads running exim as
lda, courier imap/pop3 (over nfs) to an 8 gig nfs server and moved to
dovecot imap/pop3 running directly on the nfs server and dropped to
four mailheads running exim with dovecot lda.

At first I tried to keep my imap/pop3 services running on the 4
mailheads but over nfs had major weird 500 load spikes randomly,
moving these to the nfs server solved all of that. The 4 mailheads
still deliver to maildir over nfs using dovecot as lda. I have been
pleasantly pleased. Our webmail app in our old setup used to take
10-30 seconds to load and now it is instantaneous. Some of it might be
from upgrading hardware, but I definitely had a HUGE noticeable
difference and you couldnt convince me to go back.

We did have about a week of sucktastic traffic and my support
department hating me because all our pop3 leave-messages-on-server
users had to redownload all their mail, but it was worth the headache.
Dovecot is just too sweet, with its performance and plugins to ever
have to even think about a choice between it or software X.

Just my $0.02


Re: [Dovecot] Some POP3 questions

2009-05-06 Thread Brandon Lamb
On Wed, May 6, 2009 at 7:23 AM, Brandon Lamb brandonl...@gmail.com wrote:
 On Wed, May 6, 2009 at 5:25 AM, Kenneth Kalmer kenneth.kal...@gmail.com 
 wrote:
 On Tue, May 5, 2009 at 11:39 PM, Timo Sirainen t...@iki.fi wrote:

 On Tue, 2009-05-05 at 23:32 +0200, Kenneth Kalmer wrote:
   * NFS server which is the same server that houses single Courier-IMAP
   installation (Gentoo, 3GB memory)
   * 2x Postfix instances delivering to NFS
  
  
   NFS may be problematic. Dovecot expects a perfectly working NFS setup,
   which seems to be a bit rare to find. http://wiki.dovecot.org/NFS
  
 
  Just for the record, dovecot will be access the mail directly on the
 disks,
  it will be the LDA's on the postfix instances coming in over NFS. I'm
  reading the NFS again to make sure I understand the risks

 If the LDA is Dovecot deliver, it's the same problem since it also
 updates index/control files that cause the problems. But if you're using
 something else that does nothing but write the maildir files, then it's
 fine.


 I'm looking to use the Dovecot LDA so the caches are updated and the
 filenames are correct, to get good POP3 performance.

 I'm looking forward to giving Dovecot a go, but I'll rig up a staging
 environment first.

 Thanks for the encouraging responses everyone.

 Best

 --
 Kenneth Kalmer
 kenneth.kal...@gmail.com
 http://opensourcery.co.za
 @kennethkalmer

 I moved from a 4 gig nfs server with eight mailheads running exim as
 lda, courier imap/pop3 (over nfs) to an 8 gig nfs server and moved to
 dovecot imap/pop3 running directly on the nfs server and dropped to
 four mailheads running exim with dovecot lda.

 At first I tried to keep my imap/pop3 services running on the 4
 mailheads but over nfs had major weird 500 load spikes randomly,
 moving these to the nfs server solved all of that. The 4 mailheads
 still deliver to maildir over nfs using dovecot as lda. I have been
 pleasantly pleased. Our webmail app in our old setup used to take
 10-30 seconds to load and now it is instantaneous. Some of it might be
 from upgrading hardware, but I definitely had a HUGE noticeable
 difference and you couldnt convince me to go back.

 We did have about a week of sucktastic traffic and my support
 department hating me because all our pop3 leave-messages-on-server
 users had to redownload all their mail, but it was worth the headache.
 Dovecot is just too sweet, with its performance and plugins to ever
 have to even think about a choice between it or software X.

 Just my $0.02

Oh yea, and I just recently discovered the virtual mailbox plugin and
fell even more in love. I am developing a Gmail clone inhouse for our
new webmail (we're an ISP). It is cool plugins like this that make me
glad I switched to Dovecot. Being able to consolidate various Deleted,
Trash, Deleted Items, Deleted Mails folders all into a single
virtual/Trash folder is GREAT.


[Dovecot] Backtrace error

2009-05-05 Thread Brandon Lamb
I noticed i had mail_location wrong, i was specifying
INDEX=/dovecot-index instead of INDEX=~/dovecot-index

so i modifed and restarted dovecot, one of my techs that happens to
have thousands of emails reopened her mail and this showed up in the
log. Not sure if this is critical or if more info/dovecot -n is needed

dovecot: 2009-05-05 14:06:38 Panic: imap REMOVED: file
mail-search.c: line 712 (mail_search_args_equal): assertion failed:
(args1-simplified == args2-simplified)
dovecot: 2009-05-05 14:06:38 Error: imap REMOVED: Raw backtrace:
imap [0x4a3042] - imap [0x4a30c3] - imap [0x4a2796] - imap
[0x467ffa] - imap(mail_thread_init+0xaa) [0x463a5a] -
imap(index_storage_search_init+0x132) [0x45e222] -
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_search_init+0x13)
[0x7fedbd5d1d73] - imap(index_search_result_update_appends+0xac)
[0x4660ec] - 
/usr/local/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x1383)
[0x7fedbd5d5123] - imap(mailbox_sync+0x30) [0x46a7c0] -
imap(cmd_select_full+0x383) [0x420613] - imap [0x422d8c] - imap
[0x422e4a] - imap(client_handle_input+0x35) [0x4234b5] -
imap(client_input+0x63) [0x423963] - imap(io_loop_handler_run+0xcb)
[0x4aae9b] - imap(io_loop_run+0x18) [0x4aa328] - imap(main+0x52b)
[0x42b7fb] - /lib/libc.so.6(__libc_start_main+0xe6) [0x7fedbde095a6]
- imap [0x41bcf9]
dovecot: 2009-05-05 14:06:38 Error: child 18843 (imap) killed with
signal 6 (core dumps disabled)


Re: [Dovecot] Virtual plugin - [SERVERBUG] BUG: Unknown internal error

2009-04-29 Thread Brandon Lamb
On Wed, Apr 29, 2009 at 10:37 AM, Timo Sirainen t...@iki.fi wrote:
 On Mon, 2009-04-27 at 20:05 -0700, Brandon Lamb wrote:
 /etc/dovecot/virtual/Inbox2/dovecot-virtual
 *
 -Trash
 -Trash/*
 -Deleted*
 -Junk*
   inthread x-references2 x-mailbox INBOX

 There's no mo x-references2. It's call refs nowadays.

 Using php to connect o {host}virtual/Inbox2 gives me [SERVERBUG] BUG:
 Unknown internal error. If I connect to virtual/Allmail which has
 all instead of the inthread line it works.

 Fixed: http://hg.dovecot.org/dovecot-1.2/rev/1d21a3d0a295

Aha! inthread refs x-mailbox Mail/ now gives me stuff and no server
bug error. Thanks for the tip. Someone may want to update the virtual
plugin wiki to reflect this since the example uses x-references2


Re: [Dovecot] Virtual plugin - [SERVERBUG] BUG: Unknown internal error

2009-04-29 Thread Brandon Lamb
On Wed, Apr 29, 2009 at 1:36 PM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi Brandon,

 Aha! inthread refs x-mailbox Mail/ now gives me stuff and no server
 bug error. Thanks for the tip. Someone may want to update the virtual
 plugin wiki to reflect this since the example uses x-references2
 feel free to do it yourself, the wiki is editable without registration!

 Gr.

 Matthijs

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

 iD8DBQFJ+LpOz0nQ5oovr7wRAkjAAKCBnkZaQ2rLvbcHuKr67h+uQNUZGgCgw+t6
 0I7414M11JZ9uV6tg9IkwI0=
 =gdOb
 -END PGP SIGNATURE-

Yep I did, i was actually under the assumption that only
timo/contributors actually modified the wiki... guess its true what
happens when i assume

=P


Re: [Dovecot] Virtual mailbox plugin, 4 days of struggling

2009-04-28 Thread Brandon Lamb
On Tue, Apr 28, 2009 at 9:18 AM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi Brandon,

 judging from your other posts, I think you made some progress on this
 already. Nonetheless, I will share my working virtual config here. In
 dovecot.conf I have:

  # Virtual mailboxes
  namespace private {
    #  list = no
    prefix = virtual/
    separator = /
    # Store virtual mailbox in a virtual subdirectory. We use the fs layout,
    # so nesting of mailboxes is done using normal filesystem nesting.
    location = virtual:~/Mail/virtual:LAYOUT=fs
  }

  protocol imap {
    # Enable virtual mailboxes
    mail_plugins = virtual

 Then, in ~/Mail/virtual I have a directory for each virtual mailbox, which
 contains a dovecot-virtual file. For example,
 ~/Mail/virtual/INBOX/dovecot-virtual contains:
  INBOX
  INBOX/Lists
  INBOX/Bulk
  INBOX/MaybeSpam
  Folders/TODO
    all

 (Where INBOX and subfolders refers to the INBOX folder in the default
 namespace, with no prefix, which also has inbox = yes set). This allows me to
 view all my new mail by connecting to imaps://host/virtual/INBOX, and only see
 important mail on my phone by connecting to imaps://host/INBOX, i.e., my real
 inbox).

 I hope this helps a bit,

 Matthijs

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

 iD8DBQFJ9yxIz0nQ5oovr7wRAiAXAKC5zM+YBYNLC8KYS++5boDop98PUACaAo/R
 QQOULoBb4X42R+E6FmQ0uaU=
 =U7tG
 -END PGP SIGNATURE-

Thanks for the reply! I will go try this, I stuck Allmail under the
virtual directory and i have gotten some things to partially work, but
I will try your setup and see where it gets me!

=D


Re: [Dovecot] Virtual mailbox plugin, 4 days of struggling

2009-04-28 Thread Brandon Lamb
On Tue, Apr 28, 2009 at 9:27 AM, Brandon Lamb brandonl...@gmail.com wrote:
 On Tue, Apr 28, 2009 at 9:18 AM, Matthijs Kooijman matth...@stdin.nl wrote:
 Hi Brandon,

 judging from your other posts, I think you made some progress on this
 already. Nonetheless, I will share my working virtual config here. In
 dovecot.conf I have:

  # Virtual mailboxes
  namespace private {
    #  list = no
    prefix = virtual/
    separator = /
    # Store virtual mailbox in a virtual subdirectory. We use the fs layout,
    # so nesting of mailboxes is done using normal filesystem nesting.
    location = virtual:~/Mail/virtual:LAYOUT=fs
  }

  protocol imap {
    # Enable virtual mailboxes
    mail_plugins = virtual

 Then, in ~/Mail/virtual I have a directory for each virtual mailbox, which
 contains a dovecot-virtual file. For example,
 ~/Mail/virtual/INBOX/dovecot-virtual contains:
  INBOX
  INBOX/Lists
  INBOX/Bulk
  INBOX/MaybeSpam
  Folders/TODO
    all

 (Where INBOX and subfolders refers to the INBOX folder in the default
 namespace, with no prefix, which also has inbox = yes set). This allows me to
 view all my new mail by connecting to imaps://host/virtual/INBOX, and only 
 see
 important mail on my phone by connecting to imaps://host/INBOX, i.e., my real
 inbox).

 I hope this helps a bit,

 Matthijs

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

 iD8DBQFJ9yxIz0nQ5oovr7wRAiAXAKC5zM+YBYNLC8KYS++5boDop98PUACaAo/R
 QQOULoBb4X42R+E6FmQ0uaU=
 =U7tG
 -END PGP SIGNATURE-

 Thanks for the reply! I will go try this, I stuck Allmail under the
 virtual directory and i have gotten some things to partially work, but
 I will try your setup and see where it gets me!

 =D


Oh wait, dangit, this is what I have now, I misread this.

I cant seem to get the inthread x-references2 x-mailbox INBOX to work.
I setup an Allmail under /virtual with * and all as the search, then
created Inbox2 using virtual/Allmail and inthread x-references2
x-mailbox INBOX but it gives a server bug. Not sure if that is very
clear or not.


[Dovecot] Virtual mailbox plugin, 4 days of struggling

2009-04-27 Thread Brandon Lamb
Hello,

I finally got an INBOX to work, but is virtual mailbox plugin only
meant to create a virtual inbox, or should I be able to have an
Allmails virtual folder that is viewable in my imap client? if
~/virtual/ is my location, would I create an Allmails directory in the
virtual/ or virtual/INBOX/Allmails. Im fairly confused on how this is
suppose to work. I was trying to duplicate the gmail-like setup on the
wiki but I cant get it work.

Per the wiki, i put in the userdb inbox select, but made swapped pop3 for imap

zeus:/etc/dovecot# dovecot -n
# 1.2.rc3: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.26-1-amd64 x86_64 Debian squeeze/sid
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot/dovecot.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 lda
listen: 208.200.251.181
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/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: Hello there.
login_log_format_elements: %u %r
login_log_format: %s
login_process_per_connection: no
login_process_size: 128
login_processes_count: 4
login_max_processes_count: 20
login_max_connections: 128
mail_max_userip_connections(default): 15
mail_max_userip_connections(imap): 15
mail_max_userip_connections(pop3): 1
verbose_proctitle: yes
first_valid_uid: 8
last_valid_uid: 8
first_valid_gid: 8
last_valid_gid: 8
mail_access_groups: mail
mail_privileged_group: mail
mail_uid: 8
mail_gid: 8
mail_location: maildir:~/:INDEX=dovecot-index
mailbox_idle_check_interval: 60
mail_debug: yes
fsync_disable: yes
mailbox_list_index_disable: no
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_plugins(default): quota imap_quota virtual autocreate
mail_plugins(imap): quota imap_quota virtual autocreate
mail_plugins(pop3): quota
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
mail_log_prefix: %Ls %u:
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3):
pop3_no_flag_updates(default): no
pop3_no_flag_updates(imap): no
pop3_no_flag_updates(pop3): yes
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_logout_format(default): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_logout_format(imap): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_logout_format(pop3): retr=%r/%b, del=%d/%m, size=%s
namespace:
  type: private
  separator: /
  hidden: yes
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: virtual/
  location: virtual:~/virtual:INDEX=~/dovecot-index
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: RealMails/
  hidden: yes
  list: no
  subscriptions: yes
auth default:
  mechanisms: plain login
  default_realm: pacwebdev.com
  cache_ttl: 60
  debug: yes
  worker_max_count: 60
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 438
  user: mail
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 438
  user: mail
  group: mail
plugin:
  quota: maildir
  quota_rule: Trash:ignore
  quota_rule2: Sent:ignore
  quota_rule3: Spam:ignore
  quota_rule4: Archive:ignore
  quota_rule5: Sent Items:ignore
  quota_rule6: Deleted Items:ignore
  quota_warning: storage=95%% /etc/dovecot/quota-warning.sh 95
  quota_warning2: storage=80%% /etc/dovecot/quota-warning.sh 80
  autocreate: Trash
  autocreate2: Spam
  autosubscribe: Trash
  autosubscribe2: Spam
  auth_socket_path: /var/run/dovecot/auth-master


[Dovecot] Virtual plugin, timeout leaks

2009-04-27 Thread Brandon Lamb
Getting these
Warning: imap brand...@pacwebdev.com: Timeout leak: 0x461bd0

/etc/dovecot/virtual/Allmail/dovecot-virtual
*
-Trash
-Trash/*
 all

/etc/dovecot/virtual/INBOX/dovecot-virtual
virtual/Allmail
 inthread x-references2 x-mailbox INBOX

/etc/dovecot/dovecot.conf
namespace private {
prefix = 
separator = /
list = yes
hidden = yes
}

namespace private {
prefix = virtual/
separator = /
list = no
hidden = yes
inbox = yes
location = virtual:/etc/dovecot/virtual:INDEX=~/dovecot-index
}

namespace private {
prefix = RealMails/
separator = /
list = no
hidden = yes
}


[Dovecot] Virtual plugin - [SERVERBUG] BUG: Unknown internal error

2009-04-27 Thread Brandon Lamb
/etc/dovecot/virtual/Inbox2/dovecot-virtual
*
-Trash
-Trash/*
-Deleted*
-Junk*
  inthread x-references2 x-mailbox INBOX

Using php to connect o {host}virtual/Inbox2 gives me [SERVERBUG] BUG:
Unknown internal error. If I connect to virtual/Allmail which has
all instead of the inthread line it works.


[Dovecot] Virtual mailboxes, howto, examples, help? =)

2009-04-24 Thread Brandon Lamb
Using 1.2rc3
maildir format
maildir /mail/example.com/j/johndoe/{cur,new,tmp}

Is there more documentation and examples on how to configure virtual
mailboxes, or maybe more info on what it is suppose to do? From what I
could understand on the wiki, i could create a fake/virtual folder
under /mail/example.com/j/johndoe/virtual/allmail/ and inside that dir
create dovecot-virtual with

INBOX
 all

And then in my mail client i would see virtual/allmail and when i
click that folder it shows me mail from all my normal maildir folders?
Is my thinking of how to use virtual mailboxes totally off, or am I
trying to use it for what it is suppose to be used for?

So far i have been messing with various values = yes/no using the following

namespace private {
prefix = virtual/
separator = /
#   location = virtual:~/virtual
location = virtual:~/virtual:LAYOUT=maildir++
list = yes
inbox = no
subscriptions = yes
hidden = no
}

# The default namespace that is visible to IMAP clients
namespace private {
prefix =
separator = /
location = maildir:~/
list = yes
inbox = yes
subscriptions = yes
hidden = no
}

I dont know if I am retarded in my lack of ability to figure this out or what


[Dovecot] Anyone know or have a perl, c/c++ script?

2009-03-03 Thread Brandon Lamb
Hello all,
Im hoping maybe someone on this list has already looked for or built
something similiar.

Basically from what I can tell, phps imap libraries or whatever dont support
setting custom keywords. So I am wondering if someone has a library or
script that can take a username, domain, password, folder, uid and flag to
set so that my webmail app can call this to set imap keywords.

So far my google searching isnt turning up anything, but searching for the
word keyword doesnt really help.


Re: [Dovecot] Anyone know or have a perl, c/c++ script?

2009-03-03 Thread Brandon Lamb
On Tue, Mar 3, 2009 at 9:33 AM, Brandon Lamb brandonl...@gmail.com wrote:

 Hello all,
 Im hoping maybe someone on this list has already looked for or built 
 something similiar.
 Basically from what I can tell, phps imap libraries or whatever dont support 
 setting custom keywords. So I am wondering if someone has a library or script 
 that can take a username, domain, password, folder, uid and flag to set so 
 that my webmail app can call this to set imap keywords.
 So far my google searching isnt turning up anything, but searching for the 
 word keyword doesnt really help.

Oh I'm retarded, its been so long since I looked at this I confused
the two. You can SET but not retrieve custom flags in php.


Re: [Dovecot] Concurrent POP3 Sessions Issues

2009-01-30 Thread Brandon Lamb
On Fri, Jan 30, 2009 at 4:39 AM, Mauricio López Riffo
mauricio.lo...@netline.net wrote:
 Timo,

What messages should be see?  I execute the commands and shows a lot
 of messages, i dont know what it means, i m not a programmer :)


 Thanks

 

 Mauricio López Riffo
 Red Hat Certified Engineer
 804006455319519
 Netline Telecomunicaciones Chile
 Los Conquistadores 2430, Providencia, Santiago.
 Codigo Postal: 7530041
 Fono: +562 6560600
 Móvil: +569 90992366

 -Mensaje original-
 De: Timo Sirainen [mailto:t...@iki.fi]
 Enviado el: jueves, 29 de enero de 2009 20:46
 Para: mauricio.lo...@netline.net; Dovecot Mailing List
 Asunto: Re: [Dovecot] Concurrent POP3 Sessions Issues

 On Jan 29, 2009, at 1:17 PM, Mauricio López Riffo wrote:

  I have problems with dovecot + ldap + nfs, we could't have more than
  20 concurrent sessions of pop3, when user 21 comes, the auth process
  takes more than 1 sec and is incresing (while most users arrives, more
  delay in
  autenticacion exists) and my customers complaint about the service.
  We need
  support about 200 concurrents pop3 users, here is my details

 Someone else was recently complaining about the same thing. Or was it you?
 Anyway,
 dovecot-auth doesn't know how many users are logged in so if the problem
 really is 21
 *concurrent users* instead of n logins/ second, I find it highly unlikely
 that the problem is
 with authentication.

 My guess is that this has something to do with NFS. Perhaps start Dovecot
 with strace -tt -f
 dovecot and then when it's slowing down see what syscall it says is
 blocking.

I had the same kind of issues. Moving dovecot to the nfs server
directly solved all my weird problems.


Re: [Dovecot] Possible to log IMAP connections to MySQL Table?

2008-12-23 Thread Brandon Lamb
On Tue, Dec 23, 2008 at 1:30 PM, Seth Mattinen se...@rollernet.us wrote:
 Corey Shaw wrote:

 Is it currently possible to log all IMAP connection attempts to a MySQL
 table?  Thanks.

 Sure. You could use syslog-ng to log directly to a database or syslog plus
 SEC (http://kodu.neti.ee/~risto/sec/) to trigger insert rules.

 ~Seth

If someone ever decides to make a log-login-tomysql plugin i would
love to use it. I currently have a php script that runs during
logrotate that parses the info.log for all pop3/imap logins and logs
them to mysql, i only keep per minute and then i have a history table
of peruser-perday for 90 days.

It would be way cool to have dovecot throw that to mysql
automagically. If i were a c programmer i would do it myself =S


Re: [Dovecot] Possible to log IMAP connections to MySQL Table?

2008-12-23 Thread Brandon Lamb
On Tue, Dec 23, 2008 at 1:54 PM, Seth Mattinen se...@rollernet.us wrote:
 Brandon Lamb wrote:

 On Tue, Dec 23, 2008 at 1:30 PM, Seth Mattinen se...@rollernet.us wrote:

 Corey Shaw wrote:

 Is it currently possible to log all IMAP connection attempts to a MySQL
 table?  Thanks.

 Sure. You could use syslog-ng to log directly to a database or syslog
 plus
 SEC (http://kodu.neti.ee/~risto/sec/) to trigger insert rules.

 ~Seth

 If someone ever decides to make a log-login-tomysql plugin i would
 love to use it. I currently have a php script that runs during
 logrotate that parses the info.log for all pop3/imap logins and logs
 them to mysql, i only keep per minute and then i have a history table
 of peruser-perday for 90 days.

 It would be way cool to have dovecot throw that to mysql
 automagically. If i were a c programmer i would do it myself =S


 Somewhere on my hit list is customers wanting to see last access time for
 mailboxes and some informational IMAP/POP3 logging. If I ever get around to
 it, I could try making it a plugin rather than another rule in the fifo
 watcher.

 Although I've never done any Dovecot development before, so if someone else
 does it first I wouldn't be hurt. ;)

 ~Seth


Its definately valuable information, I like being able to look up a
user to see their past logins and by type (pop3, imap) and be able to
use this information to shut off or reduce quotas on seemingly dormant
accounts, and helps to identify spam boxes. If i didnt have to run a
php script it would be all the better, plus if i want information
RIGHT NOW I have to remember to run the script before querying the
current logins.


Re: [Dovecot] Released v1.1.5 and v1.2.alpha3

2008-10-27 Thread Brandon Lamb
On Mon, Oct 27, 2008 at 4:18 AM, Proskurin Kirill
[EMAIL PROTECTED] wrote:

 Largest changes since v1.2.alpha2:
+ Autocreate plugin: http://wiki.dovecot.org/Plugins/Autocreate

 Hello all!
 Could someone say - how to patch dovecot 1.1.x n freebsd with this plugin? I
 try to copy patch to ports files folder and recompile it - but it seems
 don`t help me.

 --
 Best regards,
 Proskurin Kirill

Wow very cool plugin, I have had to write in a hack in my webmail
during the login/get folders code to check for 4 folders and
create/subscribe if needed. This would be so much better!


Re: [Dovecot] Gah, pop3 falling over

2008-10-27 Thread Brandon Lamb
On Mon, Oct 27, 2008 at 9:20 AM, Brandon Lamb [EMAIL PROTECTED] wrote:
 Why would I be seeing a million of these?

 dovecot: 2008-10-27 09:12:33 Warning:
 chdir(/mail/mail/domain/u/username/) blocked for 18 secs

 Two servers were working fine and then all of a sudden this morning
 bam 500 load and theres a million dovecots and tons of these lines in
 the logs.

 It is like everyone gets up at exactly 8:30 and hits the pop3 server at once.

 Anyway, dovecot 1.1.5, nfs mount, debian lenny/sid amd64,
 2.6.26-1-amd64 i had the performance mode options for login
 configured, i just set back to the single process per login though, I
 think that hasnt fallen over that way but I really dont remember
 anymore. I included the dovecot -n using the suggest performance login
 settings? Do I have something totally out of whack?

 # 1.1.5: /etc/dovecot/dovecot.conf
 base_dir: /var/run/dovecot/
 log_path: /var/log/dovecot/dovecot.log
 info_log_path: /var/log/dovecot/info.log
 log_timestamp: %Y-%m-%d %H:%M:%S
 protocols: imap pop3
 listen(default): 208.200.248.2 208.200.248.7
 listen(imap): 208.200.248.2 208.200.248.7
 listen(pop3): 208.200.248.2
 disable_plaintext_auth: no
 login_dir: /var/run/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: Hello there.
 login_log_format_elements: %u %r
 login_log_format: %s
 login_process_per_connection: no
 login_process_size: 128
 login_processes_count: 4
 login_max_processes_count: 8
 login_max_connections: 128
 valid_chroot_dirs: /mail/mail
 mail_max_userip_connections(default): 15
 mail_max_userip_connections(imap): 15
 mail_max_userip_connections(pop3): 4
 verbose_proctitle: yes
 first_valid_uid: 8
 last_valid_uid: 8
 first_valid_gid: 8
 last_valid_gid: 8
 mail_access_groups: mail
 mail_privileged_group: mail
 mail_uid: 8
 mail_gid: 8
 mail_location: maildir:~/:INDEX=/dovecot-index
 mailbox_idle_check_interval: 60
 mmap_disable: yes
 mail_nfs_storage: yes
 mail_nfs_index: yes
 mailbox_list_index_disable: no
 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_plugins(default): quota imap_quota
 mail_plugins(imap): quota imap_quota
 mail_plugins(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
 mail_log_prefix: %Ls %u:
 imap_client_workarounds(default): outlook-idle delay-newmail
 imap_client_workarounds(imap): outlook-idle delay-newmail
 imap_client_workarounds(pop3):
 pop3_no_flag_updates(default): no
 pop3_no_flag_updates(imap): no
 pop3_no_flag_updates(pop3): yes
 pop3_client_workarounds(default):
 pop3_client_workarounds(imap):
 pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
 pop3_logout_format(default): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
 pop3_logout_format(imap): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
 pop3_logout_format(pop3): retr=%r/%b, del=%d/%m, size=%s
 auth default:
  mechanisms: plain login
  default_realm: olypen.com
  cache_size: 8192
  cache_ttl: 300
  worker_max_count: 60
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 438
  user: mail
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 438
  user: mail
  group: mail
 plugin:
  quota: maildir
  quota_rule: Trash:ignore
  quota_rule2: Sent:ignore
  quota_rule3: Spam:ignore
  quota_rule4: Archive:ignore
  quota_rule5: Sent Items:ignore
  quota_rule6: Deleted Items:ignore
  auth_socket_path: /var/run/dovecot/auth-master

Well, I just rebooted all 4 servers and now the load is a cool  0.50
and under What would make them all be around 10 (well 40 to 100++)
but then back down to 5 to 10 after restarting dovecot. But then a
reboot and they come back and stay at under 1 for a day.


Re: [Dovecot] Gah, pop3 falling over

2008-10-27 Thread Brandon Lamb
On Mon, Oct 27, 2008 at 9:20 AM, Brandon Lamb [EMAIL PROTECTED] wrote:
 Why would I be seeing a million of these?

 dovecot: 2008-10-27 09:12:33 Warning:
 chdir(/mail/mail/domain/u/username/) blocked for 18 secs

 Two servers were working fine and then all of a sudden this morning
 bam 500 load and theres a million dovecots and tons of these lines in
 the logs.

 It is like everyone gets up at exactly 8:30 and hits the pop3 server at once.

 Anyway, dovecot 1.1.5, nfs mount, debian lenny/sid amd64,
 2.6.26-1-amd64 i had the performance mode options for login
 configured, i just set back to the single process per login though, I
 think that hasnt fallen over that way but I really dont remember
 anymore. I included the dovecot -n using the suggest performance login
 settings? Do I have something totally out of whack?

 # 1.1.5: /etc/dovecot/dovecot.conf
 base_dir: /var/run/dovecot/
 log_path: /var/log/dovecot/dovecot.log
 info_log_path: /var/log/dovecot/info.log
 log_timestamp: %Y-%m-%d %H:%M:%S
 protocols: imap pop3
 listen(default): 208.200.248.2 208.200.248.7
 listen(imap): 208.200.248.2 208.200.248.7
 listen(pop3): 208.200.248.2
 disable_plaintext_auth: no
 login_dir: /var/run/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: Hello there.
 login_log_format_elements: %u %r
 login_log_format: %s
 login_process_per_connection: no
 login_process_size: 128
 login_processes_count: 4
 login_max_processes_count: 8
 login_max_connections: 128
 valid_chroot_dirs: /mail/mail
 mail_max_userip_connections(default): 15
 mail_max_userip_connections(imap): 15
 mail_max_userip_connections(pop3): 4
 verbose_proctitle: yes
 first_valid_uid: 8
 last_valid_uid: 8
 first_valid_gid: 8
 last_valid_gid: 8
 mail_access_groups: mail
 mail_privileged_group: mail
 mail_uid: 8
 mail_gid: 8
 mail_location: maildir:~/:INDEX=/dovecot-index
 mailbox_idle_check_interval: 60
 mmap_disable: yes
 mail_nfs_storage: yes
 mail_nfs_index: yes
 mailbox_list_index_disable: no
 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_plugins(default): quota imap_quota
 mail_plugins(imap): quota imap_quota
 mail_plugins(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
 mail_log_prefix: %Ls %u:
 imap_client_workarounds(default): outlook-idle delay-newmail
 imap_client_workarounds(imap): outlook-idle delay-newmail
 imap_client_workarounds(pop3):
 pop3_no_flag_updates(default): no
 pop3_no_flag_updates(imap): no
 pop3_no_flag_updates(pop3): yes
 pop3_client_workarounds(default):
 pop3_client_workarounds(imap):
 pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
 pop3_logout_format(default): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
 pop3_logout_format(imap): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
 pop3_logout_format(pop3): retr=%r/%b, del=%d/%m, size=%s
 auth default:
  mechanisms: plain login
  default_realm: olypen.com
  cache_size: 8192
  cache_ttl: 300
  worker_max_count: 60
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 438
  user: mail
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 438
  user: mail
  group: mail
 plugin:
  quota: maildir
  quota_rule: Trash:ignore
  quota_rule2: Sent:ignore
  quota_rule3: Spam:ignore
  quota_rule4: Archive:ignore
  quota_rule5: Sent Items:ignore
  quota_rule6: Deleted Items:ignore
  auth_socket_path: /var/run/dovecot/auth-master

dotlock_use_excl = yes
fsync_disable = no
lock_method = fcntl

Could I be running into some nfs locking issue? Wouldnt a reboot clear
any nfs um, handles or whatnot that the mail server(s) might have? Do
these look like the right values for using NFS? Should I try using
lock_method = dotlock instead?


[Dovecot] Bug? auth(default) Authentication client gave a PID of existing connection

2008-10-26 Thread Brandon Lamb
Hello,

My first time on this list, just switched from courier imap/pop3
system to dovecot. Imap part is great, pop3 seems to suffer, been
fighting it for a week.

Anyway, the reason for this post is that I have seen these pop up in
my logs, and on one of my mailheads there were some 50 lines of this

dovecot: 2008-10-26 09:33:54 Error: auth(default): BUG: Authentication
client gave a PID 15661 of existing connection

Is this really a bug or anything to be concerned with? I just installed 1.1.5.

I am using Debian lenny/sid on amd64, phenom 9850 4g ram, nfs mounted
maildir format xfs storage.


[Dovecot] Problems with the pop3 part of dovecot

2008-10-26 Thread Brandon Lamb
Hello,

I originally just typed up a 5 paragraph essay on my problems but just
deleted it all.

basically I need to find out where to start looking to find out what
is the problem with my dovecot pop3 setup. I switched from courier
imap/pop3 to dovecot imap/pop3. I have had super high loads (40+ and
overnight one server went to 511) and its been a nightmare fighting
with this new setup for the last two weeks.

I did manage to narrow the problem down to it being with the pop3 part
of dovecot. I am not sure why the load keeps going so high. The first
week I attributed it to users having to redownload mail and reindex
(we were aware of the UIDL problem), but two weeks later one of my
machines overnight went to 511. I have changed so many config options
to try to make it work that I have become overwhelmed and feel like I
have tried everything to get the right settings.

I am running four 64bit machines with amd 9850 cpus, 4 gigs ram, the
mailstore is nfs mounted, the nfs server is using xfs. Debian
lenny/sid.

I dont know what to do, I am almost debating going back to courier
pop3 and going through the week of support calls of customers
downloading mail again but that is a last ditch effort. I can
understand if i just need to wait it out while things are indexed for
dovecot and stuff, but machines falling over and loads of 40 to 500
just for dovecot seems not right.

so, where do I start?


Re: [Dovecot] Bug? auth(default) Authentication client gave a PID of existing connection

2008-10-26 Thread Brandon Lamb
On Sun, Oct 26, 2008 at 9:54 AM, Timo Sirainen [EMAIL PROTECTED] wrote:
 On Sun, 2008-10-26 at 09:45 -0700, Brandon Lamb wrote:
 Anyway, the reason for this post is that I have seen these pop up in
 my logs, and on one of my mailheads there were some 50 lines of this

 But it doesn't happen all the time?

 dovecot: 2008-10-26 09:33:54 Error: auth(default): BUG: Authentication
 client gave a PID 15661 of existing connection

 Does it log anything else than this? Are you running multiple Dovecots?
 Post your dovecot -n output?

 I am using Debian lenny/sid on amd64,

 Is it a standard Debian/kernel.org kernel or have you done some
 modifications? This isn't a virtual machine?

I have four amd64 boxes, amd 9850, 4 gig ram, Debian lenny/sid running
2.6.26-1-amd64, using LVS to load balance pop3, imap, smtp traffic.
NFS mailstore, 2 gige cards, eth1 being the private nfs backend
network, eth0 is what talks to the world.

dovecot config:
# 1.1.5: /etc/dovecot/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot/dovecot.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3
listen(default): 208.200.248.2 208.200.248.7
listen(imap): 208.200.248.2 208.200.248.7
listen(pop3): 208.200.248.2
disable_plaintext_auth: no
login_dir: /var/run/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: Hello there.
login_log_format_elements: %u %r
login_log_format: %s
login_process_size: 96
login_processes_count: 15
login_max_processes_count: 256
valid_chroot_dirs: /mail/mail
mail_max_userip_connections(default): 15
mail_max_userip_connections(imap): 15
mail_max_userip_connections(pop3): 4
verbose_proctitle: yes
first_valid_uid: 8
last_valid_uid: 8
first_valid_gid: 8
last_valid_gid: 8
mail_access_groups: mail
mail_privileged_group: mail
mail_uid: 8
mail_gid: 8
mail_location: maildir:~/:INDEX=/dovecot-index
mailbox_idle_check_interval: 60
mail_save_crlf: yes
mmap_disable: yes
mail_nfs_storage: yes
mailbox_list_index_disable: no
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_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(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
mail_log_prefix: %Ls %u:
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3):
pop3_no_flag_updates(default): no
pop3_no_flag_updates(imap): no
pop3_no_flag_updates(pop3): yes
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_logout_format(default): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_logout_format(imap): top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_logout_format(pop3): retr=%r/%b, del=%d/%m, size=%s
auth default:
  mechanisms: plain login
  default_realm: olypen.com
  cache_size: 8192
  cache_ttl: 300
  worker_max_count: 60
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 438
  user: mail
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 438
  user: mail
  group: mail
plugin:
  quota: maildir
  quota_rule: Trash:ignore
  quota_rule2: Sent:ignore
  quota_rule3: Spam:ignore
  quota_rule4: Archive:ignore
  quota_rule5: Sent Items:ignore
  quota_rule6: Deleted Items:ignore
  auth_socket_path: /var/run/dovecot/auth-master


Re: [Dovecot] Bug? auth(default) Authentication client gave a PID of existing connection

2008-10-26 Thread Brandon Lamb
On Sun, Oct 26, 2008 at 9:54 AM, Timo Sirainen [EMAIL PROTECTED] wrote:
 On Sun, 2008-10-26 at 09:45 -0700, Brandon Lamb wrote:
 Anyway, the reason for this post is that I have seen these pop up in
 my logs, and on one of my mailheads there were some 50 lines of this

 But it doesn't happen all the time?

 dovecot: 2008-10-26 09:33:54 Error: auth(default): BUG: Authentication
 client gave a PID 15661 of existing connection

 Does it log anything else than this? Are you running multiple Dovecots?
 Post your dovecot -n output?

 I am using Debian lenny/sid on amd64,

 Is it a standard Debian/kernel.org kernel or have you done some
 modifications? This isn't a virtual machine?

Ive been fighting with the pop3 part of dovecot for the past 2 weeks,
and I have tried and changed so many things that to be honest Im
feeling a little bonkers and if you see anything obviously wrong in my
config feel free to chastise me.

The error does not happen every time no, but I have been clearing the
log file a lot because this system has been unstable, having high
loads, running out of auth connections, I have been having chdir
(/mail/mail/usersmaildir) blocked for 12 seconds, I have seen my max
connectiosn for auth workers I think it was run out, that was when I
had a 511 load.

I didnt know if i was under some kind of pop3 connection attack or
what. Im dreading having to tell my boss that we need to go back to
courier pop3... UGH.

I was able to have a single P4 3ghz server be our pop3 server, now one
quad core double the ram box running dovecot as the pop3 server is
falling over, am I just doing something totally wrong here?
/frustrated ramble ramble


Re: [Dovecot] Problems with the pop3 part of dovecot

2008-10-26 Thread Brandon Lamb
On Sun, Oct 26, 2008 at 10:15 AM, Timo Sirainen [EMAIL PROTECTED] wrote:
 On Sun, 2008-10-26 at 09:57 -0700, Brandon Lamb wrote:
 basically I need to find out where to start looking to find out what
 is the problem with my dovecot pop3 setup. I switched from courier
 imap/pop3 to dovecot imap/pop3. I have had super high loads (40+ and
 overnight one server went to 511) and its been a nightmare fighting
 with this new setup for the last two weeks.

 I did manage to narrow the problem down to it being with the pop3 part
 of dovecot. I am not sure why the load keeps going so high.

 Usually this is because Dovecot wants to calculate the messages' virtual
 sizes. See maildir performance in http://wiki.dovecot.org/POP3Server.
 There were also some issues with this where Dovecot didn't always add
 the virtual size to dovecot-uidlist, but they were fixed in v1.1.5.

 So the initial high loads are expected if your file names don't
 contain ,W=size in them, but after that it should slow down. Of course
 if your new messages don't contain ,W= in them either, the load is still
 higher than it could be (but then again, Courier does the same thing so
 it shouldn't be higher than with Courier).

 One possibility would be to just make Dovecot violate POP3 spec and
 return file sizes as message sizes. Some servers like qmail-pop3d do
 that and they apparently work well enough.. This could be done by
 changing mail_get_virtual_size to mail_get_physical_size in
 src/pop3/client.c

Im willing to try this, I really dont want to go back to courier,
dovecot just seems like a way cleaner setup. I found the line to edit
so I will recompile and give that a try.

I did modify exim to add the W=size but it also required use_crlf and
that seemed to break something else. I also found a couple posts
saying to use INDEX=MEMORY for the pop3 part, but I didnt understand
if that actually DISABLED pop3 using indexes or if it really stored
something in memory, and if so what happens on a reboot, so I am
confused on if i should tell the pop3 part to use the same
/dovecot-index that I specified for imap.

I also dont know if I made so many changes that I didnt give any of
them time to work themselves out. We were just in panic mode trying to
put out fires hehe.


Re: [Dovecot] Bug? auth(default) Authentication client gave a PID of existing connection

2008-10-26 Thread Brandon Lamb
 So the load balancer is randomly assigning the user to different
 servers? Not really the preferred setup. I guess you've read
 http://wiki.dovecot.org/NFS?
Yes, in our previous setup we just used round robin and it seemed to
be fine, never had load problems (using courier). After switching to
dovecot I had tried both, while trying to narrow down the problem to
the pop3 I had set only 1 machine to handle all pop3 and I got a call
the next morning from support and the load was 511.

 login_processes_count: 15
 login_max_processes_count: 256

 This problem and possibly others could maybe be solved by using the high
 performance mode as described by http://wiki.dovecot.org/LoginProcess

I tried this the same night that I had a single pop3 box, it ran out
of processes I think was what the log said, so I switched back to the
current settings.

 mail_location: maildir:~/:INDEX=/dovecot-index

 Are index files on local disk or on NFS?

Yes, although I set INDEX=MEMORY for pop3 section after reading that
on one of the google search results

 mail_save_crlf: yes

 This adds some extra disk I/O, probably better to set to no unless you
 have a good reason.

I forgot why I had enabled this, I just turned it off though.

 mmap_disable: yes
 mail_nfs_storage: yes

 If indexes are on NFS, you should have mail_nfs_index=yes too.

I had this enabled as well until I read the index=memory thing and
then disabled it. I just now turned it on again.

 mailbox_list_index_disable: no

 These aren't actually always disabled since the code is buggy..

I tried searching for what this did or what it meant but didnt find
anything helpful. Should I set manually set this to yes or leave it?

 BTW. Are you using Dovecot's deliver for new mails?

No I am just using exim 4.69 to deliver directly to maildir


Re: [Dovecot] Problems with the pop3 part of dovecot

2008-10-26 Thread Brandon Lamb
On Sun, Oct 26, 2008 at 10:25 AM, Timo Sirainen [EMAIL PROTECTED] wrote:
 On Sun, 2008-10-26 at 10:21 -0700, Brandon Lamb wrote:
 I did modify exim to add the W=size but it also required use_crlf and
 that seemed to break something else. I also found a couple posts
 saying to use INDEX=MEMORY for the pop3 part, but I didnt understand
 if that actually DISABLED pop3 using indexes or if it really stored
 something in memory, and if so what happens on a reboot, so I am
 confused on if i should tell the pop3 part to use the same
 /dovecot-index that I specified for imap.

 v1.1 handles index files with POP3 a lot better than v1.0. I don't think
 it's a good idea to disable them.

 This reminds me, I should look into updating the
 courier-dovecot-migrate.pl to copy the virtual sizes and POP3 UIDLs from
 Courier's files to dovecot-uidlist now that v1.1 supports them both.

So using 1.1.5 would you recommend that I have INDEX=MEMORY or
INDEX=/dovecot-index (which is nfs stored dir) for pop3?


Re: [Dovecot] Bug? auth(default) Authentication client gave a PID of existing connection

2008-10-26 Thread Brandon Lamb
Ok, made the change to the client.c and updated dovecot.conf with your
suggestions, I'll let it ride out another few days and see where it
puts me!

Thanks for the instant replies, that is very cool. Im hoping this all
smooths out. Other than some upsets I am totally digging dovecot