Mail Action - popbeforesmtp - need to change POP3 port

Hi there, so it seems with the mail action, the popbeforesmtp=true sends traffic on port 110. Is there a way to set this to 995 for POP3S? My provider isn’t listening on 110 for security reasons but the mail.cfg docs only show a single port number that can be configured.

Is there an undocumented variable I can use for this, or some other way to edit the service to use another port?

The docs are not super clear but it appears the answer is no. However, as of OH 2.5 M1 (ish) the Mail Action is now legacy, replaced by a new Mail binding. With the new binding you can define a Thing to represent IMAP, POP3, or SMTP connection to your provider and it allows you to define a custom port in each case.

Accessing and using the Action in Rules is a little different, see the bottom of the link for how to do that.

Thanks for that reply. I was able to just set up a cron job every 20 mins that does an openssl log in for my email enough to have my provider keep my IP alive for sending. Here’s my script for anyone who may need it.

#!/bin/sh

pop3sscript () {
echo 'USER ’
echo 'PASS ’
while sleep 2; do
echo “quit”
done
}

pop3sscript | openssl s_client -quiet -crlf -connect <MailServer.Name.Here>:995