Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* delete downloaded marked emails after specific days & pop3 advice
@ 2022-12-06  6:19 jindam, vani
  2022-12-07  0:30 ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: jindam, vani @ 2022-12-06  6:19 UTC (permalink / raw)
  To: info-gnus-english

after much trials, i found its impossible to run
dovecot on debian 11 on userland (1). i have a
copy of gnus manual (by lars magne, 1995-2015,
no version). recently disvovered check paren
for looking errors on .gnus

i have few questions:

(a) is it possible to download all emails on my
local machine, i dont want to retain email copies
on server
(b) do i have to specify all email directories
on .gnus for downloading, ex: spam, draft
(c) how do i auto expunge all marked emails on
.gnus or mbsync.rc after specific period
(d) seriously, reconsidering to use getmail
to fetch all emails through pop3, is it good
idea. pop3 supports or recognises only one
directory —inbox & does it mean it will include
spam emails in inbox?

* mbsync.rc:
IMAPAccount disroot
Host disroot.org
User jindam.vani@disroot.org
SSLType IMAPS
SSLVersions TLSv1.2

# you may have to tweak the awk here + filename to your netrc/authinfo:
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d $HOME/.netrc.gpg | 
awk '$2==\"mail.messagingengine.com\" && $4==\"me@fastmail.com\" {print 
$6;exit(0)}'"
# Port 992
# Port 992 has a "flat" hierarchy; use with
# mail_location = maildir:~/.Maildir/:LAYOUT=fs:INBOX=~/.Maildir/INBOX
# in dovecot (see also MaildirStore.Inbox below)

IMAPStore disroot-remote
Account disroot

MaildirStore disroot-local
# The trailing "/" is meaningful
Path ~/.Maildir/
Inbox ~/.Maildir/INBOX
SubFolders Legacy

Channel disroot
Master :disroot-remote:
Slave :disroot-local:
Patterns *
Create Slave
Sync All
Expunge Both
SyncState *

* .gnus:
(setq gnus-select-method '(nnnil ""))

(add-to-list 'gnus-secondary-select-methods
              '(nnmaildir ""
               (directory "/home/jin/.Maildir/")
               (get-new-mail t)
               (directory-files nnheader-directory-files-safe)))

(setq mail-user-agent 'gnus-user-agent)
(setq read-mail-command 'gnus)


(1) https://github.com/CypherpunkArmory/UserLAnd

regards,
jindam, vani

-- 
toots: @jindam_vani@c.im
others: en.wikipedia.org/wik//User:Jindam_vani


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

* Re: delete downloaded marked emails after specific days & pop3 advice
  2022-12-06  6:19 delete downloaded marked emails after specific days & pop3 advice jindam, vani
@ 2022-12-07  0:30 ` Eric Abrahamsen
  2022-12-07  7:41   ` Adam Sjøgren
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2022-12-07  0:30 UTC (permalink / raw)
  To: jindam, vani; +Cc: info-gnus-english

"jindam, vani" <jindam.vani@disroot.org> writes:

> after much trials, i found its impossible to run
> dovecot on debian 11 on userland (1). i have a
> copy of gnus manual (by lars magne, 1995-2015,
> no version). recently disvovered check paren
> for looking errors on .gnus
>
> i have few questions:
>
> (a) is it possible to download all emails on my
> local machine, i dont want to retain email copies
> on server

mbsync doesn't offer this: the only available setting is the Sync
directive in the config file, and that doesn't allow deleting messages
remotely but not locally. This sounds more like using pop3 as a
mail-source, with the :leave setting at `nil'.

> (b) do i have to specify all email directories
> on .gnus for downloading, ex: spam, draft

With "Patterns *" in your mbsync config, mbsync will sync all folders.
Gnus will make all those folders available through the nnmaildir
backend, though you can also subscribe/unsubscribe to them within Gnus, so you
can choose what you see.

> (c) how do i auto expunge all marked emails on
> .gnus or mbsync.rc after specific period

See the "Expiring Mail" section of the Gnus manual. With the settings
you've shown below, when Gnus eventually deletes a message that deletion
will get synced to the server, as well.

> (d) seriously, reconsidering to use getmail
> to fetch all emails through pop3, is it good
> idea. pop3 supports or recognises only one
> directory —inbox & does it mean it will include
> spam emails in inbox?

If you don't care about the state of the server, and would prefer to not
leave messages there, then yes I think using a pop3 mail-source might be
a better option than mbsync. You can still use nnmaildir locally, with
split rules that send incoming mail there.

I don't use this and I don't know if pop will pull messages from
multiple folders; the docs don't mention any relevant config.

Note that you've got this in your nnmaildir config:

(get-new-mail t)

That *only* comes into play if you're using mail sources. That means
that given the config below you don't need it: mbsync will add messages
to nnmaildir, which nnmaildir will detect automatically.

> * mbsync.rc:
> IMAPAccount disroot
> Host disroot.org
> User jindam.vani@disroot.org
> SSLType IMAPS
> SSLVersions TLSv1.2
>
> # you may have to tweak the awk here + filename to your netrc/authinfo:
> # PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d $HOME/.netrc.gpg |
>   awk '$2==\"mail.messagingengine.com\" && $4==\"me@fastmail.com\"
>   {print $6;exit(0)}'"
> # Port 992
> # Port 992 has a "flat" hierarchy; use with
> # mail_location = maildir:~/.Maildir/:LAYOUT=fs:INBOX=~/.Maildir/INBOX
> # in dovecot (see also MaildirStore.Inbox below)
>
> IMAPStore disroot-remote
> Account disroot
>
> MaildirStore disroot-local
> # The trailing "/" is meaningful
> Path ~/.Maildir/
> Inbox ~/.Maildir/INBOX
> SubFolders Legacy
>
> Channel disroot
> Master :disroot-remote:
> Slave :disroot-local:
> Patterns *
> Create Slave
> Sync All
> Expunge Both
> SyncState *
>
> * .gnus:
> (setq gnus-select-method '(nnnil ""))
>
> (add-to-list 'gnus-secondary-select-methods
>              '(nnmaildir ""
>               (directory "/home/jin/.Maildir/")
>               (get-new-mail t)
>               (directory-files nnheader-directory-files-safe)))
>
> (setq mail-user-agent 'gnus-user-agent)
> (setq read-mail-command 'gnus)
>
>
> (1) https://github.com/CypherpunkArmory/UserLAnd
>
> regards,
> jindam, vani


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

* Re: delete downloaded marked emails after specific days & pop3 advice
  2022-12-07  0:30 ` Eric Abrahamsen
@ 2022-12-07  7:41   ` Adam Sjøgren
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Sjøgren @ 2022-12-07  7:41 UTC (permalink / raw)
  To: info-gnus-english

Eric writes:

>> (d) seriously, reconsidering to use getmail
>> to fetch all emails through pop3, is it good
>> idea. pop3 supports or recognises only one
>> directory —inbox & does it mean it will include
>> spam emails in inbox?
>
> If you don't care about the state of the server, and would prefer to not
> leave messages there, then yes I think using a pop3 mail-source might be
> a better option than mbsync. You can still use nnmaildir locally, with
> split rules that send incoming mail there.
>
> I don't use this and I don't know if pop will pull messages from
> multiple folders; the docs don't mention any relevant config.

I think POP is from before mail folders on the mail server was a thing?

You can also "use IMAP as POP" - instead of how IMAP was intended to be
used - eg. if your mail server doesn't have POP, which is what I do:

  ; Get local mail, and use IMAPS as well:
  (setq mail-sources '((file)
                       (imap :server "mail.koldfront.dk" :stream tls)))

This downloads the email from the server and stores it locally, marking
the email as deleted on the server. As far as I remember it just gets
the email from INBOX per default; I do splitting locally.

Yep, Gnus says:

    Reading incoming mail from imap...
    imap: Connecting to mail.koldfront.dk...
    Waiting for response from mail.koldfront.dk...done
    imap: Authenticating to ‘mail.koldfront.dk’ using ‘login’...
    imap: Plaintext authentication...
    imap: Login successful...
    imap: Authenticating to ‘mail.koldfront.dk’ using ‘login’...done
    Fetching from INBOX...
    nnml: Reading incoming mail (no new mail)...done

See details here: https://gnus.org/manual/gnus_84.html#Mail-Sources


  Best regards,

    Adam

-- 
 "I pragmatically turn my whims into principles!"           Adam Sjøgren
                                                       asjo@koldfront.dk



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

end of thread, other threads:[~2022-12-07  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06  6:19 delete downloaded marked emails after specific days & pop3 advice jindam, vani
2022-12-07  0:30 ` Eric Abrahamsen
2022-12-07  7:41   ` Adam Sjøgren

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