[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 Timo Sirainen
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 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.

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 Timo Sirainen
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?


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 Timo Sirainen
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..



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 Timo Sirainen
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).



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