Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Customized mailfilter config with Rspamd and Bogofilter on Uberspace 7

License

NotificationsYou must be signed in to change notification settings

bhopmann/uberspace7-mailfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attention: This mailfilter is intended to work for Uberspace 7 – a setup for Uberspace 6 with DSPAM and SpamAssassin can be foundhere.


This script can be used for setting up a customized mailfilter config withRspamd andBogofilter on anUberspace 7 server. Every message will be filtered by these two services: Learning false positives or false negatives is realized with Bogofilter, while Rspamd uses multiple filtering and statistical methods to generate a spam score (which is later used for filtering).Custom rules can be added too. If messages are not correctly recognized as ham, they can be manually taught as ham by setting up a passlist (one email address each line). To teach Bogofilter, in the spam folder one has to mark correctly classified spam messages as read. If messages are not marked as read or moved to another folder directly after reading or ifSILENT_NEW_SPAM is set, nothing happens.

At this time Rspamd isn't configurable for learning on userlevel (seemanual for the actual default behavior). According to Uberspace this might change in the future...

The main goal of this filter is a more intuitive workflow with less special folders (likeLearn as Spam andLearn as Ham) when showing messages to Bogofilter via a customizedspam-learn script so it can learn. This is realized by marking messages, recognized or reclassified as spam, with the headerX-Spam-Folder: YES, which is removed for messages that are reclassified as ham. All reclassified messages will be re-delivered viamaildrop. Finally, teaching spam or ham works like this:

  • When moving a messagefrom 'Junk | Spam | Junk-E-Mail'to 'Inbox' it will be learned by Bogofilter as Ham
  • When moving a messagefrom 'Inbox'to 'Junk | Spam | Junk-E-Mail' it will be learned by Bogofilter as Spam

Please Note: Only messages of the last 24 hours are interpreted byspam-learn to prevent slow scanning due to big folders.

Installation of Bogofilter

GetBogofilter and install it like this:

  wget -O bogofilter.tar.xz https://sourceforge.net/projects/bogofilter/files/bogofilter-stable/bogofilter-1.2.5.tar.xz/download  tar -xvf bogofilter.tar.xzcd bogofilter-1.2.5  ./configure --with-database=sqlite3 --prefix=$HOME  make  make install

(Please adapt to current bogofilter version in the future)

Installation of Mailfilter

Core Files

  • Set up.qmail andmaildrop before (see.qmail andmaildrop documentation for setting up)
  • Rename.mailfilter to.mailfilter-EXT (replaceEXT by your namespace) before.
  • Put the file.mailfilter (or.mailfilter-EXT) and the folder.mailfilters in the home directory of your uberspace.
  • Remember to set the correct file permissions:chmod 600 ~/.mailfilter (or.mailfilter-EXT)
  • mailfilter(-EXT) logfiles can be found in~/logs
  • spam-learn goes to~/bin (its database will later be found in~/.bogofilter)
  • Remember to set the correct file permissions:chmod 755 ~/bin/spam-learn

Addingspam-learn as a cronjob

Addspam-learn as a cronjob that is running once per hour:

Call crontab

  crontab -e

and add this lines

# Call spam-learn hourly  @hourly~/bin/spam-learn

Credits and used code (snippets)

Feedback

This is work in progress, so do not hesitate to give feedback and/or provide pull requests.

About

Customized mailfilter config with Rspamd and Bogofilter on Uberspace 7

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp