{ "info": { "author": "ISBG contributors (see CONTRIBUTORS file)", "author_email": "isbg@python.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Communications :: Email :: Filters", "Topic :: Communications :: Email :: Post-Office :: IMAP", "Topic :: Utilities" ], "description": "IMAP Spam Begone\n================\n\n**isbg** is a script and a python 3 module that makes it easy to scan an\nIMAP inbox for spam using *SpamAssassin* and get your spam moved to another\nfolder.\n\nUnlike the normal mode of deployments for *SpamAssassin*, isbg does not need to\nbe involved in mail delivery, and can run on completely different machines to\nwhere your mailbox actually is. So this is the perfect tool to take good care\nof your ISP mailbox without having to leave it.\n\nYou can read the full documentation in `Read the docs`_.\n\n.. _Read the docs: https://isbg.readthedocs.io/\n\n.. contents:: Table of Contents\n :depth: 3\n\nSupport\n-------\nPlease note, the current release of isbg **only supports python 3**. Python 2 is compatile with older releases.\n\nFeatures\n--------\n\n- Works with all common IMAP servers\n- Works on Linux, MacOS X and Windows (even smartphones!)\n- Can do IMAP over SSL\n- Can remember your password\n- Will work painlessly against multiple IMAP accounts and servers\n- Is not involved in the mail delivery process, and so can run on any\n machine\n that can contact your IMAP server\n- Highly configurable\n- Sensible defaults so you don't have to do any configuring :-)\n- Possibility to skip spam detection to stick only to the teach feature\n- Don't fail when meeting horrible and bad formed mail\n- Lock file to prevent multiple instance to run at the same time (for\n cron jobs)\n\n\nInstallation\n------------\n\n**isbg** install a python package module and also a script to use it ``isbg``,\nit also install another script to unwrap messages: ``isbg_sa_unwrap``.\n\nDependencies\n~~~~~~~~~~~~\n\n**isbg** is written in the Python language. Python is installed by default on\nmost Linux systems. You can can find out more about Python at\n`Python home page`_.\n\nMake sure you have *SpamAssassin* installed. All the necessary information\ncan be found on the `SpamAssassin wiki`_. *SpamAssassin* should be on your\n``$PATH`` (it installs in ``/usr/bin/`` by default)\n\nTo run, ``isbg`` also depends on some python modules.\n\n- `docopt`_ for command line options.\n\n- `cchardet`_ or `chardet`_ for encoding detection.\n\n- `xdg`_ to found the ``.cache`` directory. ``xdg`` is not required, if it's\n not installed, **isbg** will try to found ``.cache``.\n\n.. _Python home page: https://www.python.org/\n.. _SpamAssassin wiki: https://wiki.apache.org/spamassassin/FrontPage\n.. _docopt: https://pypi.python.org/pypi/docopt\n.. _cchardet: https://pypi.python.org/pypi/cchardet\n.. _chardet: https://pypi.python.org/pypi/chardet\n.. _xdg: https://pypi.python.org/pypi/xdg\n\nInstall via pip (easiest method)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nInstall as user::\n\n $ pip3 install isbg --user\n\nInstall as root::\n\n $ sudo pip3 install isbg\n\nTo list the files installed::\n\n $ pip3 show isbg --files\n\nAnd to uninstall it::\n\n $ pip3 uninstall isbg\n\n.. _Pypi: https://pypi.python.org/pypi/isbg\n\nInstall from source\n~~~~~~~~~~~~~~~~~~~\n\nDownload a copy of the isbg repository onto your machine::\n\n $ cd ~\n $ git clone https://github.com/isbg/isbg.git\n\nInstall program dependencies::\n\n $ cd /isbg\n $ python3 setup.py install -r installed_files.txt\n\nFiles will be installed under ``/usr/local/``. ``installed_files.txt`` contains a list of all the dependencies installed.\n\nUninstall from souce\n~~~~~~~~~~~~~~~~~~~~\n\nUninstall program dependencies::\n\n $ tr '\\n' '\\0' < installed_files.txt | xargs -0 rm -vf --\n\nBuilding Windows Installer\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRun the following to build a windows installer::\n\n $ python3 setup.py bdist_wininst\n\nUsage\n-----\n\nSpamAssassin\n~~~~~~~~~~~~\n\nIf you have never used *SpamAssassin* before, you'll probably be quite\nnervous about it being too good and taking out legitimate email, or not\ntaking out enough spam. It has an easily adjustable threshold to change\nhow aggressive it is. Run the following command to create your\npreferences file::\n\n $ spamassassin /dev/null\n Created user preferences file: /home/rogerb/.spamassassin/user_prefs\n\nYou can then edit ``$HOME/.spamassassin/user_prefs`` and change the\nthresholds.\n\nYou can also edit the system-wide settings in\n``/etc/spamassassin/locals.cf``.\n\nIf you want to use the ``--learnspambox`` or ``--learnhambox``, you'll have\nto configure your spamassassin.\n\nConfigure your spamassassin\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you want to use ``--learnspambox`` or ``--learnhambox`` features,\nyou have to add this configuration:\n\n\nAllow Tell\n''''''''''\n\nYou have to start ``spamd`` with the ``--allow-tell`` option.\n\nOn Debian systems (Debian and Ubuntu), you have to edit\n``/etc/default/spamassassin`` and replace::\n\n OPTIONS=\"-D --create-prefs --max-children 5 --helper-home-dir\"\n\nby::\n\n OPTIONS=\"-D --allow-tell --create-prefs --max-children 5 \\\n --helper-home-dir\"\n\nDon't forget to restart your ``spamd`` server after that (``sudo service\nspamassassin restart`` on *Debian*).\n\n\nCLI Options\n~~~~~~~~~~~\n\nThe default behavior of **isbg** is to not make any changes your Inbox\nunless you specify specific command line options. Consequently you can\nexperiment without worry at the beginning.\n\nYour first step is to create a new folder to receive suspected spam.\nI use one named 'spam'.\n\nRun isbg with the ``--help`` option to see what options are available or check\nits manual page with ``$ man isbg`` [#]_.\n\nYou can also unwrap *SpamAssassin* bundled emails with ``isbg_sa_unwrap``,\nyou can use the ``--help`` option to check the available options or\n``$ man isbg_sa_unwrap`` to check its manual page [#]_.\n\n.. [#] You can see it in :doc:`manpage.isbg` page or if you are reading this\n from `github manpage.isbg doc`__\n\n.. [#] You can see it in :doc:`manpage.isbg_sa_unwrap` page or if you are\n reading this from `github manpage.isbg_sa_unwrap doc`__\n\n.. __: docs/manpage.isbg.rst\n\n.. __: docs/manpage.isbg_sa_unwrap.rst\n\n\nHow does it work?\n~~~~~~~~~~~~~~~~~\n\nIMAP assigns each message in a folder a unique id. **isbg** scans the\nfolder for messages it hasn't seen before, and for each one, downloads\nthe message and feeds it to *SpamAssassin*. If *SpamAssassin* says the\nmessage is spam, then the *SpamAssassin* report is uploaded into your spam\nfolder. Unless you specify the ``--noreport`` option, in which case the\nmessage is copied from your Inbox to the Spam folder (the copy happens on\nthe IMAP server itself so this option is good if you are on a low\nbandwidth connection).\n\n\nMultiple accounts\n~~~~~~~~~~~~~~~~~\n\nBy default **isbg** saves the list of seen IMAP message unique IDs in a\nfile in your home directory. It is named ``.isbg-trackXXXX`` where XXXX is a\n16 byte identifier based on the IMAP host, username and port number.\nConsequently you can just run **isbg** against different servers/accounts\nand it will automatically keep the tracked UIDs separate. You can\noverride the filename with ``--trackfile``.\n\nTo run **isbg** for multiple accounts one after another, it is possible to use\nbash scripts like the ones in the folder \"bash\\_scripts\". Since these scripts\ncontain passwords and are thus sensitive data, make sure the file permissions\nare very restrictive.\n\n\nSaving your password\n~~~~~~~~~~~~~~~~~~~~\n\nIf you don't want **isbg** to prompt you for your password each time,\nyou can specify the ``--savepw`` option. This will save the password in a\nfile in your home directory. The file is named ``$HOME/.cache/isbg/.isbg-XXXX``\nwhere XXXX is a 16 byte identifier based on the IMAP host, username and port\nnumber (the same as for the multiple accounts description above). You can\noverride the filename with ``--passwdfilename``.\n\nThe password is obfuscated, so anyone just looking at the contents\nwon't be able to see what it is. However, if they study the code to isbg\nthen they will be able to figure out how to de-obfuscate it, and\nrecover the original password. (**isbg** needs the original password each\ntime it is run as well).\n\nConsequently you should regard this as providing minimal protection if\nsomeone can read the file.\n\n\nSSL\n~~~\n\n**isbg** can do IMAP over SSL if your version of Python has been\ncompiled with SSL support. Since Python 2.6, SSL comes built in with Python.\n\nHowever you should be aware that the SSL support does NOT check the\ncertificate name nor validate the issuer. If an attacker can intercept\nthe connection and modify all the packets flowing by, then they will be\nable to pose as the IMAP server. Other than that, the connection will\nhave the usual security features of SSL.\n\n\nRead and Seen flags\n~~~~~~~~~~~~~~~~~~~\n\nThere are two flags IMAP uses to mark messages, ``Recent`` and ``Seen``.\n``Recent`` is sent to the first IMAP client that connects after a new\nmessage is received. Other clients or subsequent connections won't see\nthat flag. The ``Seen`` flag is used to mark a message as read. IMAP clients\nexplicitly set ``Seen`` when a message is being read.\n\nPine and some other mailers use the ``Recent`` flag to mark new mail.\nUnfortunately this means that if isbg or any other IMAP client has even\nlooked at the Inbox, the messages won't be shown as new. It really\nshould be using ``Seen``.\n\nThe IMAP specification does not permit clients to change the ``Recent``\nflag.\n\nGmail Integration\n~~~~~~~~~~~~~~~~~\n\n*Gmail* has a few unique ways that they interact with a mail client. **isbg**\nmust be considered to be a client due to interacting with the Gmail servers\nover IMAP, and thus, should conform to these special requirements for proper\nintegration.\n\nThere are two types of deletion on a *Gmail* server.\n\n- **Type 1:** Move a message to '[Gmail]/Trash' folder.\n\n This \"removes all labels\" from the message. It will no longer appear in any\n folders and there will be a single copy located in the trash folder.\n Gmail will \"empty the trash\" after the received email message is 30 days old.\n\n You can also do a \"Normal IMAP delete\" on the message in the trash\n folder to cause it to be removed permanently without waiting 30 days.\n\n- **Type 2:** Normal IMAP delete flag applied to a message.\n\n This will \"remove a single label\" from a message. It will no longer appear\n in the folder it was removed from but will remain in other folders and also\n in the \"All Mail\" folder.\n\n Enable Gmail integration mode by passing ``--gmail`` in conjunction with\n ``--delete`` on the command line when invoking isbg. These are the features\n which are tweaked:\n\n - The ``--delete`` command line switch will be modified so that it\n will result in a Type 1 delete.\n\n - The ``--deletehigherthan`` command line switch will be modified so\n that it will results in a Type 1 delete.\n\n - If ``--learnspambox`` is used along with the ``--learnthendestroy``\n option, then a Type 1 delete occurs leaving only a copy of the spam in the\n Trash.\n\n - If ``--learnhambox`` is used along with the ``--learnthendestroy``\n option, then a Type 2 delete occurs, only removing the single label.\n\nReference information was taken from `gmail IMAP usage`_.\n\n.. _gmail IMAP usage: https://support.google.com/mail/answer/78755?hl=en\n\n\nIgnored emails\n~~~~~~~~~~~~~~\n\nBy default, **isbg** ignores emails that are bigger than 120,000 bytes since\nspam are not often that big. If you ever get emails with score of 0 on 5\n(0.0/5.0), it is likely that *SpamAssassin* is skipping it due to size.\n\nDefaut maximum size can be changed with the use of the ``--maxsize``\noption.\n\n\nPartial runs\n~~~~~~~~~~~~\n\nBy default, **isbg** scans 50 emails for operation: spam learn, ham learn and\nspam detection. If you want to change the default, you can use the\n``--partialrun`` option specifying the number. **isbg** tries to read first the\nnew messages and tracks the before seen to not reprocess them.\n\nThis is useful when your inbox has a lot of emails, since deletion and mail\ntracking are only performed at the end of the run and full scans can take too\nlong.\n\nIf you want that isbg does track all the emails you can disable the\n``partialrun`` with ``--partialrun=0``.\n\n\nContact and about\n-----------------\n\nPlease join our `isbg mailing list`_ if you use **isbg** or contribute to\nit! The mailing list will be used to announce project news and to discuss\nthe further developement of **isbg**.\n\nYou can also hang out with us on IRC, at ``#isbg`` on Freenode.\n\nSee the CONTRIBUTORS file in the git repository for more information on who\nwrote and maintains this software.\n\n.. _isbg mailing list: https://mail.python.org/mm3/mailman3/lists/isbg.python.org/\n\n\nLicense\n-------\n\nThis program is licensed under the `GNU General Public License version\n3`_.\n\nThis is free software: you are free to change and redistribute it. There is\nNO WARRANTY, to the extent permitted by law.\n\n.. _GNU General Public License version 3: https://www.gnu.org/licenses/gpl-3.0.txt", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/isbg/isbg", "keywords": "email imap spamassasin filter", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "isbg", "package_url": "https://pypi.org/project/isbg/", "platform": "", "project_url": "https://pypi.org/project/isbg/", "project_urls": { "Homepage": "https://github.com/isbg/isbg" }, "release_url": "https://pypi.org/project/isbg/2.1.5/", "requires_dist": null, "requires_python": "", "summary": "a script that makes it easy to scan an IMAP inbox for spam usingSpamAssassin and get your spam moved to another folder.", "version": "2.1.5" }, "last_serial": 4677864, "releases": { "0.98": [ { "comment_text": "", "digests": { "md5": "999c15bf528407ff4ece4a700dbd463c", "sha256": "ab6ddc60e9e537949300080a01368ad7f5b5ff30066feb14184c77fccf5688bd" }, "downloads": -1, "filename": "isbg-0.98-py2.6.egg", "has_sig": false, "md5_digest": "999c15bf528407ff4ece4a700dbd463c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 8234, "upload_time": "2009-12-08T15:10:58", "url": "https://files.pythonhosted.org/packages/d9/89/cef82836d237707740636bd0a08c5afc2b0f180b5915df0452cbca7fcbdc/isbg-0.98-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "65e3464b881666ba515910f40cd068dd", "sha256": "c0c5dc90f5b4be921c8236e61628685380ddc94ed479a244ff03c2dedc41b353" }, "downloads": -1, "filename": "isbg-0.98.tar.gz", "has_sig": false, "md5_digest": "65e3464b881666ba515910f40cd068dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8122, "upload_time": "2009-12-08T15:10:58", "url": "https://files.pythonhosted.org/packages/56/9b/091328097dfc78bd0528618ab57dc89fb0c7e9173ab062bb171efa1b0f5f/isbg-0.98.tar.gz" } ], "0.99": [ { "comment_text": "", "digests": { "md5": "303f985de43c4dd31b183e6e5ad59f8e", "sha256": "c7eb0c7d806a284c33226d43b2790561d7cf7042734e9b4cd49d886b1712f6a4" }, "downloads": -1, "filename": "isbg-0.99-py2.6.egg", "has_sig": false, "md5_digest": "303f985de43c4dd31b183e6e5ad59f8e", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 8159, "upload_time": "2010-03-03T15:50:10", "url": "https://files.pythonhosted.org/packages/d4/08/86f068c227aba4afa22aaa5074f65d4d82cdc3595f12fd2743f7db5bd96e/isbg-0.99-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "9bc0166e4cc973afce5bf8111871b59f", "sha256": "715cbb818c9d830b4c6f19fc4b64af00a01b127f3cc629e733e1228ccf094a95" }, "downloads": -1, "filename": "isbg-0.99.tar.gz", "has_sig": false, "md5_digest": "9bc0166e4cc973afce5bf8111871b59f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7999, "upload_time": "2010-03-03T15:50:09", "url": "https://files.pythonhosted.org/packages/cc/8a/d09268cea3f0a68ac3c776f783be8da95e920909d820ad4856d6a940e922/isbg-0.99.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "82c81d7039565d998892491ade892766", "sha256": "1415e10d581d133f36cf6b0cfdadb20d4642ad2a657f8e30d4e4dc276267aa07" }, "downloads": -1, "filename": "isbg-2.1.1.tar.gz", "has_sig": false, "md5_digest": "82c81d7039565d998892491ade892766", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77558, "upload_time": "2018-07-30T07:08:05", "url": "https://files.pythonhosted.org/packages/5d/65/c8043e3a3ae3cf652432f850e3e7b041c346833c37d2433a8abccb233d3a/isbg-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "638fd2415f81d581648aeeaefbaadd12", "sha256": "eb6152d31518a8da4b2cbc6d9eaec6c5576346bf8d4e2a827ef3bad0ec181c53" }, "downloads": -1, "filename": "isbg-2.1.2.tar.gz", "has_sig": false, "md5_digest": "638fd2415f81d581648aeeaefbaadd12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77543, "upload_time": "2018-09-19T18:36:36", "url": "https://files.pythonhosted.org/packages/0d/7c/a36ef49bbc49f8367b5892d395fad59e863b6fa23a333fb3ca77fac9ff02/isbg-2.1.2.tar.gz" } ], "2.1.3": [ { "comment_text": "", "digests": { "md5": "bd22ed563b598b5133baca9bd96d73c1", "sha256": "dfd2981249ce36a35768d94dff9e55e15942538cc9928d20a6afcbd7afffa00c" }, "downloads": -1, "filename": "isbg-2.1.3.tar.gz", "has_sig": false, "md5_digest": "bd22ed563b598b5133baca9bd96d73c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76195, "upload_time": "2018-10-24T18:33:56", "url": "https://files.pythonhosted.org/packages/2f/1f/f3cd0ef30a64261a60458c5f9cf5606ce7ed6c70a6a855dd74adfbb2a65f/isbg-2.1.3.tar.gz" } ], "2.1.4": [ { "comment_text": "", "digests": { "md5": "d4dbfa6ed66032b50e1d0549658ed238", "sha256": "503a239e629e8d69747739e623232f85ebffeec19dfc59a675e60225bd2c323e" }, "downloads": -1, "filename": "isbg-2.1.4.tar.gz", "has_sig": false, "md5_digest": "d4dbfa6ed66032b50e1d0549658ed238", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70614, "upload_time": "2018-12-08T04:06:40", "url": "https://files.pythonhosted.org/packages/06/c7/36aec5ae1a10742858fd5cb6be4552ecf19a5c5efef3a97edfb1be8c3e3f/isbg-2.1.4.tar.gz" } ], "2.1.5": [ { "comment_text": "", "digests": { "md5": "832fa88dae9fb93c5a3ddc71d261ae5e", "sha256": "f71b7da1714a49440ac94fecacc618fe12050d139830949df173daec7282107f" }, "downloads": -1, "filename": "isbg-2.1.5.tar.gz", "has_sig": false, "md5_digest": "832fa88dae9fb93c5a3ddc71d261ae5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74456, "upload_time": "2019-01-09T17:59:55", "url": "https://files.pythonhosted.org/packages/4a/be/d8b4319e28b955a859186ada5315a678c0b9adc991fda647e98e82bbe58d/isbg-2.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "832fa88dae9fb93c5a3ddc71d261ae5e", "sha256": "f71b7da1714a49440ac94fecacc618fe12050d139830949df173daec7282107f" }, "downloads": -1, "filename": "isbg-2.1.5.tar.gz", "has_sig": false, "md5_digest": "832fa88dae9fb93c5a3ddc71d261ae5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 74456, "upload_time": "2019-01-09T17:59:55", "url": "https://files.pythonhosted.org/packages/4a/be/d8b4319e28b955a859186ada5315a678c0b9adc991fda647e98e82bbe58d/isbg-2.1.5.tar.gz" } ] }