Re: destination/maildir: Manuals seem to use different standards / how to configure correctly?

mick crane <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
On 2018-07-08 20:37, Larry Fahnoe wrote:
> Hi Peter,
> 
> If your goal is to read a remote mailbox via IMAP, filter the messages
> into folders, and store them into a maildir structure for later
> consumption via an IMAP client like Thunderbird, then you're on the
> right path with getmail, dovecot-lda, and sieve. I use these tools to
> maintain a mirror of a gmail mailbox and they work extremely well, but
> it takes a bit of head scratching to get figured out initially. I
> don't use Thunderbird, so can't comment on that.
> 
> Here's how I feed dovecot-lda from getmail:
> 
>> [destination]
>> type = MDA_external
>> path = /usr/libexec/dovecot/DOVECOT-LDA
>> arguments = ("-e",)
>> unixfrom = true
> 
> After you've got getmail working, focus on dovecot & sieve. Here are
> the pointers I'd offer:
> 
> https://wiki2.dovecot.org/LDA
> 
> https://wiki2.dovecot.org/MailboxFormat/Maildir
> 
> https://wiki2.dovecot.org/Pigeonhole/Sieve
> 
> The relevant Dovecot config bits are more or less (& where these are
> located depends on how you've got Dovecot configured):
> 
>> protocols = imap
>> mail_location = maildir:~/Maildir
>> postmaster_address = [email protected]
>> lda_mailbox_autocreate = yes
>> mail_plugins = $mail_plugins sieve
> 
> I wouldn't spend any time on procmail, while it was a great tool, it
> has long since been replaced by modern tools like sieve. You'll spend
> most of your time getting your mail.sieve file figured out as this
> controls which folders the messages are stored in. Dovecot provides a
> very powerful set of tools to manage the various flavors of mail
> stores including maildir and of course it also provides mailbox access
> via IMAP. Keep reading the manuals and you'll get it!
> 
> Apologies to the rest of the list as this has strayed far from
> getmail!
> 
> --Larry
> 
> On Sun, Jul 8, 2018 at 8:54 AM, mick crane <[email protected]> wrote:
> 
>> On 2018-07-08 13:31, Peter Nabbefeld wrote:
>> 
>>> Hi Larry,
>>> 
>>> thank You for Your reply! getmail works fine, however, it seems I
>>> cannot use Sieve - the purpose for using dovecot is to make
>>> Thunderbird happy.
>>> 
>>> I want to get my emails from the provider's server into a maildir,
>>> so
>>> mails are already stored when dovecot "sees" them.
>>> 
>>> So I need to organize my emails while they are received by
>>> getmail,
>>> before putting them into the maildir - do You have any idea?
>> 
>> If you can't use sieve ? guess you can use procmail to deliver
>> although I think people don't use it so much now.
>> 
>> "path = /usr/bin/procmail" in getmailrc0
>> 
>> then make a .procmailrc with the filter options
>> I'm not sure of the exact syntax as I don't have my .procmailrc
>> anymore.
>> also can't remember how setup maildir structure before, may have
>> done it manually, but this time think used roundcube and the folders
>> plugin to make the directories.
>> 
>> mick
>> 
>> Am 08.07.2018 um 13:03 schrieb Larry Fahnoe:
>> Hi Peter,
>> 
>> Yes, if you have delete = false you can make many different test
>> runs without making any changes to the source IMAP server. For your
>> initial tests, use something like:
>> 
>> message_log_verbose = true
>> verbose = 2
>> message_log = ~/.getmail/log
>> 
>> max_messages_per_session = 10
>> 
>> delete = false
>> read_all = true
>> 
>> Once you're happy with the way getmail/dovecot_lda/sieve is working,
>> turn down the logging, remove max_messages_per_session and set
>> delete = true. Takes a few reads of the various bits of
>> documentation, but these tools work really well together.
>> 
>> --Larry
>> 
>> On Sun, Jul 8, 2018 at 4:34 AM, Peter Nabbefeld
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
>> Hi,
>> 
>> syncing isn't a solution, as I want to remove all my messages
>> from
>> the provider's server, when I'm ready, so offlineimap and
>> imapsync
>> won't help. getmail's maildir shall be used by dovecot as "mail
>> buffer".
>> 
>> I've noticed the following two options:
>> * read_all (boolean) — if set, getmail retrieves all available
>> messages. If unset, getmail only retrieves messages it has not
>> seen before. Default: True.
>> * delete (boolean) — if set, getmail will delete messages
>> after
>> retrieving and successfully delivering them. If unset, getmail
>> will leave messages on the server after retrieving them.
>> Default:
>> False.
>> 
>> If I understand that correctly, this is exactly what I'd expect
>> for a "dry run", when using defaults: Just copy but change
>> nothing
>> (with the exception of some headers after receiving).
>> 
>> Kind regards
>> 
>> Peter
>> 
>> Am 07.07.2018 um 15:05 schrieb RW:
>> 
>> On Sat, 7 Jul 2018 09:44:42 +0200
>> Peter Nabbefeld wrote:
>> 
>> Hello,
>> 
>> I'm trying to setup a dovecot installation with getmail
>> and found
>> these instructions:
>> 
>> 1.
>> 
>> 
> http://pyropus.ca/software/getmail/configuration.html#destination-maildir
>> [1]
>> 
>> 
> <http://pyropus.ca/software/getmail/configuration.html#destination-maildir
>> [1]>
>> using "~/Maildir/"
>> 
>> 2.
>> 
>> https://wiki2.dovecot.org/HowTo/TriggerGetmailOnIMAPAccess [2]
>> 
>> <https://wiki2.dovecot.org/HowTo/TriggerGetmailOnIMAPAccess [2]>
>> using "~/.maildir"
>> 
>> 3. Using Arch Linux, I've set "mail_location =
>> maildir:~/Maildir" in
>> "/etc/dovecot/conf.d/10-mail.conf" as advised in their
>> wiki.
>> 
>> As these folder names seem having to do with storage
>> format, I don't
>> want just to guess, so which variant would be correct?
>> 
>> It doesn't matter, unless there's something else that cares.
>> 
>> Just to make sure, I'm using the correct toolset:
>> 
>> I want to move all my mail documents off of my provider
>> (GMX), and I
>> want everything to be stored locally. So I want getmail
>> to
>> fetch
>> everything, including folder structure
>> 
>> getmail doesn't do that itself, but you might be able to get
>> dovecot sieve to read the folder name from the
>> X-getmail-retrieved-from-mailbox header and file
>> automatically
>> creating missing folders as it goes. It would rely on some
>> sieve
>> extensions that I don't use, so I'm not sure.
>> 
>> Alternately there are IMAP syncing programs, such as
>> offlineimap and
>> imapsync, that can sync directly to the maildir folders or
>> through imap.
>> Note that there is no standard for creating maildir
>> subfolders
>> so, if
>> you sync directly make sure that any such program creates
>> them
>> in a way
>> that they can be read by dovecote.
>> 
>> If you just a one-off transfer from the remote imap server
>> to the
>> local imap server it might be easier to just use a mail
>> client
>> to move
>> the mail manually - and then switch to getmail for new mail.
> 
> --

I use sieve with manage sieve plugin for roundcube it took me a while to 
figure out I only needed dovecot-lda but I think something changed with 
the new release of dovecot ?

mick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.