I do not have anything to do with PHP, but I hope that "imap_open" is some
sort of PHP operation and *NOT* a call to the c-client imap_open()
function which is strictly internal to c-client.

> I am using imap_open (from PHP4) to get Usenet post from an NNTP server,
> and it runs fine with this imap_open:
> imap_open("{localhost:143/imap/notls}{localhost:119/nntp}group",
>      "imapuser", "imappass", OP_HALFOPEN)

This strongly suggests that this imap_open is not the same as the c-client
imap_open() function.  Anyway, it looks like the first argument is a
c-client mailbox name.  If so, you are stipulating a proxy open via IMAP.
Is there some reason why you are doing this, instead of a direct NNTP
session?  That is, why aren't you using
        {localhost/nntp}group

Anyway, because you are using OP_HALFOPEN, you are just opening an IMAP
connection without ever doing anything with NNTP.

Is there some reason why you are specifying the port number?  c-client
knows the correct port number to you.

> But I cannot find the good syntax to connect to an NNTP server if an
> authentication is needed.
> The following command:
> imap_open("{localhost:143/imap/notls}{nntpuser:nntppass@localhost:119/nntp}group",
>      "imapuser", "imappass", OP_HALFOPEN)
> seems correct and return a resource, but with this resource
> imap_getmailboxes does not find anything.

Once again, this is only getting you an open IMAP session not open on any
mailbox, because you are using OP_HALFOPEN.

If you want to specify a user name, the syntax is /user=, as in:
        {localhost/nntp/user=nntpuser}group

There is no way to pass a separate NNTP password if you insist upon using
a separate proxy via IMAP.

Furthermore, note that the use of an IMAP proxy is a UW imapd (c-client
imapd) feature, and is not likely to be offered on any other IMAP server.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

Reply via email to