# Fail2ban Postfix & Dovecot port errors when saving

**URL:** <https://forum.virtualmin.com/t/fail2ban-postfix-dovecot-port-errors-when-saving/132020>\
**Category:** Webmin\
**Created:** [February 9, 2025, 8:48am UTC](https://forum.virtualmin.com/t/fail2ban-postfix-dovecot-port-errors-when-saving/132020 "2025-02-09T08:48:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashGen](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/flashgen/32/16257_2.png) [@FlashGen](https://forum.virtualmin.com/u/FlashGen)\
**Post date:** [February 9, 2025, 8:48am UTC](https://forum.virtualmin.com/t/fail2ban-postfix-dovecot-port-errors-when-saving/132020/1 "2025-02-09T08:48:32Z")

</div>

Hi,

I searched the forums / web and have seen this issue mentioned a few times but I’ve not found a solution. When trying to enable or alter a filter action jail for postfix-sasl or dovecot both throw the following error when saving:

> ### Failed to save jail : Invalid port name, number or range; use a single port name, number or a range in the form start:end; to specify multiple ports, separate them with commas

This error links back to fail2ban/save\_jail.cgi (line 53) - at least for Dovecot.

I should also add that these are the default settings (dovecot): pop3,pop3s,imap,imaps,submission,465,sieve

Hopefully someone can point me to a solution while I poke around in the code… 😁

Thanks  
m

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Debian Linux 12 |
| Webmin version | 2.202 |
| Virtualmin version | 7.30.4 Pro |
| Webserver version | Apache 2.4.62 |
| Fail2ban | 1.0.2-2 |

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [February 9, 2025, 11:19am UTC](https://forum.virtualmin.com/t/fail2ban-postfix-dovecot-port-errors-when-saving/132020/2 "2025-02-09T11:19:16Z")

</div>

Hello,

Thanks for the heads-up! This was a bug in Webmin 2.202, and it will be fixed in the upcoming Webmin 2.210 release!

However, you can try applying the following patches now and see if they work for you.

```auto
webmin patch https://github.com/webmin/webmin/commit/23871ff
webmin patch https://github.com/webmin/webmin/commit/5427420
webmin patch https://github.com/webmin/webmin/commit/d0e7a4e

```

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 10, 2025, 11:19am UTC](https://forum.virtualmin.com/t/fail2ban-postfix-dovecot-port-errors-when-saving/132020/3 "2025-04-10T11:19:16Z")

</div>

Closed on April 10, 2025, 11:19am UTC

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