I’ve been digging through the z-push imap code trying to find a good spot for this, and after a while, I figured I should probably post here :)
I’m looking to implement something like the ‘dovecot_ident’ module in roundcube. This sends a command right after authentication to dovecot:
. x-originating-ip <the ip address>
This allows dovecot to know the remote IP of the client, instead of seeing it just as the IP of the local application (e.g. roundcube) talking to IMAP. It’s nice for logging and very nice for using with the new dovecot authentication policy stuff.
Is there any feature like that kicking around somewhere in z-push that I haven’t found? If not, can someone give me a hint (as I’m failing miserably so far) where I could patch something like that in? I’m thinking somewhere in ‘autodiscover/autodiscover.php’, but I also don’t see a function in the imap backend to send arbitrary strings to IMAP (vs using the built-in php imap commands). Anybody implement this already?