|Björn Kalkbrenner f1d138293c||5 months ago|
|LICENSE||5 months ago|
|Makefile||5 months ago|
|README.md||5 months ago|
|archive.go||5 months ago|
|filter-archive.go||5 months ago|
This filter implements “mail archiving” into flat files, additionally with some meta data.
Currently, the code is only tested on FreeBSD 12.1 with OpenSMTPD 6.6.0p1 but should work on other systems as well.
The filter currently supports:
The filter is written in Golang and doesn't have any dependencies beyond standard library.
It requires OpenSMTPD 6.6.0 or higher.
There are no available installation packages for distributions.
Clone the repository, build and install the filter:
$ cd filter-archive/ $ go build $ doas install -m 0555 filter-rspamd /usr/local/libexec/smtpd/filter-archive
Alternatively, use the Makefile, check the PREFIX and type “make install”.
The filter itself requires commandline parameters when called by OpenSMTPD (storage folder). Also, the storage folder needs to be writeable by the OpenSMTPD process and should be created manually!
It must be declared in smtpd.conf and attached to a listener for sessions to write to the archive:
filter "archive" proc-exec "filter-archive /var/db/mail-archive" listen on all filter "archive"
If the mails should be stored directly into the storage folder without subfolders, “-f” can be specified
filter "archive" proc-exec "filter-archive -f /var/db/mail-archive" listen on all filter "archive"