Gnus development mailing list
 help / color / mirror / Atom feed
* gnus fetching same mails again and again (pop)
@ 2012-04-12 10:16 Yagnesh Raghava Yakkala
  2012-04-12 10:55 ` Alberto Luaces
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-12 10:16 UTC (permalink / raw)
  To: ding


Hello,


I setup a pop mail-source two days ago, 

,----
| (setq 'mail-sources '(pop :server "pop.uni.server"
|                                    :user "me"))
`----

Gnus fetching new mails fine when first enter. but on the group buffer if
press g to see any further new mails, it is fetching the same mails first
again(duplicates). I don't know it's a problem with my server settings or a bug
in gnus.  Now I have 100 unread mails in which 80 of them are duplicates. (I
pressed "g" four times. stupid me).

- how can stop this duplicate fetching?
- is there any way I can delete those duplicates?

My gnus version is from Emacs trunk. (about a week ago.)

Thanks

-- 
YYR




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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 10:16 gnus fetching same mails again and again (pop) Yagnesh Raghava Yakkala
@ 2012-04-12 10:55 ` Alberto Luaces
  2012-04-12 16:11   ` Yagnesh Raghava Yakkala
  0 siblings, 1 reply; 24+ messages in thread
From: Alberto Luaces @ 2012-04-12 10:55 UTC (permalink / raw)
  To: ding

Yagnesh Raghava Yakkala writes:

> Hello,
>
>
> I setup a pop mail-source two days ago, 
>
> ,----
> | (setq 'mail-sources '(pop :server "pop.uni.server"
> |                                    :user "me"))
> `----
>
> Gnus fetching new mails fine when first enter. but on the group buffer if
> press g to see any further new mails, it is fetching the same mails first
> again(duplicates). I don't know it's a problem with my server settings or a bug
> in gnus.  Now I have 100 unread mails in which 80 of them are duplicates. (I
> pressed "g" four times. stupid me).
>
> - how can stop this duplicate fetching?
> - is there any way I can delete those duplicates?
>
> My gnus version is from Emacs trunk. (about a week ago.)

Check if you have pop3-leave-mail-on-server variable set to other thing
than nil. Otherwise, after fetching the mails, they won't we deleted and
will get downloaded again.

-- 
Alberto




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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 10:55 ` Alberto Luaces
@ 2012-04-12 16:11   ` Yagnesh Raghava Yakkala
  2012-04-12 17:07     ` Andreas Schwab
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-12 16:11 UTC (permalink / raw)
  To: Alberto Luaces; +Cc: ding


Hello Alberto,

Alberto Luaces <aluaces@udc.es> writes:

[...]
>
> Check if you have pop3-leave-mail-on-server variable set to other thing
> than nil. Otherwise, after fetching the mails, they won't we deleted and
> will get downloaded again.

That's it. But how can keep a backup copy on the server similar to
thunderbird.? 

Thank you.,
-- 
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 16:11   ` Yagnesh Raghava Yakkala
@ 2012-04-12 17:07     ` Andreas Schwab
  2012-04-12 18:14       ` Yagnesh Raghava Yakkala
  0 siblings, 1 reply; 24+ messages in thread
From: Andreas Schwab @ 2012-04-12 17:07 UTC (permalink / raw)
  To: Yagnesh Raghava Yakkala; +Cc: Alberto Luaces, ding

Yagnesh Raghava Yakkala <yagnesh@live.com> writes:

> That's it. But how can keep a backup copy on the server similar to
> thunderbird.? 

Does the mailbox also have an IMAP interface?  That allows more control
over what to do with the fetched mail.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 17:07     ` Andreas Schwab
@ 2012-04-12 18:14       ` Yagnesh Raghava Yakkala
  2012-04-12 18:37         ` Lars Magne Ingebrigtsen
                           ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-12 18:14 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Alberto Luaces, ding


Hello Andreas,

Andreas Schwab <schwab@linux-m68k.org> writes:

> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
>
>> That's it. But how can keep a backup copy on the server similar to
>> thunderbird.? 
>
> Does the mailbox also have an IMAP interface?  That allows more control
> over what to do with the fetched mail.

Unfortunately no. Only pop interface. Thunderbird can keep mails on server, is
not it possible with gnus.? 

Thanks.,
-- 
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 18:14       ` Yagnesh Raghava Yakkala
@ 2012-04-12 18:37         ` Lars Magne Ingebrigtsen
  2012-04-13  5:45           ` Yagnesh Raghava Yakkala
  2012-04-13  2:20         ` XeCycle
  2012-04-13  4:17         ` gnus fetching same mails again and again (pop) Binjo
  2 siblings, 1 reply; 24+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-12 18:37 UTC (permalink / raw)
  To: Yagnesh Raghava Yakkala; +Cc: Andreas Schwab, Alberto Luaces, ding

Yagnesh Raghava Yakkala <yagnesh@live.com> writes:

> Unfortunately no. Only pop interface. Thunderbird can keep mails on
> server, is not it possible with gnus.?

No, Gnus doesn't support leaving the mail on the server.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 18:14       ` Yagnesh Raghava Yakkala
  2012-04-12 18:37         ` Lars Magne Ingebrigtsen
@ 2012-04-13  2:20         ` XeCycle
  2012-04-13  5:35           ` Yagnesh Raghava Yakkala
  2012-04-13  4:17         ` gnus fetching same mails again and again (pop) Binjo
  2 siblings, 1 reply; 24+ messages in thread
From: XeCycle @ 2012-04-13  2:20 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

Yagnesh Raghava Yakkala <yagnesh@live.com> writes:

> Hello Andreas,
>
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
>>
>>> That's it. But how can keep a backup copy on the server similar to
>>> thunderbird.? 
>>
>> Does the mailbox also have an IMAP interface?  That allows more control
>> over what to do with the fetched mail.
>
> Unfortunately no. Only pop interface. Thunderbird can keep mails on server, is
> not it possible with gnus.? 

I use `getmail'.  Using an external tool also gives the
possibility to crontab it.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 18:14       ` Yagnesh Raghava Yakkala
  2012-04-12 18:37         ` Lars Magne Ingebrigtsen
  2012-04-13  2:20         ` XeCycle
@ 2012-04-13  4:17         ` Binjo
  2012-04-13  5:38           ` Yagnesh Raghava Yakkala
  2 siblings, 1 reply; 24+ messages in thread
From: Binjo @ 2012-04-13  4:17 UTC (permalink / raw)
  To: ding; +Cc: Yagnesh Raghava Yakkala

On 04/13/2012, at 02:14, Yagnesh Raghava Yakkala wrote:

[...]

>
>Unfortunately no. Only pop interface. Thunderbird can keep mails on server, is
>not it possible with gnus.? 
>

IIRC, the `pop3-movemail' retrieves the mail from the 1 to the last mail on the
server, that's why get same mails over and over again.

There's no options for Gnus to get from the latest mail, only if totally rewrite
the `pop3-movemail'. ;)

I once wrote a workaround, which calculate local mails' count, and compare with
the server's, and start retrieving from the latest one. It still may mess up, if
delete/copy local mail though. :(

HTH,

--8<---------------cut here---------------start------------->8---
;;; fuck pop3-movemail
;;; FIXME or get the latest index from "~/Mail/active"  ??
(defun binjo-pop3-latest-index (dir-name)
  "Get latest index to be fetched from DIR-NAME."
  (let ((n 1)
        file-name)
    (mapc (lambda (sub-dir-name)
            (unless (or (string= "." sub-dir-name)
                        (string= ".." sub-dir-name))
              (setq file-name (concat dir-name sub-dir-name "/.overview"))
              (if (file-exists-p file-name)
                  (with-temp-buffer
                    (insert-file-literally file-name)
                    (goto-char (point-max))
                    (forward-line -1)
                    (setq n (+ n (string-to-number
                                  (car (split-string
                                        (thing-at-point 'line))))))))))
          (directory-files dir-name))
    n))

;; TODO stick to the latest pop3-movemail, 20101015
(eval-after-load "pop3"
  '(defun pop3-movemail (&optional crashbox)
     "Transfer contents of a maildrop to the specified CRASHBOX.

A dirty hack to let `pop3-movemail' fetch newest mail if '.overview' exists."
     (or crashbox (setq crashbox (expand-file-name "~/.crashbox")))
     (let* ((process (pop3-open-server pop3-mailhost pop3-port))
            (crashbuf (get-buffer-create " *pop3-retr*"))
            (n 1)
            message-count
            (pop3-password pop3-password))
       (if (file-exists-p "~/Mail/mail/")
           (setq n (binjo-pop3-latest-index "~/Mail/mail/")))
       ;; for debugging only
       (if pop3-debug (switch-to-buffer (process-buffer process)))
       ;; query for password
       (if (and pop3-password-required (not pop3-password))
           (setq pop3-password
                 (read-passwd (format "Password for %s: " pop3-maildrop))))
       (cond ((equal 'apop pop3-authentication-scheme)
              (pop3-apop process pop3-maildrop))
             ((equal 'pass pop3-authentication-scheme)
              (pop3-user process pop3-maildrop)
              (pop3-pass process))
             (t (error "Invalid POP3 authentication scheme")))
       (setq message-count (car (pop3-stat process)))
       (unwind-protect
           (while (<= n message-count)
             (message "Retrieving message %d of %d from %s..."
                      n message-count pop3-mailhost)
             (pop3-retr process n crashbuf)
             (save-excursion
               (set-buffer crashbuf)
               (let ((coding-system-for-write 'binary))
                 (write-region (point-min) (point-max) crashbox t 'nomesg))
               (set-buffer (process-buffer process))
               (while (> (buffer-size) 5000)
                 (goto-char (point-min))
                 (forward-line 50)
                 (delete-region (point-min) (point))))
             (unless pop3-leave-mail-on-server
               (pop3-dele process n))
             (setq n (+ 1 n))
             (pop3-accept-process-output process))
         (when (and pop3-leave-mail-on-server
                    (> n 1))
;;            (message "pop3.el doesn't support UIDL.  Setting `pop3-leave-mail-on-server'
;; to %s might not give the result you'd expect." pop3-leave-mail-on-server)
           (sit-for 1))
         (pop3-quit process))
       (kill-buffer crashbuf))
     t)
)
--8<---------------cut here---------------end--------------->8---



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-13  2:20         ` XeCycle
@ 2012-04-13  5:35           ` Yagnesh Raghava Yakkala
  2012-04-13  6:17             ` XeCycle
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-13  5:35 UTC (permalink / raw)
  To: XeCycle; +Cc: ding


Hello ,

XeCycle <XeCycle@Gmail.com> writes:

> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
[...]
>> Unfortunately no. Only pop interface. Thunderbird can keep mails on server, is
>> not it possible with gnus.? 
>
> I use `getmail'.  Using an external tool also gives the
> possibility to crontab it.

Thanks for mentioning it, I think I would go with this. Could you share your
configuration at least on gnus side.?


Thanks.,
-- 
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-13  4:17         ` gnus fetching same mails again and again (pop) Binjo
@ 2012-04-13  5:38           ` Yagnesh Raghava Yakkala
  0 siblings, 0 replies; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-13  5:38 UTC (permalink / raw)
  To: Binjo; +Cc: ding


Hello Binjo,

Binjo <binjo.cn@gmail.com> writes:

> On 04/13/2012, at 02:14, Yagnesh Raghava Yakkala wrote:
>
> [...]
>
>>
>>Unfortunately no. Only pop interface. Thunderbird can keep mails on server, is
>>not it possible with gnus.? 
>>
>
> IIRC, the `pop3-movemail' retrieves the mail from the 1 to the last mail on the
> server, that's why get same mails over and over again.
>
> There's no options for Gnus to get from the latest mail, only if totally rewrite
> the `pop3-movemail'. ;)
>
> I once wrote a workaround, which calculate local mails' count, and compare with
> the server's, and start retrieving from the latest one. It still may mess up, if
> delete/copy local mail though. :(
>
> HTH,
>
[...]
>

Thanks for sharing the hack., I like your starting comment in your snippet. I
think I will try rely on external tool as XeCycle mentioned.


Thanks.,
-- 
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-12 18:37         ` Lars Magne Ingebrigtsen
@ 2012-04-13  5:45           ` Yagnesh Raghava Yakkala
  2012-04-13 10:56             ` Steinar Bang
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-13  5:45 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Andreas Schwab, Alberto Luaces, ding


Hello Lars,

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
>
>> Unfortunately no. Only pop interface. Thunderbird can keep mails on
>> server, is not it possible with gnus.?
>
> No, Gnus doesn't support leaving the mail on the server.

That's sad. Thank you for letting me know about that. 

Thanks.,
-- 
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-13  5:35           ` Yagnesh Raghava Yakkala
@ 2012-04-13  6:17             ` XeCycle
  2012-04-16  5:19               ` Yagnesh Raghava Yakkala
  0 siblings, 1 reply; 24+ messages in thread
From: XeCycle @ 2012-04-13  6:17 UTC (permalink / raw)
  To: Yagnesh Raghava Yakkala; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

Yagnesh Raghava Yakkala <yagnesh@live.com> writes:

> Hello ,
>
> XeCycle <XeCycle@Gmail.com> writes:
>
>> Yagnesh Raghava Yakkala <yagnesh@live.com> writes:
> [...]
>>> Unfortunately no. Only pop interface. Thunderbird can keep
>>> mails on server, is
>>> not it possible with gnus.? 
>>
>> I use `getmail'.  Using an external tool also gives the
>> possibility to crontab it.
>
> Thanks for mentioning it, I think I would go with this. Could you share your
> configuration at least on gnus side.?
>
>
> Thanks.,

getmailrc:
--8<---------------cut here---------------start------------->8---
[retriever]
type = SimplePOP3SSLRetriever
server = pop.gmail.com
username = xecycle@gmail.com
port = 995
password = my_password

[destination]
type = MDA_external
path = /usr/bin/procmail

[options]
read_all = False
--8<---------------cut here---------------end--------------->8---

Here I tell getmail to use procmail.

.procmailrc:
--8<---------------cut here---------------start------------->8---
MAILDIR=$HOME/Mail/.incoming
DEFAULT=$MAILDIR/uninteresting/
LOGFILE=$MAILDIR/.procmail.log

:0:
* ^TOxecycle@gmail.com
inbox/
--8<---------------cut here---------------end--------------->8---

Mails not addressed to me are usually list mails, so they go to
uninteresting.  My config is indeed longer than this.  This is
used primarily for desktop notifications, so that it doesn't
inform me of every mail.

--8<---------------cut here---------------start------------->8---
(setq mail-sources '((maildir :path "~/Mail/.incoming/inbox")
                     (maildir :path "~/Mail/.incoming/uninteresting")))
(setq mail-source-delete-incoming t)
--8<---------------cut here---------------end--------------->8---

Then I resplit mail in Gnus to be more specific.

The procmail step is optional.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: gnus fetching same mails again and again (pop)
  2012-04-13  5:45           ` Yagnesh Raghava Yakkala
@ 2012-04-13 10:56             ` Steinar Bang
  0 siblings, 0 replies; 24+ messages in thread
From: Steinar Bang @ 2012-04-13 10:56 UTC (permalink / raw)
  To: ding

>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:
> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

>> No, Gnus doesn't support leaving the mail on the server.

> That's sad. Thank you for letting me know about that. 

If you are on a linux or unix machine, you can use fetchmail to deliver
email locally, and then read it in Gnus as local email.  Fetchmail can
be set up to keep email on a POP3 server.

If you can, I suggest you get IMAP access to your account, because
nnimap is working pretty well now.




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

* Re: gnus fetching same mails again and again (pop)
  2012-04-13  6:17             ` XeCycle
@ 2012-04-16  5:19               ` Yagnesh Raghava Yakkala
  2012-04-16  6:05                 ` XeCycle
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-16  5:19 UTC (permalink / raw)
  To: XeCycle; +Cc: ding


Hello XeCycle,

Thanks for sharing the configuration.  I finally tried getmail. Its working
very well.

It seems getmail stores old mail information in ~/.getmail folder but not on
the server. So the problem is now how to sync the state of getmail between
two computers.

Thanks.,
-- 
ఎందరో మహానుభావులు అందరికి వందనములు
YYR

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

* Re: gnus fetching same mails again and again (pop)
  2012-04-16  5:19               ` Yagnesh Raghava Yakkala
@ 2012-04-16  6:05                 ` XeCycle
  2012-04-16  6:58                   ` Yagnesh Raghava Yakkala
  0 siblings, 1 reply; 24+ messages in thread
From: XeCycle @ 2012-04-16  6:05 UTC (permalink / raw)
  To: Yagnesh Raghava Yakkala; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

Yagnesh Raghava Yakkala <yagnesh@live.com> writes:

> Hello XeCycle,
>
> Thanks for sharing the configuration.  I finally tried getmail. Its working
> very well.

Glad to hear.

> It seems getmail stores old mail information in ~/.getmail folder but not on
> the server. So the problem is now how to sync the state of getmail between
> two computers.

If you do need this, offlineimap should be a better tool.  I have
only one computer, I didn't use it.

-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: gnus fetching same mails again and again (pop)
  2012-04-16  6:05                 ` XeCycle
@ 2012-04-16  6:58                   ` Yagnesh Raghava Yakkala
  2012-04-16  9:06                     ` Steinar Bang
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-16  6:58 UTC (permalink / raw)
  To: XeCycle; +Cc: ding


Hello XeCycle,

XeCycle <xecycle@gmail.com> writes:
[...]
>> It seems getmail stores old mail information in ~/.getmail folder but not on
>> the server. So the problem is now how to sync the state of getmail between
>> two computers.
>
> If you do need this, offlineimap should be a better tool.

I see offlineimap doesn't work with pop account. After all, I see the best
solution to deal with POP accounts, creating IMAP server.

Hotmail/Uni(pop) -> getmail -> Maildir -> Dovecot -> gnus IMAP.

I couldn't get Dovecot working. Can anyone walk me through dovecot setup.?

Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



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

* Re: gnus fetching same mails again and again (pop)
  2012-04-16  6:58                   ` Yagnesh Raghava Yakkala
@ 2012-04-16  9:06                     ` Steinar Bang
  2012-04-16  9:31                       ` Setting up Dovecot [Was => Re: gnus fetching same mails again and again (pop)] Yagnesh Raghava Yakkala
  0 siblings, 1 reply; 24+ messages in thread
From: Steinar Bang @ 2012-04-16  9:06 UTC (permalink / raw)
  To: ding

>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:

> I couldn't get Dovecot working. 

On what platform did you try to install dovecot?  And what steps did you
do when trying to install it?




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

* Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16  9:06                     ` Steinar Bang
@ 2012-04-16  9:31                       ` Yagnesh Raghava Yakkala
  2012-04-16 13:06                         ` Steinar Bang
  2012-04-16 23:55                         ` Jonas Hörsch
  0 siblings, 2 replies; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-16  9:31 UTC (permalink / raw)
  To: ding


Hello Steinar,

Steinar Bang <sb@dod.no> writes:

>>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:
>
>> I couldn't get Dovecot working.
>
> On what platform did you try to install dovecot?  And what steps did you
> do when trying to install it?


Thanks for the reply., I am on GNU/Linux (Ubuntu).

These are the things I tried.

- installed dovecot
  ,----
  |   sudo apt-get install dovecot-common dovecot-imapd dovecot-pop3d
  `----

- edited /etc/dovecot/dovecot.conf
  ,----
  | mail_location = maildir:/home/%u/Maildir
  `----

- restarted dovecot
  ,----
  | raghava-note:/ $ sudo service dovecot restart
  | dovecot start/running, process 8639
  `----

- confirm dovecot is running
  ,----
  | raghava-note:~$ ps auwx | grep dovecot
  | root      8639  0.0  0.0  17304  1316 ?        Ss   17:40   0:00 /usr/sbin/dovecot -F -c /etc/dovecot/dovecot.conf
  | dovecot   8645  0.0  0.0   8824   896 ?        S    17:40   0:00 dovecot/anvil
  | root      8646  0.0  0.0   8948  1036 ?        S    17:40   0:00 dovecot/log
  | root      8648  0.0  0.0  11004  3116 ?        S    17:40   0:00 dovecot/config
  `----

  followed this guide to test the installation
  http://wiki.dovecot.org/TestInstallation

  So far so good. (how to authenticate from client to dovecot then?)

- Gnus Setup

  ,----
  | (setq imap-shell-program "/usr/lib/dovecot/imap")
  |
  | (add-to-list 'gnus-secondary-select-methods
  |              '(nnimap "localimap"
  |                       (nnimap-address "localhost")
  |                       (nnimap-stream shell)))
  `----

- ~/.authinfo (I think this is not the way to do it)
  ,----
  | machine localhost login SystemUserid password systemPassword port 143
  `----

- Finally enter into Gnus.

  I am getting following warning 
  ,----
  | Warning: Opening nnimap server on localimap...failed: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  | ; Unable to open server nnimap+localimap due to: Buffer  *nnimap localhost nil  *nntpd** has no process
  `----

  *Server* buffer
  ,----
  | {nnfolder:archive} (opened)
  | {nndraft:} (opened)
  | {nnml:} (opened)
  | {nnimap:yagmsc} (opened)
  | {nnimap:localimap} (denied)    <------------------------
  | {nntp:news.gmane.org} (opened)
  `----

  
Probably I am missing auth setup for the dovecot.


Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16  9:31                       ` Setting up Dovecot [Was => Re: gnus fetching same mails again and again (pop)] Yagnesh Raghava Yakkala
@ 2012-04-16 13:06                         ` Steinar Bang
  2012-04-17  5:33                           ` Yagnesh Raghava Yakkala
  2012-04-16 23:55                         ` Jonas Hörsch
  1 sibling, 1 reply; 24+ messages in thread
From: Steinar Bang @ 2012-04-16 13:06 UTC (permalink / raw)
  To: ding

>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:

> Thanks for the reply., I am on GNU/Linux (Ubuntu).

Ok.  I'm using debian, which should be very similar.

> These are the things I tried.

> - installed dovecot
>   ,----
>  | sudo apt-get install dovecot-common dovecot-imapd dovecot-pop3d
>   `----

Ok.  Sounds right.

Note that
 apt-get install dovecot-imapd
is probably enough since it will pull in dovecot-common, and unless you
plan to use POP3 there is no point in pulling it in.

> - edited /etc/dovecot/dovecot.conf
>   ,----
>  | mail_location = maildir:/home/%u/Maildir
>   `----

Ok.  I have no setting of mail_location, so I'm using the default, which
appears to be maildir (maildir was the default back in 2008 when I
started using dovecot, and apparently still is).

My changes to the config file, are:
 - enabling imaps
 - using cram-md5 authentication

> - restarted dovecot
[snip!]

> - confirm dovecot is running
[snip!]

>   followed this guide to test the installation
>   http://wiki.dovecot.org/TestInstallation

>   So far so good. (how to authenticate from client to dovecot then?)

> - Gnus Setup

>   ,----
>  | (setq imap-shell-program "/usr/lib/dovecot/imap")
>  | 
>  | (add-to-list 'gnus-secondary-select-methods
>  |              '(nnimap "localimap"
>  |                       (nnimap-address "localhost")
>  |                       (nnimap-stream shell)))
>   `----

I've never used shell with dovecot.  I used it back in the day, when I
was using UoW imapd (2001 and earlier).

My definition looks like this:
      '((nnimap "private"
		(nnimap-address "imap.mydomain.com")
                (nnimap-stream ssl))

> - ~/.authinfo (I think this is not the way to do it)

Not anymore, it isn't.  But I'm still using it, and it works for me.

>   ,----
>  | machine localhost login SystemUserid password systemPassword port 143
>   `----

Hm... if you are using shell, and you are using an imapd that can be
started as yourself, you shouldn't need to have the authinfo
information.  What used to happen here is that the imapd is actually
invoked on the shell, and Gnus talks to it using pipes.  Not sure if
this is still the case...?

Also, if the above still holds, the password probably wouldn't be looked
up, since the port number is part of the lookup, and you will not be
talking to the imapd using a port.

> - Finally enter into Gnus.

>   I am getting following warning 
>   ,----
>  | Warning: Opening nnimap server on localimap...failed: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>  | ; Unable to open server nnimap+localimap due to: Buffer  *nnimap localhost nil  *nntpd** has no process
>   `----

Hm... unsuccessful in finding and starting the imapd?  Maybe dovecot
isn't indented to be run in this manner?  Maybe it won't start up
because someone else (dovecot or inetd) are already hugging port 143?

If you do this, instead:
 (add-to-list 'gnus-secondary-select-methods
              '(nnimap "localimap"
                       (nnimap-address "localhost")))

Then it should find your authinfo and connect to whatever's listening on
port 143.





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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16  9:31                       ` Setting up Dovecot [Was => Re: gnus fetching same mails again and again (pop)] Yagnesh Raghava Yakkala
  2012-04-16 13:06                         ` Steinar Bang
@ 2012-04-16 23:55                         ` Jonas Hörsch
  2012-04-17  2:07                           ` Rasmus
  2012-04-17  5:43                           ` Yagnesh Raghava Yakkala
  1 sibling, 2 replies; 24+ messages in thread
From: Jonas Hörsch @ 2012-04-16 23:55 UTC (permalink / raw)
  To: ding

On Mon, Apr 16 2012, Yagnesh Raghava Yakkala wrote:

>>
>>> I couldn't get Dovecot working.
>>
>
> - restarted dovecot
>   ,----
>   | raghava-note:/ $ sudo service dovecot restart
>   | dovecot start/running, process 8639
>   `----

it should not be necessary: if you want to invoke it via nnimap-stream
shell: it doesn't even have to be running. i don't have to start the
dovecot server to use /usr/lib/dovecot/imap.f

>
>   ,----
>   | (setq imap-shell-program "/usr/lib/dovecot/imap")
>   |
>   | (add-to-list 'gnus-secondary-select-methods
>   |              '(nnimap "localimap"
>   |                       (nnimap-address "localhost")
>   |                       (nnimap-stream shell)))


i'm using dovecot via shell invocation quite successfully for some time
now. this is what i use as gnus-setup. so basically the same you already
have minus nnimap-address and plus the stderr suppression:


  (add-to-list 'gnus-secondary-select-methods
               '(nnimap "dovecot"
                        (nnimap-stream shell)
                        (nnir-search-engine imap)))
  
  (setq imap-shell-program '("/usr/lib/dovecot/imap 2> /dev/null"))


i don't need any additional authentification. no password, username,
whatsoever.

you might want to try what happens if you invoke /usr/lib/dovecot/imap
in any shell, for me this looks like:

* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in as coroa


i'm using dovecot 2.1.4 on archlinux. i read that for some older
versions you actually want to call it via

/usr/sbin/dovecot --exec-mail imap

instead of /usr/lib/do...


just some random, perhaps helpful information by my side,

have fun,
jonas




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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16 23:55                         ` Jonas Hörsch
@ 2012-04-17  2:07                           ` Rasmus
  2012-04-17  5:43                           ` Yagnesh Raghava Yakkala
  1 sibling, 0 replies; 24+ messages in thread
From: Rasmus @ 2012-04-17  2:07 UTC (permalink / raw)
  To: ding

coroa@online.de (Jonas Hörsch) writes:

> i'm using dovecot via shell invocation quite successfully for some time
> now. this is what i use as gnus-setup. so basically the same you already
> have minus nnimap-address and plus the stderr suppression:

This is very similar to what I do as well.  I recently switched from
using the whole (Arch) dovecot suit to just invoking the imap program:

#+beginₛrc emacs-lisp
(setq my/imap-method
      `(nnimap "mail"
               (nnimap-stream shell)
               (nnimap-shell-program "MAIL=maildir:$HOME/mail /usr/lib/dovecot/imap")))

(setq gnus-select-method '(nnml ""))

(add-to-list 'gnus-secondary-select-methods my/imap-method)
#+endₛrc

-- 
When the facts change, I change my mind. What do you do, sir?




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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16 13:06                         ` Steinar Bang
@ 2012-04-17  5:33                           ` Yagnesh Raghava Yakkala
  2012-04-17  6:28                             ` Steinar Bang
  0 siblings, 1 reply; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-17  5:33 UTC (permalink / raw)
  To: ding


Hello Steinar,

Steinar Bang <sb@dod.no> writes:

>>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:
>
[...]
>>   `----
>
> Hm... unsuccessful in finding and starting the imapd?  Maybe dovecot
> isn't indented to be run in this manner?  Maybe it won't start up
> because someone else (dovecot or inetd) are already hugging port 143?
>
> If you do this, instead:
>  (add-to-list 'gnus-secondary-select-methods
>               '(nnimap "localimap"
>                        (nnimap-address "localhost")))
>
> Then it should find your authinfo and connect to whatever's listening on
> port 143.

Wow.. That's it. I see localimap is connected.

I am not sure I understand all the terminology or how it is working,
nevertheless it is working. Now I need to configure dovecot to serve all my
Maildir(s) which are fetched by /getmail/.

Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-16 23:55                         ` Jonas Hörsch
  2012-04-17  2:07                           ` Rasmus
@ 2012-04-17  5:43                           ` Yagnesh Raghava Yakkala
  1 sibling, 0 replies; 24+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-04-17  5:43 UTC (permalink / raw)
  To: Jonas Hörsch; +Cc: ding


Hello Jonas,

coroa@online.de (Jonas Hörsch) writes:

> On Mon, Apr 16 2012, Yagnesh Raghava Yakkala wrote:
>
>>>
>>>> I couldn't get Dovecot working.
>>>
>>
>> - restarted dovecot
>>   ,----
>>   | raghava-note:/ $ sudo service dovecot restart
>>   | dovecot start/running, process 8639
>>   `----
>
> it should not be necessary: if you want to invoke it via nnimap-stream
> shell: it doesn't even have to be running. i don't have to start the
> dovecot server to use /usr/lib/dovecot/imap.f
>
That sounds reasonable.

>
[...]
>
>   (add-to-list 'gnus-secondary-select-methods
>                '(nnimap "dovecot"
>                         (nnimap-stream shell)
>                         (nnir-search-engine imap)))
>
>   (setq imap-shell-program '("/usr/lib/dovecot/imap 2> /dev/null"))
>
>
> i don't need any additional authentification. no password, username,
> whatsoever.
>
> you might want to try what happens if you invoke /usr/lib/dovecot/imap
> in any shell, for me this looks like:
>
> * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in as coroa

I see similar.

,----
| * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in as yagnesh
`----

>
>
> i'm using dovecot 2.1.4 on archlinux. i read that for some older
> versions you actually want to call it via

My dovecot version is 2.0.13.

At the end,
gnus *Server* buffer is telling me


  {nnimap:localimap} (denied)

with a warning

Warning: Opening nnimap server on localimap...failed: ; Unable to open server nnimap+localimap due to: Buffer  *nnimap localimap nil  *nntpd** has no process


How can I see why Emacs shell process is denied.?


Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR



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

* Re: Setting up Dovecot  [Was => Re: gnus fetching same mails again and again (pop)]
  2012-04-17  5:33                           ` Yagnesh Raghava Yakkala
@ 2012-04-17  6:28                             ` Steinar Bang
  0 siblings, 0 replies; 24+ messages in thread
From: Steinar Bang @ 2012-04-17  6:28 UTC (permalink / raw)
  To: ding

>>>>> Yagnesh Raghava Yakkala <yagnesh@live.com>:

> I am not sure I understand all the terminology or how it is working,

Basically it's like this: if you are connecting to the IMAP server that
listens to a TCP/IP port, you will need and use the authentication
information (from the viewpoint of dovecot you are connecting to it from
the internet (even if it is just localhost)).

But if you start the imap daemon as a program and connects its standard
out and in to pipes, and talk to it through the pipes, you don't need
any other authentication, because it's just a program you yourself has
started, reading files under your home directory (ie. owned by you).




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

end of thread, other threads:[~2012-04-17  6:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 10:16 gnus fetching same mails again and again (pop) Yagnesh Raghava Yakkala
2012-04-12 10:55 ` Alberto Luaces
2012-04-12 16:11   ` Yagnesh Raghava Yakkala
2012-04-12 17:07     ` Andreas Schwab
2012-04-12 18:14       ` Yagnesh Raghava Yakkala
2012-04-12 18:37         ` Lars Magne Ingebrigtsen
2012-04-13  5:45           ` Yagnesh Raghava Yakkala
2012-04-13 10:56             ` Steinar Bang
2012-04-13  2:20         ` XeCycle
2012-04-13  5:35           ` Yagnesh Raghava Yakkala
2012-04-13  6:17             ` XeCycle
2012-04-16  5:19               ` Yagnesh Raghava Yakkala
2012-04-16  6:05                 ` XeCycle
2012-04-16  6:58                   ` Yagnesh Raghava Yakkala
2012-04-16  9:06                     ` Steinar Bang
2012-04-16  9:31                       ` Setting up Dovecot [Was => Re: gnus fetching same mails again and again (pop)] Yagnesh Raghava Yakkala
2012-04-16 13:06                         ` Steinar Bang
2012-04-17  5:33                           ` Yagnesh Raghava Yakkala
2012-04-17  6:28                             ` Steinar Bang
2012-04-16 23:55                         ` Jonas Hörsch
2012-04-17  2:07                           ` Rasmus
2012-04-17  5:43                           ` Yagnesh Raghava Yakkala
2012-04-13  4:17         ` gnus fetching same mails again and again (pop) Binjo
2012-04-13  5:38           ` Yagnesh Raghava Yakkala

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).