Fetch new Mails (Also from Subfolders) from another IMAP server as new Mail in Postfix

Posted by Tobi on Server Fault See other posts from Server Fault or by Tobi
Published on 2014-08-18T14:45:40Z Indexed on 2014/08/18 16:29 UTC
Read the original article Hit count: 251

Filed under:
|

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:

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:

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.

© Server Fault or respective owner

Related posts about postfix

Related posts about fetchmail