Main repo for Inboxen.org

Overview

Inboxen

Tests Test coverage

This is the complete system with everything you need to set up Inboxen.

The current maintainer of this repo is Matt Molyneaux

GPG keys

GPG keys used by Inboxen developers to sign releases:

Matt Molyneaux <[email protected]>
    19F5 A8DC C917 FD00 E859   02F4 878B 5A2A 1D47 C084

Security

If you find a security issue with Inboxen, email [email protected]. If you wish to send an encrypted report, then please use key id 0x878B5A2A1D47C084

Once reported, all security vulnerabilities will be acted on immediately and a fix with full disclosure will go out to everyone at the same time.

Developing

You'll need the following tools:

  • Git
  • Python (we strongly recommend you use virtualenv too)
  • PostgreSQL
  • NodeJS
  • GNU Make
  • EditorConfig (optional)

This project comes with a .editorconfig file - we recommend installing it to avoid things like mixing tabs/spaces or accidentally saving files with DOS-style newlines.

Set yourself up with a virtual environment and run the following:

git clone https://github.com/Inboxen/Inboxen.git
cd Inboxen
make

When you've made your changes, remember to check your code style and run unit tests.

Python tests:

python manage.py test

JS tests:

npx grunt karma

To check code style on Python:

tox -e isort,lint

And finally, check JS code style:

npx grunt jshint

Local HTTP server

You'll need a settings.ini file, for example:

[general]
secret_key = some_random_string
debug=true
[tasks]
always_eager=true

If you want to start a local HTTP server to test out your changes, run the following:

python manage.py runserver

You can connect to it on http://localhost:8000/.

With debug=true, you'll have the Django Debug Toolbar enabled and you can find the Inboxen styleguide at http://localhost:8000/styleguide

Pinned Dependencies

Inboxen uses pip-tools to help manage its dependencies. The direct requirements of Inboxen are kept in requirements.in and then we use the following command to pin the entire dependency graph:

pip-compile --upgrade --output-file requirements.txt requirements.in

The resulting requirements.txt can be installed to a clean virtualenv with pip to get the exact package versions that Inboxen uses in production. You can also use the pip-sync (which comes with pip-tools) to update an existing virtualenv as well as remove packages that are no longer required.

The same principal applies to requirements-dev.txt/requirements-dev.txt and any files found in extras/requirements.

If for any reason you wish to bypass pinning dependencies, requirements.in and requirements-dev.in are in the format expected by pip.

Committing and Branching

Branching

All development happens in branches off of master. Each branch should have an associated issue - if there isn't one for what you're working on then create a new issue first!

Branch names should be of the format <issue>-<description> where:

  • <issue> is the issue you are working on
  • <description> is a brief description of what's happening on that branch

For example, 129-pin-inboxes was the branch used for implementing the pin inbox feature

Finished branches are then merged into master. If there is someone available to review your branch, your branch should be reviewed and merged by them. Remember to add a note to CHANGELOG.md when merging!

Hotfix branches

Hotfixes should be branched from the latest deploy tag, and then be tagged themselves as a normal deployment before being merged back into master.

Commit messages

You should follow the pattern of "summary, gap, details, gap, issue references"

For example:

Blah blah thing

Fixes this thing, changes how we should do something else

fix #345
touch #234

If you are committing on `master , then make sure to end your commit message with "IN MASTER" so we know who to blame when stuff breaks.

Comments
  • CSP and Wagtail

    CSP and Wagtail

    I'm currently unable to edit pages with the Rich Text editor because CSP is preventing the loading of inline scripts.

    I'm fairly sure this worked on my test VM, but maybe I had debug enabled.

    • Reproduce this locally
    • See if upgrading to Wagtail 1.10 fixes the issue
    bug app:cms 
    opened by moggers87 11
  • Change Username form does not change username

    Change Username form does not change username

    Hi, I tried to change my username, but it didn't update my current one (On the bottom of the page it says "Your Current Username is" and there is still the old one. I tried to update it again, and the new username I want (The same one I've insterted the first time) does now exist on your servers. How is that possible?

    Does it take some time to update it?

    I tried to login with the new username and the old password, but it doesn't work. At least, right now. I'm worried that now there is an exact copy of my account on your systems, could that be possible?

    bug 
    opened by ghost 9
  • Allow 3rd party websites to report spammers

    Allow 3rd party websites to report spammers

    This is a biggy, but important for Inboxen to avoid becoming a troll-pit.

    Probably best roll this into a new app.

    Requirements:

    • 3rd parties can report spammers/trolls/undesirables
    • Validate report as genuine
    • Admin actions:
      • Ban user
      • Disable Inbox
      • Block website (e.g. no Inboxen user will be able to receive emails from a certain domain)
    • Do we inform the user? Discuss.
    • Mark 3rd parties as spammers/trolls/undesirables
    • Keep a history of what's happened, with future analysis in mind
    enhancement question 
    opened by moggers87 9
  • ImportError: No module named 'inboxen'

    ImportError: No module named 'inboxen'

    TIM截图20201122200211

    python3 manage.py test

    ========================= Traceback (most recent call last): File "manage.py", line 35, in main() File "manage.py", line 31, in main execute_from_command_line(sys.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.5/dist-packages/django/core/management/init.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/test.py", line 23, in run_from_argv super().run_from_argv(argv) File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 315, in run_from_argv parser = self.create_parser(argv[0], argv[1]) File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 289, in create_parser self.add_arguments(parser) File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/test.py", line 44, in add_arguments test_runner_class = get_runner(settings, self.test_runner) File "/usr/local/lib/python3.5/dist-packages/django/test/utils.py", line 303, in get_runner test_runner_class = test_runner_class or settings.TEST_RUNNER File "/usr/local/lib/python3.5/dist-packages/django/conf/init.py", line 79, in getattr self._setup(name) File "/usr/local/lib/python3.5/dist-packages/django/conf/init.py", line 66, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.5/dist-packages/django/conf/init.py", line 157, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 944, in _find_and_load_unlocked File "", line 222, in _call_with_frames_removed File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 944, in _find_and_load_unlocked File "", line 222, in _call_with_frames_removed File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 956, in _find_and_load_unlocked ImportError: No module named 'inboxen'

    When I tested it on Debian Linux, there were also errors

    Originally posted by @yunfei2020 in https://github.com/Inboxen/Inboxen/issues/553#issuecomment-731737311

    question 
    opened by yunfei2020 8
  • Not an issue

    Not an issue

    Hey there,

    I sent you an email, but it probably ended up in spam, so I wanted to make sure you see the message. If there some form for us to communicate without polluting the issues space that would be great!

    Following is the full text of the message:

    So I'm writing this email because I wouldn't want to keep opening issues when it's not the case and because IRC server is dead.

    I'm trying to deploy Inboxen to a Ubuntu VPS. VPS is not a popular one. I'm lacking a lot in things that I need to know having 0 experience with python / django and the other requirements mentioned in the readme / getting started, but I want to deploy it so I'll work through any issues.

    After following the getting started and managing to get past the collectstatic command I'm stuck at SALMON_SETTINGS_MODULE

    I'm not sure if I should have, but I ran python setup.py after the collectstatic command. This worked ok, and no error messages were trowed.

    Issuing SALMON_SETTINGS_MODULE does not output in an error on the screen but the salmon.err has the following content in it:

    https://pastebin.com/jH0jDybf

    Running DJANGO_SETTINGS_MODULE outputs the following error:

    https://pastebin.com/rxjznTmL

    I'm actually unsure where the salmon should create the run/router.pid file. I'm running the command from the virtualenv i created for this. As far as I can tell it's not a permission issue

    settings.ini only has a few things in it: secret_key, admin name, email and site_name. Initially I just want to make it to the finish line with the deploy, and after that dive a little deeper and configure it properly. I do have the requirements from what I can tell.

    I have uWSGI server configured to serve static to .static_content and it uses the required script.

    The mail server is not set up yet because I haven't looked to see what mail server would be the best for me

    To me the error messages in the salmon.err(salmon.out and celery.log are empty) seem to be configuration related due to the fact the both config and setting are mentioned in the SALMON_SETTINGS_MODULE

    Any pointers in the order I should deploy the app would be helpful, as it requires more than one thing and me not knowing how it actually works makes it harder.

    I don't need distribution specific instruction but rather things like:

    Your WSGI daemon needs to be configured to use your virtualenv (found in env/) and use the script inboxen/wsgi.py Your webserver should serve /static/ from static_content Your mailserver should forward mail to localhost:8823 via SMTP I can research things like these on my own, I just need don't know what I need to know if that makes sense.

    Cheers, Tudorel

    question 
    opened by tdsotm 8
  • Auto-delete

    Auto-delete

    I was wondering if we should auto-delete emails after a fixed period. For now, let's say 3 months.

    Rationale: Carrying so much personal data makes Inboxen a target for hackers and overzealous three-letter-agencies. While users have the ability to empty Inboxes, our stats show that few people use it. At the time of writing, we have ~100 users and ~80k emails.

    Problems:

    • What do we do about emails that users want to keep? We will need something
    • What do we do about current users? We don't want to start deleting emails out of the blue
    enhancement question priority:HIGH 
    opened by moggers87 8
  • ImportError: No module named django.core.management

    ImportError: No module named django.core.management

    hello when i test

    ===========================

    python manage.py test

    Traceback (most recent call last): File "manage.py", line 35, in main() File "manage.py", line 29, in main from django.core.management import execute_from_command_line ImportError: No module named django.core.management

    ================================== How to solve, I am a novice thanks!

    opened by yunfei2020 6
  • Install sass from npm

    Install sass from npm

    The ruby implementation of sass will become unmaintained in March 2019.

    The latest sass is written in Dart, which can be run in a pure JS environment.

    enhancement Inboxen.org 
    opened by moggers87 6
  • Inboxen should implement a system check to enforce the creation of at least one Domain.

    Inboxen should implement a system check to enforce the creation of at least one Domain.

    Hi,

    I have deployed Inboxen through a Docker image. Everything is up (salmon, celery, rabbitmq and uwsgi + nginx) but I have an error when I try to add an inbox (debug enabled).

    I use the latest version of Inboxen through d6a9a1d

    Traceback

    Environment:
    
    
    Request Method: GET
    Request URL: http://192.168.99.100/inbox/add/
    
    Django Version: 1.11.16
    Python Version: 3.6.6
    Installed Applications:
    ('django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django.contrib.humanize',
     'inboxen',
     'inboxen.account',
     'inboxen.blog',
     'inboxen.cms',
     'inboxen.liberation',
     'inboxen.redirect',
     'inboxen.router',
     'inboxen.source',
     'inboxen.tickets',
     'bootstrapform',
     'django_assets',
     'django_extensions',
     'django_otp',
     'django_otp.plugins.otp_static',
     'django_otp.plugins.otp_totp',
     'elevate',
     'two_factor',
     'watson',
     'debug_toolbar')
    Installed Middleware:
    ('django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.locale.LocaleMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django_otp.middleware.OTPMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'async_messages.middleware.AsyncMiddleware',
     'inboxen.middleware.RateLimitMiddleware',
     'inboxen.middleware.ExtendSessionMiddleware',
     'inboxen.middleware.MakeXSSFilterChromeSafeMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
     'elevate.middleware.ElevateMiddleware',
     'csp.middleware.CSPMiddleware',
     'debug_toolbar.middleware.DebugToolbarMiddleware')
    
    
    
    Traceback:
    
    File "/app/env/lib/python3.6/random.py" in choice
      258.             i = self._randbelow(len(seq))
    
    File "/app/env/lib/python3.6/random.py" in _randbelow
      233.             r = getrandbits(k)          # 0 <= r < 2**k
    
    During handling of the above exception (number of bits must be greater than zero), another exception occurred:
    
    File "/app/env/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
      41.             response = get_response(request)
    
    File "/app/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
      249.             response = self._get_response(request)
    
    File "/app/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
      187.                 response = self.process_exception_by_middleware(e, request)
    
    File "/app/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
      185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/base.py" in view
      68.             return self.dispatch(request, *args, **kwargs)
    
    File "/app/env/lib/python3.6/site-packages/braces/views/_access.py" in dispatch
      102.             request, *args, **kwargs)
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
      88.         return handler(request, *args, **kwargs)
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/edit.py" in get
      213.         return super(BaseCreateView, self).get(request, *args, **kwargs)
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/edit.py" in get
      174.         return self.render_to_response(self.get_context_data())
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/edit.py" in get_context_data
      93.             kwargs['form'] = self.get_form()
    
    File "/app/env/lib/python3.6/site-packages/django/views/generic/edit.py" in get_form
      45.         return form_class(**self.get_form_kwargs())
    
    File "./inboxen/forms/inbox.py" in __init__
      46.                 initial["domain"] = random.choice(domain_qs)
    
    File "/app/env/lib/python3.6/random.py" in choice
      260.             raise IndexError('Cannot choose from an empty sequence') from None
    
    Exception Type: IndexError at /inbox/add/
    Exception Value: Cannot choose from an empty sequence
    

    Request info META

    image

    Request info Settings

    sans titre

    Do you have an idea ? Thanks!

    opened by crazy-max 6
  • Make attachment names readable again

    Make attachment names readable again

    This returns to not truncating the names and content-types of attachments (because I got an email with four different attachments all of whose names started with the same 45 characters), but arranges the attachment panels using a flex layout so they don't get all janky when they have different heights.

    This was only tested by modifying a saved standalone HTML page, and not on a running Inboxen instance. But I'm a very stable genius, so it's a beautiful commit, believe me. The best commit.

    opened by romlok 6
  • Firefox rendering bug?

    Firefox rendering bug?

    Firefox on Fedora 27:

    firefox

    Compare with Chromium on the same machine:

    chromium

    Text appears to be "floating" higher than it should for bootstrap labels and checkbox/radio labels.

    question 
    opened by moggers87 6
  • Support CID image sources

    Support CID image sources

    Saw an email today with something like this:

    <img src="CID:qrcode.png">
    

    Apparently this refers to an email attachment, though none of the attachments were called qrcode.png.

    Should be quit easye to transform the attachment into a data: URL and put that in the HTML, though it will be less easy to find the attachment unless there's a header the CID is specifically referring to that we can search for.

    enhancement app:inboxen 
    opened by moggers87 1
  • Sentry?

    Sentry?

    Currently Inboxen relies on logs and Django's "email the admins when something goes wrong" feature. This is fine, but often doesn't provide all the context we'd want to reproduce a bug. It can also lead to issues going unnoticed if no one is checking the logs.

    Sentry is a monitoring service that collects error reports and presents them in a way that eases debugging/fixing. It's open source and you. There's a free tier and there's also the possibility of running our own instance.

    enhancement question 
    opened by moggers87 0
  • Migrate JS code to use Fetch API

    Migrate JS code to use Fetch API

    Currently we use a mix of XMLHttpRequest and jQuery.ajax. The former is old and crappy, the latter will be gone if I have things my way (we're also using the old way of calling it, not the newer promises interface).

    The Fetch API is supported in all popular browsers except IE, which we have no interest in supporting right now. If we did, a shim would be fine.

    enhancement fun 
    opened by moggers87 0
A repo-watcher to watch for commits on a repo an trigger GitHub action by sending a `repository_dispatch` event to destinantion repo

repo-watcher-dispatch-sender This app is used to send a repository_dispatch event to the destination repo set in config.py or Environmental Variables

Divide Projects™ 2 Feb 6, 2022
This repo provides the official code for TransBTS: Multimodal Brain Tumor Segmentation Using Transformer (https://arxiv.org/pdf/2103.04430.pdf).

TransBTS: Multimodal Brain Tumor Segmentation Using Transformer This repo is the official implementation for TransBTS: Multimodal Brain Tumor Segmenta

Raymond 247 Dec 28, 2022
Repo for "Benchmarking Robustness of 3D Point Cloud Recognition against Common Corruptions" https://arxiv.org/abs/2201.12296

Benchmarking Robustness of 3D Point Cloud Recognition against Common Corruptions This repo contains the dataset and code for the paper Benchmarking Ro

Jiachen Sun 168 Dec 29, 2022
(OLD REPO) Line-by-line profiling for Python - Current repo ->

line_profiler and kernprof line_profiler is a module for doing line-by-line profiling of functions. kernprof is a convenient script for running either

Robert Kern 3.6k Jan 6, 2023
Repo Home WPDrawBot - (Repo, Home, WP) A powerful programmatic 2D drawing application for MacOS X which generates graphics from Python scripts. (graphics, dev, mac)

DrawBot DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in

Frederik Berlaen 342 Dec 27, 2022
REPO USERBOT YANG DIBUAT DARI BERBAGAI REPO USERBOT GITHUB.

Lord Userbot Userbot Yang Digunakan Untuk Bersenang-Senang Di Telegram Repo Lord Userbot Repo Yang Dibuat Alvin Dari Berbagai Repo Userbot Github CARA

Alvin 70 Jan 2, 2023
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vɪᴠᴇᴋ 47 Dec 29, 2022
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vɪᴠᴇᴋ 47 Dec 29, 2022
pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo

pyGinit pyGinit is a command line tools that help you to initialize your current project a local git repo and remote repo Requirements Requirements be

AlphaBeta 15 Feb 26, 2022
Main repository for Vispy

VisPy: interactive scientific visualization in Python Main website: http://vispy.org VisPy is a high-performance interactive 2D/3D data visualization

vispy 3k Jan 3, 2023
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

null 48.3k Jan 5, 2023
Web scraping library and command-line tool for text discovery and extraction (main content, metadata, comments)

trafilatura: Web scraping tool for text discovery and retrieval Description Trafilatura is a Python package and command-line tool which seamlessly dow

Adrien Barbaresi 704 Jan 6, 2023
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 4, 2023
Main repository for Vispy

VisPy: interactive scientific visualization in Python Main website: http://vispy.org VisPy is a high-performance interactive 2D/3D data visualization

vispy 2.6k Feb 13, 2021
Main repository for Vispy

VisPy: interactive scientific visualization in Python Main website: http://vispy.org VisPy is a high-performance interactive 2D/3D data visualization

vispy 2.6k Feb 17, 2021
Main repository of the zim desktop wiki project

Zim - A Desktop Wiki Editor Zim is a graphical text editor used to maintain a collection of wiki pages. Each page can contain links to other pages, si

Zim Desktop Wiki 1.6k Dec 30, 2022
Ella is a CMS based on Python web framework Django with a main focus on high-traffic news websites and Internet magazines.

Ella CMS Ella is opensource CMS based on Django framework, designed for flexibility. It is composed from several modules: Ella core is the main module

null 295 Oct 16, 2022
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

null 48.4k Jan 9, 2023
A bot for FaucetCrypto a cryptocurrency faucet. The bot can currently claim PTC ads, main reward and all the shortlinks except exe.io and fc.lc.

A bot for the high paying popular cryptocurrency faucet Faucet Crypto. The bot is built using Python and Selenium, currently it is under active develo

Sourav R S 81 Dec 19, 2022