MailWatcher Gateway - update from POP to add IMAP

Just wondering if in lucee 6/7 we could update the mailwatcher component to imap considering a lot of mail servers are no longer offering pop out of the box and imap seems to be the current standard.

Could we at least have a toggle of pop/imap if current functionality is required by some?

1 Like

nice, let’s see what i can knock out

For Lucee 7

  • add imap support
  • add option to delete after processing (otherwise imap mark read)
  • add support for roll your own, custom fetch function
  • allow specifying log file
  • add support for secure pop3 / imap connections
  • add support for processing backlog on startup (previously only processed new messages since start)
  • added am exclusive lock around processing
  • added some additional TRACE and DEBUG level logging for debugging

https://luceeserver.atlassian.net/browse/LDEV-5464

3 Likes

@dawesi can you try out 7.0.0.170-SNAPSHOT and let me know how you go?

I find using this with testing is great (logs everything to the console)

https://luceeserver.atlassian.net/browse/LDEV-3420

for testing this locally, I find greenmail really useful!

it automatically creates accounts when you reference them

this creates a service with ports prefixed by 3, so

  • imap is 3143
  • pop3 is 3110
  • smtp is 3025
docker run -t -i -e GREENMAIL_OPTS="-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose" -p 3025:3025 -p 3110:3110 -p 3143:3143 -p 3465:3465 -p 3993:3993 -p 3995:3995 -p 18080:8080 greenmail/standalone:2.0.0
1 Like

Checking it out this weekend, will report back #thanks

Quick notes:

For admin:

  • auto update port when selecting secure || mail server type
  • put secure field BEFORE port OR just put IMAP (secure) and POP (secure) as 3rd and 4th option
  • imap port needs to change to 143 when selected, or 993 when using Imap (secure)
  • pop needs to be 110 and 995 for pop3 (secure)

ERs

  • can we add folder for imap so we could specify a folder like imap tag, should this default to inbox or all folders?
  • extra points could fold be populated from the server?

Love

  • options so far
  • backlog processing (genius)
  • log file creation out of the box

starting to test functionality of the gateway now…

Glad you like it!

the folder idea is a good idea, inbox is the default, what do you mean about populating it from the server?

The admin currently doesn’t have logic to do related default field updates…

You can always adapt the default fetch implementation and call that using the functionFetch

populate a drop down list of folders with ‘All Folders’ as an extra option.

That way you don’t have to guess what to put in the folder textbox, aka instead of textfield where you wonder what format to enter, instead why not just look it up?

a cherry on top feature really, but would make setup super quick and validates that login details/ports etc are working also :wink: