[Dovecot] postfix virtual maildir

2008-04-09 Thread Gert Cuykens
my postfix setup
http://code.google.com/p/appwsgi/wiki/smtp

my dovecot setup
http://code.google.com/p/appwsgi/wiki/imap

[EMAIL PROTECTED]:~# /etc/postfix/test/root
220 localhost.localdomain ESMTP Postfix (Ubuntu)
250-localhost.localdomain
250-PIPELINING
250-SIZE 1024
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
235 2.7.0 Authentication successful
250 2.1.0 Ok
250 2.1.5 Ok
354 End data with .
250 2.0.0 Ok: queued as E19B649016D
221 2.0.0 Bye

[EMAIL PROTECTED]:~# /etc/dovecot/test/root
* OK Dovecot ready.
. OK Logged in.
. LIST "" "*"

Apr  9 13:01:58 localhost postfix/smtpd[9345]: connect from localhost[127.0.0.1]
Apr  9 13:01:58 localhost dovecot: auth-worker(default): mysql:
Connected to 127.0.0.1 (mail)
Apr  9 13:01:58 localhost postfix/smtpd[9345]: E19B649016D:
client=localhost[127.0.0.1], sasl_method=PLAIN,
[EMAIL PROTECTED]
Apr  9 13:01:58 localhost postfix/cleanup[9349]: E19B649016D:
message-id=<[EMAIL PROTECTED]>
Apr  9 13:01:58 localhost postfix/qmgr[11316]: E19B649016D:
from=<[EMAIL PROTECTED]>, size=359, nrcpt=1 (queue active)
Apr  9 13:01:58 localhost postfix/smtpd[9345]: disconnect from
localhost[127.0.0.1]
Apr  9 13:01:58 localhost postfix/virtual[9350]: E19B649016D:
to=<[EMAIL PROTECTED]>, relay=virtual, delay=0.03,
delays=0.02/0.01/0/0.01, dsn=2.0.0, status=sent
Apr  9 13:01:58 localhost postfix/qmgr[11316]: E19B649016D: removed
Apr  9 13:02:24 localhost dovecot: imap-login: Login:
user=<[EMAIL PROTECTED]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1,
secured
Apr  9 13:12:19 localhost postfix/qmgr[11316]: BD567490191:
from=<[EMAIL PROTECTED]>, size=359, nrcpt=1 (queue active)
Apr  9 13:12:19 localhost postfix/virtual[18607]: BD567490191:
to=<[EMAIL PROTECTED]>, relay=virtual, delay=7037,
delays=7037/0.01/0/0.01, dsn=2.0.0, status=sen
Apr  9 13:12:19 localhost postfix/qmgr[11316]: BD567490191: removed
Apr  9 13:18:51 localhost dovecot: IMAP([EMAIL PROTECTED]): Connection closed

So no erros at all but dovecot just ignores my incoming mail

[EMAIL PROTECTED]:~# ls -al /var/mail/vlocalhost/root/
total 20
drwx-- 5 5001 5001 4096 2008-04-09 12:19 .
drwx-- 3 5001 5001 4096 2008-04-09 12:19 ..
drwx-- 2 5001 5001 4096 2008-04-09 12:19 cur
drwx-- 2 5001 5001 4096 2008-04-09 13:22 new
drwx-- 2 5001 5001 4096 2008-04-09 13:22 tmp

[EMAIL PROTECTED]:~# ls -al /var/mail/vlocalhost/root/new
total 84
drwx-- 2 5001 5001 4096 2008-04-09 13:22 .
drwx-- 5 5001 5001 4096 2008-04-09 12:19 ..
-rw--- 1 5001 5001  441 2008-04-09 12:19
1207736352.V802I42434dM422151.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:22
1207736539.V802I424350M438766.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:22
1207736539.V802I424351M442839.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:27
1207736839.V802I424352M458479.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:32
1207737139.V802I424353M475024.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:32
1207737139.V802I424354M479117.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:32
1207737139.V802I424355M484827.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:32
1207737139.V802I424356M488137.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:32
1207737139.V802I424357M495435.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:37
1207737439.V802I424472M506944.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:37
1207737439.V802I424473M511500.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:37
1207737439.V802I424474M516792.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:37
1207737439.V802I424475M518515.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:42
1207737739.V802I424476M535074.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:47
1207738039.V802I424477M550421.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 12:52
1207738339.V802I424478M566532.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 13:01
1207738918.V802I424479M942873.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 13:12
1207739539.V802I42447aM958350.localhost.localdomain
-rw--- 1 5001 5001  441 2008-04-09 13:22
1207740139.V802I42447bM974462.localhost.localdomain
[EMAIL PROTECTED]:~#

So what can i do to see some listing of my new mail ?


[Dovecot] virtual spam maildir directory

2008-04-11 Thread Gert Cuykens
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender}
-d ${recipient}

is there anyway i can tell dovecot to put spam labeled headers from
spamassasin into a maildir spam folder


[Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
How can i give lda dovecot permision to set user and goup id to 5001

dovecot  unix  -   n   n   -   -   pipe
 flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender}
-d ${recipient}


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
but deliver is already root ?

and master is set as

  master {
   path = /var/run/dovecot/auth-master
   mode = 0600
   user = mail
   group = mail
  }

[EMAIL PROTECTED]:~# ls -al /usr/lib/dovecot/deliver
-rwxr-xr-x 1 root root 563112 2008-03-31 21:05 /usr/lib/dovecot/deliver
[EMAIL PROTECTED]:~#

i am sorry i dont understand what i need to do ?

On Sat, Apr 12, 2008 at 4:03 PM, Alexander Prinsier
<[EMAIL PROTECTED]> wrote:
> Install it setuid root as described here http://wiki.dovecot.org/LDA.
>
>  Alexander
>
>
>
>  Gert Cuykens wrote:
>  > How can i give lda dovecot permision to set user and goup id to 5001
>  >
>  > dovecot  unix  -   n   n   -   -   pipe
>  >  flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender}
>  > -d ${recipient}
>
>


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
a thank you :) Now i learned something really important today

chmod u+s /usr/lib/dovecot/deliver

[EMAIL PROTECTED]:~# ls -al /usr/lib/dovecot/deliver
-rwsr-xr-x 1 root root 563112 2008-03-31 21:05 /usr/lib/dovecot/deliver
[EMAIL PROTECTED]:~#

I think i am almost there but now i get

Apr 12 19:01:40 localhost deliver([EMAIL PROTECTED]): postmaster_address
setting not given


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
Victory !!!

Apr 12 19:50:51 localhost deliver([EMAIL PROTECTED]):
msgid=<[EMAIL PROTECTED]>: saved mail
to INBOX

Now the security part, i was thinking that this would work also

[EMAIL PROTECTED]:~# ls -al /usr/lib/dovecot/deliver
-rws-- 1 mail mail 563112 2008-03-31 21:05 /usr/lib/dovecot/deliver
[EMAIL PROTECTED]:~#

but it doesnt, changing it to user postfix also doesnt work ?


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
A i know why i mis understood the set uid bit, i though the owner
would gain root permission, sorry :)


Re: [Dovecot] localhost deliver([EMAIL PROTECTED]): setgid(5001) failed with euid=8, gid=8, egid=8: Operation not permitted

2008-04-12 Thread Gert Cuykens
On Sat, Apr 12, 2008 at 8:25 PM, Pascal Volk
<[EMAIL PROTECTED]> wrote:
> Am 12.04.2008 20:07 schrieb Gert Cuykens:
>  > […]
>
> > Now the security part, i was thinking that this would work also
>  >
>  > [EMAIL PROTECTED]:~# ls -al /usr/lib/dovecot/deliver
>  > -rws-- 1 mail mail 563112 2008-03-31 21:05 /usr/lib/dovecot/deliver
>  > [EMAIL PROTECTED]:~#
>  >
>  > but it doesnt, changing it to user postfix also doesnt work ?
>
>  OK, step by step.
>
>   1. chown 0.0 /usr/lib/dovecot/deliver
>   2. chmod 755 /usr/lib/dovecot/deliver
>   3. find out the user from postfix's master.cf
> (... flags=DRhu user=nobody:mail argv=/usr/.../deliver)
>  ^^
> NOT: root, dovecot or postfix!
>   4. mkdir /usr/local/lib/dovecot
>   5. chmod 700 /usr/local/lib/dovecot
>   6. chown nobody /usr/local/lib/dovecot
>   7. cp -p /usr/lib/dovecot/deliver /usr/local/lib/dovecot
>   8. chmod u+s /usr/local/lib/dovecot/deliver
>   9. apply the path from 8. to argv from service dovecot in postfix's
> master.cf
>  10. restart postfix and enjoy

ok that works thanks :)