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

ISSUE-341: add imap2 plugin #1063

Open
wants to merge 2 commits into
base: release-3.7.0
Choose a base branch
from
Open

ISSUE-341: add imap2 plugin #1063

wants to merge 2 commits into from

Conversation

TatevikGr
Copy link

Description

Add imap2 plugin to default plugin list

Contributor License Agreement

Related Issue

#1061

Screenshots (if appropriate):

@michield michield requested review from michield and bramley January 20, 2025 22:28
@TatevikGr TatevikGr changed the base branch from main to release-3.7.0 January 21, 2025 16:38
@TatevikGr
Copy link
Author

@bramley
Copy link
Contributor

bramley commented Jan 21, 2025

I don't mind this plugin being added but it might not be a good long term solution. The package php-imap2 now appears to be unmaintained - the last release was in October 2022 despite there being many issues and pull requests. I created this plugin in February 2023 when it appeared to be active.

This hasn't had a lot of testing. The plugin just wraps the library but I didn't do much testing of the library, just that I could connect and download some bounces. There may be edge-cases that are not handled properly. For example "localhost" does not work for the server name, whereas it does work for the php imap extension.

A couple of issues were raised on the plugin bramley/phplist-plugin-imap2#2 to detect and report the use of "localhost", and to convert the POP3 port and protocol to the IMAP equivalent (the php-imap2 package supports only the IMAP protocol, which isn't a problem but requires the $bounce_mailbox_port setting in config.php to be changed). If the plugin usage is going to increase then it is probably worth making those changes. I am currently looking at the changes.

An alternative approach is to select a php package with an imap API and redevelop the bounce processing to use that instead of the php imap_xxx functions. This page https://php.watch/versions/8.4/imap-unbundled suggests Webklex/php-imap

@lwcorp
Copy link
Contributor

lwcorp commented Jan 23, 2025

There may be edge-cases that are not handled properly. For example "localhost" does not work for the server name, whereas it does work for the php imap extension.

Just making sure, did you mean my issue #­2 which you've mentioned above? My issue was about localhost working in POP3, as I've never tested it in phpList with IMAP until using your plugin. I mean, I know IMAP(1) used the same function for both, but there's no guarantee localhost had worked for IMAP protocol too.

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

Successfully merging this pull request may close these issues.

4 participants