Yes, I think I have to try this. Have you ever used iMazing? does it export emails?

On Tue, 2018-11-13 at 10:05 +1100, James Brown wrote:
On 13 Nov 2018, at 9:48 am, Giovanni Bisanti <g@ttyllc.net> wrote:

the Account on the iPhone is IMAP, I'm not sure I understand the process you are describing


iMazing might be able to help you get the mail off the iPhone:

https://imazing.com

Then transfer to you Dovecot Maildir. (Have never done this - it’s just a suggestion).

James.