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

POP3 support #650

Open
1 task done
kiwiz opened this issue Nov 27, 2023 · 4 comments
Open
1 task done

POP3 support #650

kiwiz opened this issue Nov 27, 2023 · 4 comments
Labels
new feature New feature.

Comments

@kiwiz
Copy link

kiwiz commented Nov 27, 2023

Use case

Interfacing with clients that only support POP3 (Gmail, for example)

Your idea for a solution

Adding POP3 support to maddy

  • I'm willing to help with the implementation
@kiwiz kiwiz added the new feature New feature. label Nov 27, 2023
@foxcpp
Copy link
Owner

foxcpp commented Dec 21, 2023

I would simply map POP3 operations to corresponding IMAP ones and reuse same storage interfaces and so on. We need to have a reasonably robust library to decode/encode wire protocol, the rest should be fairly easy.

PRs are welcome, let me know if you need any guidance on where to start.

@foxcpp
Copy link
Owner

foxcpp commented Jan 21, 2024

https://github.com/regnull/popgun might be a good starting point.

@kiwiz
Copy link
Author

kiwiz commented Feb 18, 2025

A couple of questions/comments:

  • Implementing this is as easy* as creating internal/endpoint/pop3/pop3.go and importing the package in maddy.go?
  • Is there a preference for integrating the logic into maddy vs just depending on regnull/popgun?
    • My guess is the former as popgun hardcodes the default logger and doesn't let you specify multiple listeners

@foxcpp
Copy link
Owner

foxcpp commented Feb 19, 2025

Implementing this is as easy* as creating internal/endpoint/pop3/pop3.go and importing the package in maddy.go

Would need to figure how to map IMAP-specific storage interface to POP3 operations. Might be:

  • Lock -> Select mailbox
  • Unlock -> Close mailbox
  • Update -> Expunge
  • Rset -> ???
  • Dele -> Store +FLAGS \Deleted
  • List, Retr, Top -> Fetch

Lock/Unlock would also need to create per-user lock somehow, not exactly sure how that would work.

Is there a preference for integrating the logic into maddy vs just depending on regnull/popgun?

My guess is the former as popgun hardcodes the default logger and doesn't let you specify multiple listeners

I would fork popgun and do necessary adjustments to support pluggable logger and multiple listeners. And then use that as a library in main codebase.

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

No branches or pull requests

2 participants