mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Updated Debugging (markdown)
This commit is contained in:
parent
276f199e4f
commit
34f929ed6b
|
@ -24,3 +24,22 @@ neither in the dovecot logs
|
||||||
sudo su
|
sudo su
|
||||||
docker exec -it <mycontainer> apt-get install -y vim
|
docker exec -it <mycontainer> apt-get install -y vim
|
||||||
```
|
```
|
||||||
|
## Testing Connection
|
||||||
|
I spent HOURS trying to debug "Connection Refused" and "Connection closed by foreign host" errors when trying to use telnet to troubleshoot my connection. I was also trying to connect from my email client (macOS mail) around the same time. Telnet had also worked earlier, so I was extremely confused as to why it suddenly stopped working. I stumbled upon fail2ban.log in my container. In short, when trying to get my macOS client working, I exceeded the number of failed login attempts and fail2ban put dovecot and postfix in jail! I got around it by whitelisting my ipaddresses (my ec2 instance and my local computer)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo su
|
||||||
|
docker exec -ti mail bash
|
||||||
|
cd /var/log
|
||||||
|
cat fail2ban.log | grep dovecot
|
||||||
|
|
||||||
|
# Whitelist ip addresses:
|
||||||
|
fail2ban-client set dovecot addignoreip 172.18.0.1
|
||||||
|
fail2ban-client set dovecot addignoreip 75.171.128.95
|
||||||
|
fail2ban-client set postfix addignoreip 75.171.128.95
|
||||||
|
fail2ban-client set postfix addignoreip 172.18.0.1
|
||||||
|
|
||||||
|
# this will delete the jails entirely
|
||||||
|
fail2ban-client stop dovecot
|
||||||
|
fail2ban-client stop postfix
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue