Fetch new Mails (Also from Subfolders) from another IMAP server as new Mail in Postfix
- by Tobi
everyone. I have installed Postfix on a server with Aliases and Domains from a MySQL Database.
It is configured to forward some adresses to other Mail Accounts and also delivers some mails in local mailboxes that will be queried over a dovecot imap server.
For this example let there be two users:
[email protected] what is a user that gets its mail just forwarded to let's say [email protected]
[email protected] what is a user that accesses its mail from local IMAP.
Now, I want to fetch some Mails from another mailserver and handle them as if they were sent to a user of my Mailserver.
Lets say those corelations exist:
[email protected] has two external accounts: [email protected] and [email protected]
[email protected] has also one external account [email protected]
The Problem is the new mails on that other Mailserver is not always in the inbox, it might be in subdirectories: mailinglists/all or mailinglists/it but also in mailinglists/some-other-department which is not interesting and should not be delivered.
I already found a programm called fetchmail but I cannot find how to fetch subdirectories or decide which subdirectories are fetched.