スパムメールチェック、メール電子署名、外部プログラム連携を実装するメール管理ソフトウェア。
スパムメール・ウイルスメールチェックを実装する場合、従来は複数のソフトウェアを組み合わせる必要があったが、
Rspamdを使用すると設定が簡素化される為、メンテナンス性が向上する。
殆どのコンポーネントはSQLiteにデータを書き込むが、NeuralNetworkプラグインなど高速処理が必要な物は、
Redis(RemoteDictionaryServer)にデータを書き込む為、Redisも構築を行う必要がある。
|
未設画像 |
# zypper install ragel libevent-devel sqlite3-devel file-devel # zypper install lua lua-devel lua51-luajit lua51-luajit-devel # zypper install pcre-devel pcre2-devel libfann-devel libfann2 # zypper install jemalloc-devel libjemalloc2 gd-devel
# cd /usr/local/src # wget https://github.com/vstakhov/rspamd/archive/1.7.4.tar.gz # tar zxvf 1.7.4.tar.gz # cd rspamd-1.7.4 # cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/rspamd \ -DINSTALL_EXAMPLES=ON \ -DINSTALL_WEBUI=ON \ -DENABLE_JEMALLOC=ON \ -DENABLE_LUAJIT=ON \ -DENABLE_SQLITE=ON \ -DENABLE_REDIRECTOR=ON \ -DENABLE_URL_INCLUDE=ON \ -DENABLE_TORCH=ON \ -DENABLE_FANN=ON \ -DENABLE_PCRE2=ON \ -DENABLE_GD=ON # make && make install
# vi /usr/lib/systemd/system/rspamd.service --- [Unit] Description=rapid spam filtering system After=nss-lookup.target network-online.target Documentation=https://rspamd.com/doc/ [Service] LimitNOFILE=1048576 NonBlocking=true ExecStart=/usr/local/rspamd/bin/rspamd -c /etc/rspamd/rspamd.conf -f ExecReload=/bin/kill -HUP $MAINPID User=rspamd Group=rspamd RuntimeDirectory=rspamd RuntimeDirectoryMode=0755 Restart=always [Install] WantedBy=multi-user.target
# vi /etc/logrotate.d/rspamd --- /var/log/rspamd/rspamd.log { weekly compress rotate 4 missingok ifempty sharedscripts create 0644 rspamd rspamd postrotate systemctl restart rspamd > /dev/null 2>/dev/null || true endscript }
# groupadd rspamd # useradd -g rspamd -s /sbin/nologin rspamd # mkdir /var/log/rspamd /var/lib/rspamd # chown rspamd.rspamd /var/log/rspamd /var/lib/rspamd # cd /usr/local # mv rspamd rspamd-1.7.4 # ln -s /usr/local/rspamd-1.7.4 rspamd # ln -s /usr/local/rspamd/etc/rspamd /etc/rspamd
# rspamadm configwizard --- ・設定の開始 Do you wish to continue?[Y/n]: y ・WEB管理画面の設定 Controller password is not set, do you want to set one?[Y/n]: y Enter passphrase: ・Redisの設定 Do you wish to set Redis servers?[Y/n]: y Input read only servers separated by `,` [default: localhost]: localhost Input write only servers separated by `,` [default: 127.0.0.1]: 127.0.0.1 Do you have any password set for your Redis?[y/N]: y Do you have any specific database for your Redis?[y/N]: y ・DKIM設定(今回は未使用) Do you want to setup dkim signing feature?[y/N]: n ・トークンタイムアウト Expire time for new tokens [100d]: 100d ・設定の出力 Reset previous data?[y/N]: y ・データイニシャライズ Do you wish to convert them to Redis?[Y/n]: y ・設定の保存 Apply changes?[Y/n]: y
設定内容 |
設定内容 |
設定内容 |
設定内容 |
設定内容 |
設定内容 |