Re: [Dovecot] Dovecot IMAP/POP3 Proxy with LDAP

2007-08-24 Thread Raphael Costa

Timo,

That was what I've done. It works...

pass_attrs =
uid=user,userPassword=password,qmailUID=proxy,mailHostAddress=host


Thanks,

On Fri, 2007-08-24 at 20:13 +0300, Timo Sirainen wrote:

> On Fri, 2007-08-17 at 11:18 -0300, Raphael Bittencourt S. Costa wrote:
> > Aug 17 09:22:29 bastion01 dovecot: auth(default):
> > ldap([EMAIL PROTECTED],10.0.1.1): result: qmailUID(proxy)=1033
> > mailHost(host)=mailserver-01..com.br
> > uid(user)[EMAIL PROTECTED]
> 
> It doesn't show "proxy" field in here.
> 
> > Aug 17 09:22:29 bastion01 dovecot: auth(default):
> > ldap([EMAIL PROTECTED],10.0.1.1): bind:
> > dn=cn=raphael.costa,ou=.com.br,ou=accounts,o=comMail
> > 
> > Aug 17 09:22:29 bastion01 dovecot: auth(default): client out: OK
> > 1   [EMAIL PROTECTED]   proxy
> > host=mailserver-01..com.br  pass=
> 
> But "proxy" is here anyway. How? What configuration do you have now in
> pass_attrs?
> 
> Also "host" needs to be an IP address, because no DNS lookup is done.
> 
> > Aug 17 09:22:29 bastion01 dovecot: auth(default): master in: REQUEST
> > 1   18709   1
> 
> So I don't really understand why it gets this far. It shouldn't do this
> if "proxy" field is set.
> 


Re: [Dovecot] Dovecot IMAP/POP3 Proxy with LDAP

2007-08-24 Thread Timo Sirainen
On Fri, 2007-08-17 at 11:18 -0300, Raphael Bittencourt S. Costa wrote:
> Aug 17 09:22:29 bastion01 dovecot: auth(default):
> ldap([EMAIL PROTECTED],10.0.1.1): result: qmailUID(proxy)=1033
> mailHost(host)=mailserver-01..com.br
> uid(user)[EMAIL PROTECTED]

It doesn't show "proxy" field in here.

> Aug 17 09:22:29 bastion01 dovecot: auth(default):
> ldap([EMAIL PROTECTED],10.0.1.1): bind:
> dn=cn=raphael.costa,ou=.com.br,ou=accounts,o=comMail
> 
> Aug 17 09:22:29 bastion01 dovecot: auth(default): client out: OK
> 1   [EMAIL PROTECTED]   proxy
> host=mailserver-01..com.br  pass=

But "proxy" is here anyway. How? What configuration do you have now in
pass_attrs?

Also "host" needs to be an IP address, because no DNS lookup is done.

> Aug 17 09:22:29 bastion01 dovecot: auth(default): master in: REQUEST
> 1   18709   1

So I don't really understand why it gets this far. It shouldn't do this
if "proxy" field is set.



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


Re: [Dovecot] Dovecot IMAP/POP3 Proxy with LDAP

2007-08-24 Thread Timo Sirainen
On Thu, 2007-08-16 at 18:58 -0300, Raphael Bittencourt S. Costa wrote:

> Aug 16 16:22:36 bastion01 dovecot: auth(default): client out: OK
> 2   [EMAIL PROTECTED]
> host=mailserver-01..com.br

So it's returning host, but not proxy.

> pass_attrs =
> uid=user,userPassword=password,mailMessageStore=userdb_home,qmailUID=userdb_uid,qmailGID=userdb_gid,proxy,mailHost=host

You'll need to make this query return "proxy" field. I guess you don't
currently have "proxy" in your LDAP schema? Maybe mailHost=proxy would
work.



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


Re: [Dovecot] Dovecot IMAP/POP3 Proxy with LDAP

2007-08-17 Thread Raphael Bittencourt S. Costa
I made some progress, but it still don't connect to the server. See
below:

Aug 17 09:22:29 bastion01 dovecot: auth(default): client in: AUTH  1
PLAIN   service=POP3lip=10.0.2.1rip=10.0.1.1
resp=AHJhcGhhZWwuY29zdGFAYmlnaG9zdxsdC5jb20uYnIAMTIzcXdl

Aug 17 09:22:29 bastion01 dovecot: auth(default):
ldap([EMAIL PROTECTED],10.0.1.1): bind search:
base=ou=.com.br,ou=accounts,o=comMail
filter=(&(objectClass=qmailUser)([EMAIL PROTECTED])(accountStatus=active))

Aug 17 09:22:29 bastion01 dovecot: auth(default):
ldap([EMAIL PROTECTED],10.0.1.1): result: qmailUID(proxy)=1033
mailHost(host)=mailserver-01..com.br
uid(user)[EMAIL PROTECTED]

Aug 17 09:22:29 bastion01 dovecot: auth(default):
ldap([EMAIL PROTECTED],10.0.1.1): bind:
dn=cn=raphael.costa,ou=.com.br,ou=accounts,o=comMail

Aug 17 09:22:29 bastion01 dovecot: auth(default): client out: OK
1   [EMAIL PROTECTED]   proxy
host=mailserver-01..com.br  pass=

Aug 17 09:22:29 bastion01 dovecot: auth(default): master in: REQUEST
1   18709   1

Aug 17 09:22:29 bastion01 dovecot: auth(default): Master request 18709.1
not found

Aug 17 09:22:29 bastion01 dovecot: auth(default): master out: NOTFOUND
1

Aug 17 09:22:29 bastion01 dovecot: pop3-login: Internal login failure:
user=<[EMAIL PROTECTED]>, method=PLAIN, rip=10.0.1.1,
lip=10.0.2.1


any idea?



On Thu, 2007-08-16 at 18:58 -0300, Raphael Bittencourt S. Costa wrote:
> Hello all,
> 
> I'm having problems to make Dovecot proxy work, I configured it
> following dovecot's site. See my test below:
> 
> It accepts login and password and then closes the connection.
> 
> bastion01:~/build# telnet localhost 110
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> +OK Dovecot ready.
> user [EMAIL PROTECTED]
> +OK
> pass xx
> +OK Logged in.
> Connection closed by foreign host.
> 
> 
> See that it get the host information but still try to access the mbox
> locally.
> 
> Aug 16 16:22:36 bastion01 dovecot: auth(default):
> ldap([EMAIL PROTECTED],127.0.0.1): bind:
> dn=cn=raphael.costa,ou=.com.br,ou=accounts,o=comMail
> Aug 16 16:22:36 bastion01 dovecot: auth(default): client out: OK
> 2   [EMAIL PROTECTED]
> host=mailserver-01..com.br
> Aug 16 16:22:36 bastion01 dovecot: auth(default): master in: REQUEST
> 1   38942
> 
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> maildir: access(/dev/null/Maildir, rwx): failed: Not a directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> maildir: couldn't find root dir
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox: root: access(/dev/null/mail, rwx) failed: Not a directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox: root: access(/dev/null/Mail, rwx) failed: Not a directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox: checking if we are chrooted:
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox autodetect: data=
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox autodetect: has .imap/: stat(/.imap) failed: No such file or
> directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox autodetect: has inbox: stat(/inbox) failed: No such file or
> directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox autodetect: has mbox: stat(/mbox) failed: No such file or
> directory
> Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
> mbox: root mail directory not found
> 
> 
> 
> My dovecot-ldap.conf:
> pass_attrs =
> uid=user,userPassword=password,mailMessageStore=userdb_home,qmailUID=userdb_uid,qmailGID=userdb_gid,proxy,mailHost=host
> 
> 
> What am I doing wrong?
> 
> 
> Raphael Costa