Skip to content
Snippets Groups Projects
Verified Commit eaae65c0 authored by David Beniamine's avatar David Beniamine
Browse files

Add SPAM IPs restrictions

parent 7b8fcc9b
No related branches found
No related tags found
No related merge requests found
...@@ -4,11 +4,15 @@ FROM tozd/postfix:ubuntu-focal ...@@ -4,11 +4,15 @@ FROM tozd/postfix:ubuntu-focal
VOLUME /etc/sympa/shared VOLUME /etc/sympa/shared
RUN apt-get update -q -q && \ RUN apt-get update -q -q && \
apt-get install adduser dnsutils openssh-client opendkim opendkim-tools --yes --force-yes && \ apt-get install adduser curl dnsutils openssh-client opendkim opendkim-tools --yes --force-yes && \
adduser --system --group mailpipe --no-create-home --home /nonexistent && \ adduser --system --group mailpipe --no-create-home --home /nonexistent && \
cp /etc/postfix/main.cf /etc/postfix/main.cf.orig && \ cp /etc/postfix/main.cf /etc/postfix/main.cf.orig && \
cp /etc/postfix/master.cf /etc/postfix/master.cf.orig cp /etc/postfix/master.cf /etc/postfix/master.cf.orig
RUN echo '$IncludeConfig /etc/rsyslog.d1/*.conf' >> /etc/rsyslog.conf1 RUN echo '$IncludeConfig /etc/rsyslog.d1/*.conf' >> /etc/rsyslog.conf1
RUN curl https://okean.com/sinokoreacidr.txt \
| sed -e 's/\(China\|Korea\)/REJECT Source IP blocked \1/g' \
> /etc/postfix/sinokorea.cidr
COPY ./etc /etc COPY ./etc /etc
...@@ -26,3 +26,4 @@ milter_default_action = accept ...@@ -26,3 +26,4 @@ milter_default_action = accept
milter_protocol = 6 milter_protocol = 6
smtpd_milters = inet:localhost:8892 smtpd_milters = inet:localhost:8892
non_smtpd_milters = inet:localhost:8892 non_smtpd_milters = inet:localhost:8892
smtpd_client_restrictions = check_client_access cidr:/etc/postfix/sinokorea.cidr
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment