ISBG(1) | isbg | ISBG(1) |
isbg - scans an IMAP Inbox and runs every entry against SpamAssassin.
isbg --imaphost <hostname> --imapuser <username> [options]
isbg --imaphost <hostname> --imapuser <username> --imaplist [options]
isbg (-h | --help)
isbg --usage
isbg --version
isbg scans an IMAP Inbox and runs every entry against SpamAssassin. For any entries that match, the message is copied to another folder, and the original marked or deleted.
Works with all common IMAP servers, can do IMAP over SSL, can remember your password, will work painlessly against multiple IMAP accounts and servers, is not involved in the mail delivery process, and so can run on any machine that can contact your IMAP server and has the possibility to skip spam detection to stick only to the teach feature.
(Your inbox will remain untouched unless you specify --flag or --delete)
IMAP password for rogerb@mail.foo.org@mail.foo.org:
Will request the password for your user account and store it obfuscated for future use, after login, it will show the IMAP folder list:
In future uses you can scan for spam with:
After some time, it will return the stats:
0/0 was automatically deleted
The amount of time it takes will be proportional to the size of your inbox and the amount of mails specified with --partialrun. You can specify --verbose if you want to see the gory details of what is going on.
You can now examine your spam folder and will see what spam was detected. You can change the SpamAssassin threshold in your user_prefs file it created earlier.
isbg remembers which messages it has already seen, so that it doesn't process them again every time it is run. If you are testing and do want it to run again, then remove the trackfile (default $HOME/.cache/isbg/track*).
If you specified --savepw then isbg will remember your password the next time you run against the same server with the same username. You should not specify --savepw in future runs unless you want to change the saved password.
You'll probably want something to actually be done with the original spams in your inbox. By default nothing happens to them, but you have two options available. If you specify --flag then spams will be flagged.
You can get the messages marked for deletion by specifying --delete. If you never want to see them in your inbox, also specify the --expunge option after --delete and they will be removed when isbg logs out of the IMAP server.
If you have never used SpamAssassin before, you'll probably be quite nervous about it being too good and taking out legitimate email, or not taking out enough spam. It has an easily adustable threshold to change how aggressive it is. Run the following command to create your preferences file ($HOME/.spamassassin/user_prefs):
$ spamassassin </dev/null >/dev/null
Each IMAP implementation names their folders differently, and most IMAP clients manage to hide most of this from you. If your IMAP server is Courier, then your folders are all below INBOX, and use dots to separate the components.
The UWash server typically has the folders below Mail and uses slash (/) to separate components.
If you don't know how your IMAP folders are implemented, you can always use the --imaplist option to find out.
spamassassin(1), Mail::SpamAssassin::Conf(3).
The full documentation for isbg is maintained in https://isbg.gitlab.io/isbg
With --exitcodes there are also:
You can report bugs on https://gitlab.com/isbg/isbg/issues
See the CONTRIBUTORS file in the git repository for more information on who wrote and maintains this software
License GPLv3: GNU GPL version 3 https://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
May 25, 2022 | 2.3.1 |