Open bnchdan opened 3 months ago
@bnchdan
At least as far as I can see there is no such feature.
Maybe someone else knows something I haven't found, but if not, it'll need to be added if you want to use such functionality.
The IMAP extension are unbundled by RFC, so adding features should be done in the following repository:
As Saki points out, the extension is unbundled starting with PHP 8.4, and so new features should be requested on the PECL repo. Therefore, I transferred the issue here. Note that this extension uses the c-client library that has been unmaintained for over 10 years (which is the reason the extension is getting unbundled anyway). On first sight, it seems like the underlying library doesn't offer such functionality. All in all, I think you're better off using a userland PHP library that implements IMAP.
Description
Hi,
I have a question about the imap PHP function https://www.php.net/manual/en/function.imap-open.php. Context: If you host an application ( with IP x.x.x.x ) that makes a login to an IMAP server with imap_open() function from a client with IP y.y.y.y. The logs on the IMAP server will show the x.x.x.x IP, not the IP from the client. If the IMAP server is Dovecot you can send a command before the login process ID ("x-originating-ip" "y.y.y.y" ) RFC 2971 https://datatracker.ietf.org/doc/html/rfc2971.html , and Dovecot will log the correct IP. https://doc.dovecot.org/configuration_manual/forwarding_parameters/
Is it possible to send the command ID ("x-originating-ip" "y.y.y.y" ) on imap_open() function or are you considering implementing it on a new version.?
Thanks