Extending post by email

If you dig into the code of postie (plugin), you’ll probably find your answer. In particular, see the filter sample files, and then trace backwards from there. From the FAQ:

Can I add special text to the body of the post when using postie?,

Yes. You can create your own function, and use the postie_post filter. Two short examples are included in the filterPostie.php.sample file

Of note – per this ticket: post by email is slated to be dropped from WP core and switched over to a plugin, so you might be better-off switching to a plugin-based solution now, rather than building your functionality around the current core post by email functionality.