Score:0

Why is UFW blocking the smtp-plugin from Dokuwiki

bv flag

I have on a virtual server (Ubuntu 20.4) Dokuwiki (2020-07-29 "Hogfather") with the SMTP plugin (Last updated on 2020-11-21) installed. My pages are delivered HTTPS encrypted, using certbot.

I want to use the SMTP plugin from dokuwiki with an existing mail server from my provider. I filled in the necessary credentials: username, SMTP server address, port 465 and SSL.

I get this debug message from dokuwiki with UFW enabled:

There was an unexpected problem communicating with SMTP: Could not open SMTP Port. SMTP log:

Set: the server Set: the auth Set: a message will be sent Connecting to mysmtp.mailout.server.de at 465

When I deactivate UFW (sudo ufw disable) , dokuwiki sends e-mails.

So I think my UFW rules are too strict:

sudo ufw status numbered

results in:

Status: active

 To Action From
 - ------ ----
[1] OpenSSH ALLOW IN Anywhere
[2] Apache Full ALLOW IN Anywhere
[3] 21 / tcp ALLOW IN Anywhere

What did I forget or did not understand?

F. E. avatar
bv flag
added 465 tcp and udp -> 465/tcp ALLOW Anywhere 465/udp ALLOW Anywhere No Change
Score:0
bv flag

After activating IPv6 in

sudo nano /etc/default/ufw

it works with my first 3 UFW rules

Score:0
lr flag

If you have UFW running on your machine, then it means that all connections (except the ones you define) are going to be blocked. So in order to ensure that SMTP plugin works, you have to ensure that you are allowing communications on the default SMTP ports. Now, I'm not quite sure which one of them is used by your plugin, but it should be one of these: 25, 465, 587 or 2525.

Possibly check the documentation for more information about on which port your SMTP is running on, or you can possibly check the logs/tcpdump, or if you looking for an easier way enable all and see if its working, then remove the rules one-by-one until the sending fails.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.