POP3 issues with mailpit

  • Used Zammad version: 6.3.1-1717572987.fd8871d4.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04
  • Browser + version: Firefox 126.0.1 (64-bit)

Expected behavior:

  • Be able to fetch POP3 mails from local faux mail server Mailpit

Actual behavior:

Steps to reproduce the behavior:

  • Install Mailpit on the Zammad server sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)

  • Create auth file for POP3
    echo -e "user1:password1\nuser2:password2" > mailpit.auth

  • Launch mailpit with mailpit --pop3-auth-file ./mailpit.auth

  • Set up Zammad Email notification account with mailpit SMTP

    • Host: localhost
    • Port: 1025
    • SSL Verification: no
  • Set up Email Channel in Zammad as shown above with

    • Type: POP3
    • Host: localhost
    • User: user1
    • Password: password1,
    • SSL: No SSL
    • Port: 1110

Try to set up the mailbox and get the EOF error

  • Logout from Zammad and send a recover password email. Receive the email in mailpit as shown above
  • Try again to set up the mail channel and get the bad response: 1 %!d(float64=5836) error

Any pointer in the right direction is very welcome

Best,
Skip

Hi @skip. It seems that Mailpit is not compatible to the way how the Net::POP3 Ruby library is fetching mails.

More technical information: net-pop/lib/net/pop.rb at e8d0afe2773b9eb6a23c39e9e437f6fc0fc7c733 · ruby/net-pop · GitHub

This is the line that is shown in your screenshot.

@skip Maybe it might be a good idea to ask in the Mailpit repository for help with that, not sure though.

Thank you very much @fliebe92!

So far I have fixed the bad response: 1 %!d(float64=5836) error with this PR @ mailpit

Now I am looking into the end of file reached error.

1 Like

Hi @skip.

The end of file reached error comes from here: net-pop/lib/net/pop.rb at e8d0afe2773b9eb6a23c39e9e437f6fc0fc7c733 · ruby/net-pop · GitHub

But again, I don’t know what Mailpit is doing in this case, might be worth checking RFCs how POP3 should behave in such situations etc.

Thanks again for pointing me in the right direction! :star_struck:

Added full support for POP3 to Mailpit with this commit

Now I was able to add the POP3 account to Zammad

Time for more testing and debugging now! :nerd_face:

2 Likes

Hi @skip. Do you plan to create another pull request for Mailpit with those changes? Asking for a friend… :smiley:

Hello @fliebe92!

You can find the forked (and working) mailpit here:

There is still an open discussion with the maintainer you can follow here:

Once everything is clear and satisfying for all parties, it will be merged in the main project.

I hope your friend is happy for this contribution :wink:

2 Likes

Hi @skip. Thanks a lot! Let me know if there is something I could support with.

1 Like

Fixed with the latest 1.18.6 release

Now it works fine with Zammad

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.