Solved Redesign e-mail scheme.

rigoletto@

Developer
Hello!

I have a e-mail scheme working like this:

E-mail provider (Yandex/imap) -> mail/fdm (filtering, maildir folders) -> x2 mail/neomutt[1]-> provider SMTP.

The current scheme works pretty well but mail/fdm has a drawback. Every time it download the e-mail from the provider they are deleted in there. It is possible to parse a flag to mail/fdm not delete the e-mails at the provider but every time it download everything will come again, and again. In other words, mail/fdm has no sync facility.

First of all I need a substitute to mail/fdm with actual sync and filtering facilities, but since I will changing it I had the idea to improve it a bit:

E-mail provider (Yandex/imap) -> mail proxy/relay/cache/server with properly filtering[2], cache and syncing facilities at my home server -> [something ->] x2 mail/neomutt[1]-> provider SMTP.

So, I need some ideas to the best way to accomplish that.

Thanks! :beer:

[1] I have one account at the mail provider concentrating several accounts, then during the filtering process the e-mails are separated inside two "master" directories (with other directories inside), each of these "master" directories are operated by separated mail/neomutt accounts (I actually use two mail/neomutt separated instances).

[2] something using Sieve would be great.
 
I'm not familiar with mail/fdm myself but why not use mail/fetchmail instead? Not only does it allow you to leave messages on the server through --keep it's also extremely flexible with handling of the e-mail as well.
 
I could do the filtering/sorting at the provider but every time I need to change something I would need to log in the web interface etc...
 
mail/imapfilter may be an alternative. I will try it!

[EDIT]

Indeed very interesting tool but not really what I am looking for, however not discarded yet:

Imapfilter is a mail filtering utility written in Lua which connects to one or more IMAP accounts and filters on the server using IMAP queries.
 
Is there any way to sync/download only certain amount of the latest messages?
I'm using mail/mutt with mail/isync for many years, but I'd prefer to have, let's say, just a couple of thousand messages in mutt's local box (out of my current 13000 or so).
 
From the top of my head now, you could run mbsync --pull-new to just download the 'marked as new' messages. This is what I am using, but one time a day I do a full sync.
 
The man page has this:
Code:
MaxMessages count
            Sets the maximum number of messages to keep in each Slave
            mailbox.  This is useful for mailboxes where you keep a complete
            archive on the server, but want to mirror only the last messages
            (for instance, for mailing lists).  The messages that were the
            first to arrive in the mailbox (independently of the actual date
            of the message) will be deleted first.  Messages that are
            flagged (marked as important) and (by default) unread messages
            will not be automatically deleted.  If count is 0, the maximum
            number of messages is unlimited (Default: 0).
It looks promising, but I don't like the idea of keeping the messages based on the arrival date, not the actual.
 
Just tried that option. It works as described, i.e. not good:
I set "MaxMessages 1000", and it retrieved 1000 messages, but only 20 of them are dated 2018.
The reason is that today I retrieved messages from a Gmail account into Yandex mailbox (which is configured in ~/.mbsync), so those 980 messages are really old, but they appeared in Yandex today...
 
There is another problem.
I have a local archive of old messages. When I try to sync them with Gmail or Yandex with mail/isync they appear on their servers with the current date, not the original.
 
Back
Top