Email over VPN issue

I use K9 Email on Android to access my Rocky mail server. When I connect on my LAN, everything works as expected but if I connect via OpenVPN when travelling, I can read email but not send.

Sent emails just sit in the outbox until “failed to send email” message.

The K9 server configurations are identical.

Other access such as ssh and FTP work as expected.

I see no indication as to whether this is a Rocky issue, a sendmail issue or K9.

Any ideas?

1 Like

Best thing to do is take a look in /var/log/maillog for entries at the time you were trying to send the email. The logs should show why, if auth failure, or whatever. This assumes your mail server is built from packages in the Rocky repositories.

If a third party mail server like Zimbra or iRedMail, etc, then the log locations will differ. However, checking the logs is the first step to find out why it’s not allowing you to send.

I don’t know the K9 client, but I do know other clients that offer push notifications which requires the mail client to operate differently. Before things like push notifications were introduced the pat would be:

Email Client → Your Email Server

Since in most cases unless the email server offers push capability, they introduced it into the email client, be it Outlook or whatever. In these situations, the connection then looked like this:

Email Client → Email Client Servers → Your Email Server

So for example when I had my IMAP/POP and SMTP ports blocked for public access (eg: 587/465), none of the email clients offering push would work since it would require a connection from them to me. Not saying that K9 works in this way, especially since you say it works at home.

More likely though it’s an auth failure, or untrusted network, or perhaps incorrect firewall rules from the VPN connection not being able to send the mail due to lack of port connectivity.

You could check that you are able to connect to the outgoing SMPT server, e.g. without vpn, and then with vpn.

ncat -z -v -w 1 relay.myisp.net 25

Turns out to be my fault.

I had forgotten to add my VPN network to my SPF record in my name server.

2 Likes

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