3

I'm currently maintaining a project that relies on fetchmail to import e-mails from a given exchange mail-server, one of the accounts I'm pulling mail from is unfortunately set up with a lot of folders.

I found that I can use the folder directive in my fetchmailrc file, however this isn't recursive, as all other folders still have their emails marked as unread (and my script doesn't collect nearly as much data as I expect it to collect).

While fetchmail supports multiple folders, this won't work as the mailbox gets changed regularly, meaning I can't hard-code all folders. I looked online and found that some servers have an 'All Mail' type of folder, however I wasn't able to find this for Exchange.

Does anyone know how I could recursively fetch all mail using fetchmail? This is what my fetchmailrc looks like:

poll owa.example.com
protocol imap
auth password
user 'example@owa.example.com' with password 'password' mda "/home/user/parse-emails"
folder 'INBOX'
keep
Paradoxis
  • 572

0 Answers0