I just went through something like this. I did it the very hard way and then, after some great feedback from the developer, did it a much easier way.
My advice is DON’T add the information until you get to the “postie_post_before” filter. The initial documentation I read only had one input to your filter: $post. So I did a lot of manipulation with “postie_post_pre” where the same documentation said you have access to $email. I pulled the “from” header information and then added it to the content of the email for later processing with my filter for “postie_post_before”. Somewhere along the way before it got to “postie_post_before”, the email addresses became HTML and was way more complicated to parse.
BUT as the developer pointed out, other (newer?) documentation for “postie_post_before” shows that you have access not only to $post, but to $email as well. So you can get the from information out of $headers[‘from’][‘mailbox’], $headers[‘from’][‘host’] and $headers[‘from’][‘personal’]. It’s very clean and can be added to $post[‘post_content’] wherever you want it.
This is the documentation that describes calling your filter with both parameters: https://postieplugin.com/postie_post_before/. Not sure how I missed it, but there it was.
Hope something in that helps.