-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is my server a Open Relay? #1145
Comments
Do you have custom firewall rules on that machine or misconfigured IPv6? If any traffic flows through the Docker userland proxy, the server thinks everything is local and trustworthy, see #758. All the messages in your log are outgoing. Can you find the place in the log where these messages were delivered to your server to be relayed? |
Hi, are you running mailcow behind nat?
… Am 06.03.2018 um 21:27 schrieb Alexander Jansen ***@***.***>:
Hello there,
I setup the mailcow according to the docs. Everything works like supposed to except that my server is an open relay and I am getting abused by spam bots. I didn't change a thing at the config just the FQDN.
I setup the DNS like Mailcow requested. I did not check the 'Relay domain' or 'Relay all recipients' option, since I couldn't figure out what they do.
But now I am getting spamed. My CPU usage is constant at 80-100% and my Postfix log looks like this:
And this about 30 times per second.
I have no clue what the problem is.
Thank you for your help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I had similar problems. Was able to solve it with a postfix adaption to: smtpd_recipient_restrictions = permit_sasl_authenticated, reject_invalid_helo_hostname, reject_unauth_destination, permit_mynetworks, check_recipient_access proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf, reject_unknown_reverse_client_hostname |
This should not be a problem in any configuration. mailcow is not an open relay after installation. |
@mkuron Thanks for that tip. Apparently my Docker was misconfigured. For an other project i set Thanks for your help guys |
Please open up again, this should not be an issue, you cannot force users to use a certain GLOBAL docker config. A config option to blacklist certain IPs from being treated as an open relay is possible within the postfix config files and could be implemented in the mailcow UI. Setting the docker iptables to true will most likely break my firewall I definitely need for other projects. |
That's not a problem at all. Just set it to false and configure it yourself manuallly. The part where you configure it yourself is obviously up to you. It is absolutely fine to not use iptables in docker, if you know exactly what you are doing. If your setup is not NATing correctly due to your iptables ruleset, a mail server would be useless anyway. Everyone connects from your routers IP. That's useless. Spam filtering would be very bad. You could add static IPs to the containers and then create a ruleset, that's valid over restarts. |
Do you have a chapter in the documentation about this problem? |
Why doesn't Mailcow configure postfix with I also just ran into this problem and relayed several thousand spam emails. It never occurred to me that a container meant to be simple could be configured so insecurely. |
This is serious. I just found out today that anyone could had sent email through my mailcow server without authentication. Luckily I found it first, only because I'm trying to send AlertMails from iLO4. Open relay checks online say there is no open relay, but if you know a domain name being hosted in mailcow, you could send anything to anyone using telnet. I followed the mailcow installation process and this is on Debian 11. By default I have this huge security hole. Fixed it with answer from @bobobo1618
in Contents of All the iptables rules were created by mailcow, as well of the contents above to the docker daemon file. So I think we should try and work out why mailcow default installation is insecure. |
THANKS!!! This fixed my setup holy moly. Absolutely not understandable why the mailcow team is not applying this by default... |
I'm not aware about any need. Your comment has been the first post since Sep 2023, that it is apparently a open relay because of this. Also, the If you're concerned this issue still exists, please open a new discussion. |
Hello there,
I setup the mailcow according to the docs. Everything works like supposed to except that my server is an open relay and I am getting abused by spam bots. I didn't change a thing at the config just the FQDN.
I setup the DNS like Mailcow requested. I did not check the 'Relay domain' or 'Relay all recipients' option, since I couldn't figure out what they do.
But now I am getting spamed. My CPU usage is constant at 80-100% and my Postfix log looks like this:
And this about 30 times per second.
I have no clue what the problem is.
Thank you for your help
The text was updated successfully, but these errors were encountered: