Gnus development mailing list
 help / color / mirror / Atom feed
* imap namespace prefix
@ 2011-05-11 17:42 Eric Schulte
  2011-05-12 14:16 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-05-11 17:42 UTC (permalink / raw)
  To: ding

Hi,

My school uses uw-imap as their imap mail server.  When I try to connect
with the following configuration

#+begin_src emacs-lisp
  (add-to-list 'gnus-secondary-select-methods
               '(nnimap "unm"
                        (nnimap-address "mail.cs.unm.edu")
                        (nnimap-server-port 993)
                        (nnimap-stream ssl)))
#+end_src

gnus begins subscribing to *every* file in my home directory on the
school machines as an imap mail folder.  Instead I would like to limit
gnus to the ~/mail/ subdirectory of my home directory.  I found mention
of this "default to user's home directory" aspect of uw-imap online [1].

At first I thought this was a server side problem, but when subscribing
to the same imap account using thunderbird the problem does not appear.

Any suggestions as to how I can configure gnus to only subscribe to
those folders in my ~/mail/ subfolder?

Thanks -- Eric

Footnotes: 
[1]  http://wiki.dovecot.org/Migration/UW

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap namespace prefix
  2011-05-11 17:42 imap namespace prefix Eric Schulte
@ 2011-05-12 14:16 ` Eric Schulte
  2011-05-12 18:54   ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-05-12 14:16 UTC (permalink / raw)
  To: ding

Just to follow up, I was able to work around this problem with the
following changes to `nnimap-get-groups', which limit the LIST imap
command to the ~/mail/ subdirectory of my home directory (the entirety
of which was being served up by uw-imap).

#+begin_src emacs-lisp
  (require 'nnimap)
  (defun nnimap-get-groups ()
    (erase-buffer)
    (let ((sequence (nnimap-send-command
                     (if (string= "unm" (nnimap-server nnimap-object))
                         "LIST \"mail\" \"*\""
                       "LIST \"\" \"*\"")))
          groups)
      (nnimap-wait-for-response sequence)
      (subst-char-in-region (point-min) (point-max)
                            ?\\ ?% t)
      (goto-char (point-min))
      (nnimap-unfold-quoted-lines)
      (goto-char (point-min))
      (while (search-forward "* LIST " nil t)
        (let ((flags (read (current-buffer)))
              (separator (read (current-buffer)))
              (group (read (current-buffer))))
          (unless (member '%NoSelect flags)
            (push (if (stringp group)
                      group
                    (format "%s" group))
                  groups))))
      (nreverse groups)))  
#+end_src

Since this option wasn't already present I assume this is a weird edge
case peculiar to my school's server configuration and doesn't merit the
addition of any new configuration parameters to gnus.

Cheers -- Eric

Eric Schulte <schulte.eric@gmail.com> writes:

> Hi,
>
> My school uses uw-imap as their imap mail server.  When I try to connect
> with the following configuration
>
> #+begin_src emacs-lisp
>   (add-to-list 'gnus-secondary-select-methods
>                '(nnimap "unm"
>                         (nnimap-address "mail.cs.unm.edu")
>                         (nnimap-server-port 993)
>                         (nnimap-stream ssl)))
> #+end_src
>
> gnus begins subscribing to *every* file in my home directory on the
> school machines as an imap mail folder.  Instead I would like to limit
> gnus to the ~/mail/ subdirectory of my home directory.  I found mention
> of this "default to user's home directory" aspect of uw-imap online [1].
>
> At first I thought this was a server side problem, but when subscribing
> to the same imap account using thunderbird the problem does not appear.
>
> Any suggestions as to how I can configure gnus to only subscribe to
> those folders in my ~/mail/ subfolder?
>
> Thanks -- Eric
>
> Footnotes: 
> [1]  http://wiki.dovecot.org/Migration/UW

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap namespace prefix
  2011-05-12 14:16 ` Eric Schulte
@ 2011-05-12 18:54   ` Ted Zlatanov
  2011-05-12 23:13     ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2011-05-12 18:54 UTC (permalink / raw)
  To: ding

On Thu, 12 May 2011 08:16:30 -0600 Eric Schulte <schulte.eric@gmail.com> wrote: 

ES> Just to follow up, I was able to work around this problem with the
ES> following changes to `nnimap-get-groups', which limit the LIST imap
ES> command to the ~/mail/ subdirectory of my home directory (the entirety
ES> of which was being served up by uw-imap).
...
ES> Since this option wasn't already present I assume this is a weird edge
ES> case peculiar to my school's server configuration and doesn't merit the
ES> addition of any new configuration parameters to gnus.

The IMAP server is supposed to advertise its prefix at connection time.
Can you look at the IMAP debug log (setq imap-debug t) and see?

Thanks
Ted




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap namespace prefix
  2011-05-12 18:54   ` Ted Zlatanov
@ 2011-05-12 23:13     ` Eric Schulte
  2011-05-13 14:52       ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-05-12 23:13 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Thu, 12 May 2011 08:16:30 -0600 Eric Schulte <schulte.eric@gmail.com> wrote: 
>
> ES> Just to follow up, I was able to work around this problem with the
> ES> following changes to `nnimap-get-groups', which limit the LIST imap
> ES> command to the ~/mail/ subdirectory of my home directory (the entirety
> ES> of which was being served up by uw-imap).
> ...
> ES> Since this option wasn't already present I assume this is a weird edge
> ES> case peculiar to my school's server configuration and doesn't merit the
> ES> addition of any new configuration parameters to gnus.
>
> The IMAP server is supposed to advertise its prefix at connection time.
> Can you look at the IMAP debug log (setq imap-debug t) and see?
>

I think the error is most likely on the server side as I've now talked
to other students who report similar problems with other clients.

I generated the following two logs, the first with my hacked
`nnimap-get-groups' and my gnus.eld and the second with the default
`nnimap-get-groups' and with my gnus.eld removed.

Best -- Eric

with tweaked `nnimap-get-groups' and my gnus.eld
--8<---------------cut here---------------start------------->8---
* 16 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1305207281] UID validity status
* OK [UIDNEXT 17] Predicted next UID
* FLAGS (%Answered %Flagged %Deleted %Draft %Seen)
* OK [PERMANENTFLAGS ()] Permanent flags
7 OK [READ-ONLY] EXAMINE completed
* 1 FETCH (UID 1 FLAGS (%Seen))
* 2 FETCH (UID 2 FLAGS (%Seen))
* 3 FETCH (UID 3 FLAGS (%Seen))
...
--8<---------------cut here---------------end--------------->8---

with normal `nnimap-get-groups' and no gnus.eld
--8<---------------cut here---------------start------------->8---
* LIST (%NoInferiors %UnMarked) "/" .bashrc
* LIST (%NoInferiors %UnMarked) "/" .cshrc
* LIST (%NoSelect %HasChildren) "/" .mozilla
* LIST (%NoInferiors %Marked) "/" .mozilla/appreg
* LIST (%NoSelect %HasChildren) "/" .mozilla/default
...
--8<---------------cut here---------------end--------------->8---

>
> Thanks
> Ted
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: imap namespace prefix
  2011-05-12 23:13     ` Eric Schulte
@ 2011-05-13 14:52       ` Ted Zlatanov
  0 siblings, 0 replies; 5+ messages in thread
From: Ted Zlatanov @ 2011-05-13 14:52 UTC (permalink / raw)
  To: ding

On Thu, 12 May 2011 17:13:33 -0600 Eric Schulte <schulte.eric@gmail.com> wrote: 

ES> Ted Zlatanov <tzz@lifelogs.com> writes:
>> The IMAP server is supposed to advertise its prefix at connection time.
>> Can you look at the IMAP debug log (setq imap-debug t) and see?
>> 

ES> I think the error is most likely on the server side as I've now talked
ES> to other students who report similar problems with other clients.
...
ES> I generated the following two logs, the first with my hacked
ES> `nnimap-get-groups' and my gnus.eld and the second with the default
ES> `nnimap-get-groups' and with my gnus.eld removed.
...
ES> * 16 EXISTS
ES> * 0 RECENT

I think the initial messages (around CAPABILITY) will specify the
server's prefix.  That's where the problem lies, most likely.

Ted




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-13 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-11 17:42 imap namespace prefix Eric Schulte
2011-05-12 14:16 ` Eric Schulte
2011-05-12 18:54   ` Ted Zlatanov
2011-05-12 23:13     ` Eric Schulte
2011-05-13 14:52       ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).