Re: [Dovecot] deliver stopped working

2009-10-06 Thread vwc72283
Note to all: If you are running Dovecot on a system where any of the mailboxes 
are nfs
v4 mounted from a RHEL (or derivative) server DO NOT upgrade that server to an 
unpatched
2.6.18-164 kernel, it is very broken at this time. Not only will Dovecot fail 
but you're
likely to have a myriad of other problems.

https://bugzilla.redhat.com/show_bug.cgi?id=523797
https://bugzilla.redhat.com/show_bug.cgi?id=524520


 On Mon, 2009-10-05 at 10:30 -0400, vwc72...@voicenet.com wrote:
 So, it is reproducible. Now, if you take O_EXCL out it works even for the 
 user:
 ..
 Why I suddenly get the behavior I don't know. Clearly its not deliver, but 
 deliver
 tries
 to do something that behaves badly on this system.

 I've no idea. Never heard of O_EXCL failing in that way. You could
 always just remove the O_EXCL uses from Dovecot sources, Dovecot doesn't
 rely on them.








[Dovecot] ignors the configure prefix

2009-10-04 Thread vwc72283
1.2.5 is ignoring the configure -prefix switch. It you install it some place 
else with
the -prefix then I get errors all over the place becuase things are hard coded 
to use
the default and it can't find anything any more like:

Fatal: execv(/usr/local/libexec/dovecot/ssl-build-param) failed: No such file 
or directory

and

Error: Can't open configuration file /usr/local/etc/dovecot.conf: No such file 
or directory
Fatal: Invalid configuration in /usr/local/etc/dovecot.conf

and

Starting Dovecot Imap: Error: auth_executable: Can't use
/usr/local/libexec/dovecot/dovecot-auth: No such file or directory

How do I fix this?





Re: [Dovecot] ignors the configure prefix

2009-10-04 Thread vwc72283

 vwc72...@voicenet.com wrote:
 1.2.5 is ignoring the configure -prefix switch. It you install it some place 
 else with
 the -prefix then I get errors all over the place becuase things are hard 
 coded to use
 the default and it can't find anything any more like:

 Fatal: execv(/usr/local/libexec/dovecot/ssl-build-param) failed: No such 
 file or
 directory

 and

 Error: Can't open configuration file /usr/local/etc/dovecot.conf: No such 
 file or
 directory
 Fatal: Invalid configuration in /usr/local/etc/dovecot.conf

 and

 Starting Dovecot Imap: Error: auth_executable: Can't use
 /usr/local/libexec/dovecot/dovecot-auth: No such file or directory

 How do I fix this?







 Have you tried to build the SRPM available at
 ftp://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/dovecot-1.2.5-2.fc12.src.rpm
 ?

Yes, I have tried it. There are errors in that release, at least one file fails 
the MD5
hash. Also, fc12 stuff often does not work right on el5. el5 has specific 
SElinux
policies and expects dovecot to live in a specific place (/usr). While you can 
change
where it installs with -prefix, the code its self seems to want to live at 
/usr/local
since those references don't seem to change. Now if the .spec file can fix that 
I would
be interested in how it does it, but there is too much work involved to find 
out if the
.spec author knows something I don't.


 I do know that these are probably not the words you want to hear now,
 but i would advise you to test upgrades on a test system, deploying
 changes to the production server only after you know everything is alright.

This is the test system. Well, they're VMs, I copy and flip them.


 R's,

 Hugo Monteiro.

 --
 ci.fct.unl.pt:~# cat .signature

 Hugo Monteiro
 Email  : hugo.monte...@fct.unl.pt
 Telefone : +351 212948300 Ext.15307
 Web  : http://hmonteiro.net

 Centro de Informática
 Faculdade de Ciências e Tecnologia da
  Universidade Nova de Lisboa
 Quinta da Torre   2829-516 Caparica   Portugal
 Telefone: +351 212948596   Fax: +351 212948548
 www.ci.fct.unl.pt   ap...@fct.unl.pt

 ci.fct.unl.pt:~# _








[Dovecot] deliver stopped working

2009-10-03 Thread vwc72283

Hi:

I have been using Dovecot for well over a year now and it has always worked 
with few
problems. The mail setup is not simple...
Postfix+MailScanner+ClamAV+Docvecot+MySql+postfix.admin... just to mention the 
major
things. The system is CentOS 5.3 on VMware. The maildir is on an NFS share, 
index and
control is local.

About a month ago I thought I upgraded from 1.1.x to 1.2.x. by doing an 
rpmbuild and
deploying. I say thought because today I determined the binaries were still 
1.1x. Today
a reboot was done after a kernel upgrade (2.6.18-128.x - 2.6.18-164). The mail 
system
never came back up. My assumption is that the working binaries were in memory 
but the
images on disk were changed.

Anyway, the problem is with deliver writing to the mail dir. The error is:

Oct  3 21:33:58 myserver dovecot: auth(default): master in: USER   1  
myacco...@mydomain.net   service=deliver
Oct  3 21:33:58 myserver dovecot: auth(default): 
prefetch(myacco...@mydomain.net):
passdb didn't return userdb entries, trying the next userdb
Oct  3 21:33:58 myserver dovecot: auth-worker(default): 
sql(myacco...@mydomain.net):
SELECT '/home/vmail/mydomain.net/myaccount' as home,
'maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount'
as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=', quota) AS quota 
FROM
mailbox WHERE username = 'myacco...@mydomain.net' AND active = '1' Oct  3 
21:33:58
myserver dovecot: auth(default): master out: USER  1   
myacco...@mydomain.net   
   home=/home/vmail/mydomain.net/myaccount  
mail=maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
  uid=5000gid=5000quota=dirsize:storage=0
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
home=/home/vmail/mydomain.net/myaccount
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
mail=maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input: 
uid=5000
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input: 
gid=5000
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
quota=dirsize:storage=0
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): maildir:
data=/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): maildir++:
root=/home/vmail/mydomain.net/myaccount, 
index=/var/indexes/mydomain.net/myaccount,
control=/var/indexes/mydomain.net/myaccount, 
inbox=/home/vmail/mydomain.net/myaccount
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): Namespace : 
Using
permissions from /home/vmail/mydomain.net/myaccount: mode=0770 gid=-1 Oct  3 
21:33:58
myserver dovecot: deliver(myacco...@mydomain.net):
open(/home/vmail/mydomain.net/myaccount/tmp/1254620038.M241510P27678.myserver.mydomain.net)
failed: Permission denied
Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net):
msgid=200910040116.n941gjtj001...@nm2srvp01.mydomain.net: save failed to 
INBOX:
Internal error occurred. Refer to server log for more information. [2009-10-03 
21:33:58]
Oct  3 21:33:58 myserver postfix/pipe[27677]: 89A24914CB: 
to=myacco...@mydomain.net,
orig_to=server@mydomain.net, relay=dovecot, delay=1033, 
delays=1032/0.16/0/0.31,
dsn=4.3.0, status=deferred (temporary failure)

The files are being created:

(r...@myserver:/home/vmail/mydomain.net/myaccount/tmp)# ls -la
total 156
drwxrwx--- 2 vmail vmail 4096 Oct  3 21:49 .
drwxrwx--- 9 vmail vmail 4096 Oct  3 20:19 ..
-- 1 vmail vmail0 Nov 30  1970 
1254620038.M241510P27678.myserver.mydomain.net

The user does have permission:

(r...@myserver:/home/vmail/mydomain.net/myaccount/tmp)# su - vmail -bash-3.2$ 
pwd
/home/vmail/mydomain.net/myaccount/tmp
-bash-3.2$ ls -la
total 160
drwxrwx--- 2 vmail vmail 4096 Oct  3 21:54 .
drwxrwx--- 9 vmail vmail 4096 Oct  3 20:19 ..
-- 1 vmail vmail0 Nov 30  1970
1254620038.M241510P27678.myserver.mydomain.net -bash-3.2$ rm
1254620038.M241510P27678.myserver.mydomain.net
rm: remove write-protected regular empty file
`1254620038.M241510P27678.myserver.mydomain.net'? y
-bash-3.2$ echo this  1254620038.M241510P27678.myserver.mydomain.net 
-bash-3.2$ ls -la
1254620038.M241510P27678.myserver.mydomain.net
-rw-r--r-- 1 vmail vmail 5 Oct  3 21:58 
1254620038.M241510P27678.myserver.mydomain.net
-bash-3.2$ cat 1254620038.M241510P27678.myserver.mydomain.net
this
-bash-3.2$ rm 1254620038.M241510P27678.myserver.mydomain.net
-bash-3.2$

If you delete the directory it does get recreated. I upgraded to 1.2.5 but it 
did not
help. There were a lot of errors in the audit.log, 

Re: [Dovecot] deliver stopped working

2009-10-03 Thread vwc72283

Its the O_EXCL in the open call! How can I make it not use O_EXCL?

Thanks,

-Ted-

strace.out.6700:open(/home/vmail/mydomain.net/myaccount/tmp/1254635441.M259070P6700.myserver.mydomain.net,
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0777) = -1 EACCES (Permission 
denied)



 Hi:

 I have been using Dovecot for well over a year now and it has always worked 
 with few
 problems. The mail setup is not simple...
 Postfix+MailScanner+ClamAV+Docvecot+MySql+postfix.admin... just to mention 
 the major
 things. The system is CentOS 5.3 on VMware. The maildir is on an NFS share, 
 index and
 control is local.

 About a month ago I thought I upgraded from 1.1.x to 1.2.x. by doing an 
 rpmbuild and
 deploying. I say thought because today I determined the binaries were still 
 1.1x. Today
 a reboot was done after a kernel upgrade (2.6.18-128.x - 2.6.18-164). The 
 mail system
 never came back up. My assumption is that the working binaries were in memory 
 but the
 images on disk were changed.

 Anyway, the problem is with deliver writing to the mail dir. The error is:

 Oct  3 21:33:58 myserver dovecot: auth(default): master in: USER   1
 myacco...@mydomain.net   service=deliver
 Oct  3 21:33:58 myserver dovecot: auth(default): 
 prefetch(myacco...@mydomain.net):
 passdb didn't return userdb entries, trying the next userdb
 Oct  3 21:33:58 myserver dovecot: auth-worker(default): 
 sql(myacco...@mydomain.net):
 SELECT '/home/vmail/mydomain.net/myaccount' as home,
 'maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount'
 as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=', quota) AS quota 
 FROM
 mailbox WHERE username = 'myacco...@mydomain.net' AND active = '1' Oct  3 
 21:33:58
 myserver dovecot: auth(default): master out: USER  1   
 myacco...@mydomain.net
home=/home/vmail/mydomain.net/myaccount
 mail=maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
   uid=5000gid=5000quota=dirsize:storage=0
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
 home=/home/vmail/mydomain.net/myaccount
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
 mail=maildir:/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth 
 input: uid=5000
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth 
 input: gid=5000
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): auth input:
 quota=dirsize:storage=0
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): maildir:
 data=/home/vmail/mydomain.net/myaccount:INDEX=/var/indexes/mydomain.net/myaccount:CONTROL=/var/indexes/mydomain.net/myaccount
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): maildir++:
 root=/home/vmail/mydomain.net/myaccount, 
 index=/var/indexes/mydomain.net/myaccount,
 control=/var/indexes/mydomain.net/myaccount, 
 inbox=/home/vmail/mydomain.net/myaccount
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net): Namespace 
 : Using
 permissions from /home/vmail/mydomain.net/myaccount: mode=0770 gid=-1 Oct  3 
 21:33:58
 myserver dovecot: deliver(myacco...@mydomain.net):
 open(/home/vmail/mydomain.net/myaccount/tmp/1254620038.M241510P27678.myserver.mydomain.net)
 failed: Permission denied
 Oct  3 21:33:58 myserver dovecot: deliver(myacco...@mydomain.net):
 msgid=200910040116.n941gjtj001...@nm2srvp01.mydomain.net: save failed to 
 INBOX:
 Internal error occurred. Refer to server log for more information. 
 [2009-10-03 21:33:58]
 Oct  3 21:33:58 myserver postfix/pipe[27677]: 89A24914CB: 
 to=myacco...@mydomain.net,
 orig_to=server@mydomain.net, relay=dovecot, delay=1033, 
 delays=1032/0.16/0/0.31,
 dsn=4.3.0, status=deferred (temporary failure)

 The files are being created:

 (r...@myserver:/home/vmail/mydomain.net/myaccount/tmp)# ls -la
 total 156
 drwxrwx--- 2 vmail vmail 4096 Oct  3 21:49 .
 drwxrwx--- 9 vmail vmail 4096 Oct  3 20:19 ..
 -- 1 vmail vmail0 Nov 30  1970
 1254620038.M241510P27678.myserver.mydomain.net

 The user does have permission:

 (r...@myserver:/home/vmail/mydomain.net/myaccount/tmp)# su - vmail -bash-3.2$ 
 pwd
 /home/vmail/mydomain.net/myaccount/tmp
 -bash-3.2$ ls -la
 total 160
 drwxrwx--- 2 vmail vmail 4096 Oct  3 21:54 .
 drwxrwx--- 9 vmail vmail 4096 Oct  3 20:19 ..
 -- 1 vmail vmail0 Nov 30  1970
 1254620038.M241510P27678.myserver.mydomain.net -bash-3.2$ rm
 1254620038.M241510P27678.myserver.mydomain.net
 rm: remove write-protected regular empty file
 `1254620038.M241510P27678.myserver.mydomain.net'? y
 -bash-3.2$ echo this  1254620038.M241510P27678.myserver.mydomain.net 
 -bash-3.2$ ls -la
 1254620038.M241510P27678.myserver.mydomain.net
 -rw-r--r--