On Aug 1, 2008, at 1:39 AM, Patrick Nagel wrote:

| mailboxes=`printf "1 list "" *\n" | dovecot --exec-mail imap | perl magic`

Ok, looks easy. But I can't find information anywhere on how to specify the user. I tried with 'USER=username' in front of the dovecot call, and dovecot then said 'Logged in as username' instead of 'Logged in as root', but a list command doesn't show the mailboxes, so I think it's not accessing the maildir
of that user.
I guess it's because the users are not system users, and dovecot needs to retrieve info from the LDAP directory first. But how do I tell it to do that?

You can't do that with --exec-mail. It expects to be running using the correct UID, GID, $USER and $HOME.

Logging in via netcat / telnet works, but then I don't know how to proceed...

With v1.2 code you could use the same printf .. | nc localhost 143, but unfortunately this doesn't work with older versions since the input buffer is reset after login.

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to