user4711/isbg

By user4711

Updated 14 days ago

This is a Docker Image for the Tool isbg

Image
Networking
1

10K+

This is a Docker Image for the Tool isbg

GitHub Repository

Generic badgeDocker Image Size (tag)

Docker container that uses isbg and imapfilter to filter out spam from a remote IMAP server. The Docker Image is based on Debians slim Stable Image.

Configuration: There are 2 volumes, their content is initialized during container startup:

  • /var/lib/spamassassin/ : holds the SpamAssassin data files, to keep them between container resets.
  • /var/lib/mailaccounts : holds the IMAP accounts configuration.

To configure your IMAP accounts, create a new .conf file in the /var/lib/mailaccounts volume for each IMAP account that you want to be filtered. The files are JSON files, see the example below to learn about mandatory and optional parameters.

The container runs a learning process on startup, so do not leave a configuration with a huge email directory active if you want the container to start in a reasonable time.

Note: As this image needs to store your password in cleartext you should only use it in an environment that you fully trust! Be aware of the risk that this involves!

Dependencies:

Generic badgeGeneric badgeGeneric badgeGeneric badgeGeneric badgeGeneric badgeGeneric badgeGeneric badgeGeneric badge

Configuration:

Each account config file must be a valid json file like the .example file located in /accounts/. The following configurations are supported:

VariableReq. / Opt.DefaultDescription
serverrequiredYour mail server address
usernamerequiredyour username for logging into your mailaccount
passwordrequiredyour password for logging in
spamHandlingoptionalyesThis Flag defines if the given spam filter should be used on the account, e.g. if only old mails should be deleted
isGmailoptionalnoGmail has a few unique ways that they interact with a mail client. isbg must be considered to be a client due to interacting with the Gmail servers over IMAP, and thus, should conform to these special requirements for proper integration.
spamSubjectoptionalMessages with this prefix will automatically sorted to spam without scoring them, useful if your mailbox provider is offering this feature
reportoptionalnoFlag whether or not the --noreport for isbg should be set or not. yes = Flag is not set, no (Default) = Flag is set
spamLifetimeoptionalDuration in days after which the spam-messages in your spambox should be automatically deleted
mailLifetimeoptionalDuration in days after which the INBOX-messages should be automatically deleted
folders.inboxrequiredName of your inbox folder / mailbox. You might want to run the container with LIST_FOLDERS set to either true or only first to identify this.
folders.spamrequiredName of your spam folder.
folders.hamoptionalHam folder where you can move wrong spam detections. Spamassassin will learn these in the next learning run as ham. Messages placed here will automatically be moved in your inbox after they have been learned.
folders.sentoptionalYour mailbox for sent messages. Spamassassin will use this folder to learn ham messages.

Variables:

The following Docker Environment Variables can be set:

VariableDefaultDescription
CRON_HOUR1hour for daily spam learning
CRON_MINUTE30minute for daily spam learning
TZUTCtime zone
USERNAMEdebian-spamdusername to run spammassin-daemon
HAM_BATCH_SIZE50max amount of ham messages to learn per learning run
SPAM_BATCH_SIZE50max amount of spam messages to learn per learning run
FILTER_BATCH_SIZE50max amount of messages to filter per run
MAX_MAIL_SIZE120000mails bigger than this size will be skipped by SA. (BYTES)
EXTRA_OPTIONS--nouser-configadditional options for spamasssassin
PYZOR_SITEpublic.pyzor.org:24441pyzor URI
DETAILED_LOGGINGfalseenables verbose logging of isbg/SA
LIST_FOLDERSfalsePrint list of mailboxes and folders on startup. Settings this to "only" will terminate the container after listing.
INTERVAL_MINUTES1Interval in minutes in which the spam search should be run

Support

Docker-ISBG is a free docker image powered by other open source. I am not able to provide full support, however if you find any bugs or if you need a new feature you can create an issue. If you want to support my work you can do this through my ko-fi page:

https://ko-fi.com/dumpname

License

GPLv3 license

Docker Pull Command

docker pull user4711/isbg