Commit 471538dc authored by Lucas Détré's avatar Lucas Détré

enable spam checking by installing spamassassin

parent f92877a8
Pipeline #3295 passed with stages
in 1 minute and 57 seconds
......@@ -7,19 +7,21 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
##Install all necessary tools
RUN apt-get update && apt-get install --no-install-recommends -y \
apt-utils \
git-core \
git-core \
less \
libcap2-bin \
lsof \
mariadb-client \
mariadb-client \
nodejs \
# Install spamassasin for spam checking incoming/outgoing messages
spamassasin \
# Install system-wide gems
&& gem install \
bundler \
procodile \
tzinfo-data \
## Uninstall unused packages
&& apt-get -y purge \
&& apt-get -y purge \
git-core \
python-dev \
## Clean installation
......@@ -37,12 +39,12 @@ RUN git clone https://github.com/atech/postal.git /postal
RUN postal bundle /postal/vendor/bundle
# Adjust permissions
# Postal needs to be able to listen on privileged ports (for example 80, 443 and 25).
# To enable this, we will allow ruby to listen on these ports.
# Postal needs to be able to listen on privileged ports (for example 80, 443 and 25).
# To enable this, we will allow ruby to listen on these ports.
# On a shared server this would be a security risk however on a server dedicated to Postal, this shouldn't cause any issues.
RUN setcap 'cap_net_bind_service=+eip' /usr/local/bin/ruby
RUN mkdir /postal/config/local /postal/public/assets
RUN mkdir /postal/config/local /postal/public/assets
EXPOSE 5000
......
#!/bin/bash
## Replace values in spamassassin config file to enable spam checking
sed -i 's/ENABLED=0/ENABLED=1/' /etc/default/spamassassin
sed -i 's/CRON=0/CRON=1/' /etc/default/spamassassin
sudo systemctl restart spamassassin
## Wait for MySQL to start up
echo "== Waiting for MySQL to start up =="
while ! mysqladmin ping -h mysql --silent; do
......
......@@ -9,7 +9,7 @@ web_server:
general:
# This can be changed to allow messages to be sent from multiple IP addresses
use_ip_pools: true
use_ip_pools: false
main_db:
# Specify the connection details for your MySQL database
......@@ -60,3 +60,8 @@ smtp:
from_name: Postal
from_address: postal@{{ POSTAL_DOMAIN }}
#enabling spamassassin daemon for spam checking
spamd:
enabled: true
host: 127.0.0.1
port: 783
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment