1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Add basic spamassassin support

This commit is contained in:
Pierre Jaury 2016-02-17 23:29:32 +01:00
parent 47272df96b
commit 9df197f412
4 changed files with 29 additions and 5 deletions

View File

@ -5,7 +5,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
postfix dovecot-imapd dovecot-sqlite dovecot-lmtpd \ postfix dovecot-imapd dovecot-sqlite dovecot-lmtpd \
dovecot-sieve dovecot-managesieved \ dovecot-sieve dovecot-managesieved \
dovecot-antispam spamassassin clamav \ dovecot-antispam spamassassin spamc clamav \
supervisor rsyslog \ supervisor rsyslog \
&& apt-get clean && apt-get clean

View File

@ -16,8 +16,8 @@ same level of functionality and still be able to host a complete mail server
at little cost while running only FOSS, applying the KISS principle and being at little cost while running only FOSS, applying the KISS principle and being
able to fine-tune some details if needed. able to fine-tune some details if needed.
Architecture General architecture
============ ====================
The mail infrastructure is based on a standard MTA-LDA : The mail infrastructure is based on a standard MTA-LDA :
@ -33,6 +33,21 @@ Additional Web UI :
All components are monitored by supervisord. All components are monitored by supervisord.
Incoming e-mail
===============
Incoming e-mail is received by postfix, according to the workflow:
- ``smtpd`` receives the message;
- the domain is checked against the ``domains`` table;
- if the domain matches an active domain or the source address is allowed relay, continue;
- the mail is forwarded to Spamassassin, which appends some headers;
- the mail is fowarded to Dovecot using ``lmtp``;
- the local part and domain are checked against the ``users`` table;
- the user quota is checked;
- the mail is delivered to the local maildir.
TODO TODO
==== ====
@ -41,8 +56,9 @@ This is more of a roadmap than a proper TODO list. Please poke me or pull
request if you would like to join the effort. request if you would like to join the effort.
- [x] Import vmm configuration files and get a simple postfix/dovecot running with SQLite. - [x] Import vmm configuration files and get a simple postfix/dovecot running with SQLite.
- [ ] Add support for spamassassin. - [x] Add support for spamassassin.
- [ ] Add support for clamav. - [ ] Add support for clamav.
- [ ] Learn from user-defined spam or ham.
- [ ] Draft a Web administration UI. - [ ] Draft a Web administration UI.
- [ ] Implement basic features from the free (as in beer) poste.io. - [ ] Implement basic features from the free (as in beer) poste.io.
- [ ] Start using on a couple production mail servers. - [ ] Start using on a couple production mail servers.

View File

@ -3,6 +3,7 @@
# Exposed SMTP services # Exposed SMTP services
smtp inet n - - - - smtpd smtp inet n - - - - smtpd
-o content_filter=spamassassin
submission inet n - - - - smtpd submission inet n - - - - smtpd
-o smtpd_enforce_tls=yes -o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes -o smtpd_sasl_auth_enable=yes
@ -13,6 +14,7 @@ smtps inet n - - - - smtpd
-o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# Internal postfix services # Internal postfix services
pickup fifo n - n 60 1 pickup
cleanup unix n - - - 0 cleanup cleanup unix n - - - 0 cleanup
qmgr unix n - n 300 1 qmgr qmgr unix n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr tlsmgr unix - - - 1000? 1 tlsmgr
@ -31,3 +33,7 @@ discard unix - - - - - discard
lmtp unix - - - - - lmtp lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil anvil unix - - - - 1 anvil
scache unix - - - - 1 scache scache unix - - - - 1 scache
# Utility services
spamassassin unix - n n - - pipe
user=nobody argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

View File

@ -1,6 +1,5 @@
[supervisord] [supervisord]
nodaemon = true nodaemon = true
loglevel=debug
[program:postfix] [program:postfix]
command = /usr/lib/postfix/master -d command = /usr/lib/postfix/master -d
@ -8,5 +7,8 @@ command = /usr/lib/postfix/master -d
[program:dovecot] [program:dovecot]
command = /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F command = /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf -F
[program:spamassassin]
command = /usr/sbin/spamd
[program:rsyslog] [program:rsyslog]
command = rsyslogd -n command = rsyslogd -n