Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate away from PHP's imap extension? #812

Closed
orlitzky opened this issue Apr 1, 2024 · 6 comments
Closed

Migrate away from PHP's imap extension? #812

orlitzky opened this issue Apr 1, 2024 · 6 comments

Comments

@orlitzky
Copy link

orlitzky commented Apr 1, 2024

The PHP imap extension is being dumped:

The "c-client" library that it's based on hasn't been maintained in 20 years, and is a patch monster on all modern systems. This is just a heads up that the PECL extension will probably deteriorate and become unusable soon, since (speaking as one distro maintainer) we were only bothering to keep it alive because it was a dependency of PHP itself.

@DavidGoodwin
Copy link
Member

Thanks for the notification.

The 'imap' extension is an optional requirement for postfixadmin, and it's only used if someone has configured various config things (create_mailbox_subdirs, create_mailbox_subdirs_host etc) and the function imap_open exists

See also

https://github.com/postfixadmin/postfixadmin/blob/master/model/MailboxHandler.php#L750

and

https://github.com/postfixadmin/postfixadmin/blob/master/config.inc.php#L703

and

#472

I suspect it's time to just remove this code.

DavidGoodwin added a commit that referenced this issue Apr 1, 2024
…the php-imap module being deprecated; leave in an error_log message to perhaps avoid future support tickets asking why this does not work
@orlitzky
Copy link
Author

orlitzky commented Apr 4, 2024

Works for me, I'll let our PostfixAdmin maintainer know. Thank you!

DavidGoodwin pushed a commit that referenced this issue Oct 30, 2024
add create_mailbox_subdirs to deprecated list - stop error_log() call for it from Config.
see also #812 
Co-authored-by: Sergey Lisenko <lisenkosergey@loc.tashkent.uz>
DavidGoodwin added a commit that referenced this issue Nov 12, 2024
…k CONF callable check to use is_callable() and not is_string() && function_exists() - this should allow someone to define a PHP 7+ style anonymous function within their config, add unit test to illustrate behaviour etc

see also #869 and #812
@hydrapolic
Copy link

Hey @DavidGoodwin, thanks for the update!

Just noticed it's not included in the current release 3.3.14, maybe because this got merged into the master branch and there is a huge diff between master and the 3.3 branch postfixadmin_3.3...master

Any plans on merging the branches so that the next release contains this change?

In Gentoo Linux, we're working on getting php 8.4 on board, but we somehow need to solve the issue with the imap extension and postfixadmin compatibility. Currently we state that postfixadmin requires php with imap extension, but it's not included in php 8.4 so there's a small glitch that I was hoping will be fixed in the latest release. Thanks!

@Uzume
Copy link

Uzume commented Dec 11, 2024

It should be noted that the c-client library is maintained as a part of Alpine and has been maintained there (as has all of imap that was once part of uw-imap) since Alpine integrated panda-imap (a fork of UW IMAP by Mark Crispin the original author of c-client) on 2013-11-02 (at Alpine 2.19.1; it is also mentioned in the release notes on their website for Alpine 2.20).

It was only ever unmaintained at older locations but Mark Crispin continued to develop it after his time at University of Washington (as Panda IMAP) and Eduardo Chappa continuing its development as a part of Alpine since Alpine 2.19.1+ since 2013-11-02 after Crispin's death at the end of 2012.

Remember Crispin originally developed c-client at Stanford University (along with base64, etc.) and Crispin and his team developed pine and later alpine email clients at University of Washington (along with many other things like the their imapd server, etc.).

There is even a GH mirror at alpinemail/alpine and anyone looking for a maintained version of uw-map should probably look there or at the source repo on repo.or.cz. Feel free to compare:

@orlitzky
Copy link
Author

The PHP extension itself is now unsupported, making it somewhat of a moot point: https://github.com/php/pecl-mail-imap

This extension is no longer actively maintained or supported, and this repository serves as an archive for it.

Though there may still be distros willing to support it. I'm using it for davical authentication at work, but I plan to replace it with something in pure PHP rather than try to keep the C extension going.

@Uzume
Copy link

Uzume commented Dec 12, 2024

The PHP extension itself is now unsupported, making it somewhat of a moot point[...]

Yes, the extension was unbundled and subsequently left unsupported. My point was only to state that the c-client library is still maintained (along with all of the "imap" distribution that is known to have been in uw-imap, e.g., imapd, etc.) as a vendored part of the alpine email client. This refutes the statement at the top of this issue: "[...]hasn't been maintained in 20 years[...]". "imap" has never really been unmaintained for any extended period (perhaps the longest was 2012–2013, around the time the original author died). That cannot be said of the php-imap extension which has had minimal compilation maintenance for a very long time (i.e., none of the updated c-client changes were ever pulled in after uw-imap).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants