Commit Graph
8551 Commits
Author SHA1 Message Date
fliu 41c86e0ba3 email: configure postfix domain names 2021-09-05 18:00:43 -07:00
fliu 63746ce39f email: postconf.get_many_unsafe: batch query 2021-09-05 18:00:35 -07:00
fliu 06d8aade23 email: Fix self.critical not callable error 2021-09-05 18:00:30 -07:00
James Valleroy 1e2ee690d7 backups: Add functional test to disable schedule backups
This test is at the end so that it leaves scheduled backups disabled
while other tests are running.

Helps #2058.

Tests:

- Ran functional tests for backups. All tests passed.

- Confirmed that scheduled backups are disabled after backup tests are
  complete.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-05 17:54:42 -07:00
Joseph Nuthalapati 60ef19b6ec mediawiki: Switch to MediaWiki 2020 logo
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Added copyright year]
[sunil: Scaled the images to sizes commonly used for FreedomBox logos]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-05 13:33:10 -07:00
James Valleroy 9a5a362f50 container: Update stable image for bullseye
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the bullseye/ directory for more URL stability]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-05 09:04:58 -07:00
ikmaak 7524d60822 Translated using Weblate (Dutch)
Currently translated at 98.4% (1489 of 1513 strings)
2021-09-05 15:34:53 +02:00
Joseph Nuthalapati 94ce316f41 mediawiki: Enable a subset of default extensions
Full list of default extensions in MediaWiki
https://www.mediawiki.org/wiki/Bundled_extensions_and_skins

This initial set of extensions are chosen from:
- extensions that I've used myself over the past 3 years
- testing done in #1267

Extensions that are advanced features for administrators, meant for spam
control, advanced tags or suitable only to a specific kind of user are
not included.

Fixes #1382

More extensions can be enabled in the future if they're generally useful.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-04 13:48:49 -07:00
Sunil Mohan Adapa 06ded9fe48 mediawiki: tests: functional: Fix races after flipping flags
When flags are updated and mediawiki is interface is loaded, somehow, it does
not always happen that the page immediate loaded reflects the changes. So, wait
for the change to reflect.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-04 12:43:36 -07:00
Joseph Nuthalapati 7fe5cf172b mediawiki: Bump version number for 1.35 upgrade
We already did a version bump (8 to 9) to run the maintenance script
`update.php` for Debian testing. However, this had no effect on Debian
stable installations (essentially idempotent since no version change
happened then).

Bumping version to 10 to ensure that update.php script runs for
FreedomBoxes on Debian Bullseye.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-04 12:43:32 -07:00
Joseph Nuthalapati beaf431ee6 mediawiki: Backup and restore uploaded files
Fixes #1747

MediaWiki on Debian seems to store all uploaded files under images/
folder. The administrator can enable additional file types. In the
default configuration, only image files are permitted.

Manually tested that backup/restore works irrespective of file type.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-04 12:43:22 -07:00
ikmaak 4e1b70b6bf Translated using Weblate (Dutch)
Currently translated at 97.5% (1476 of 1513 strings)
2021-09-04 11:34:53 +02:00
ikmaak 5669a6088d Translated using Weblate (Dutch)
Currently translated at 96.4% (1460 of 1513 strings)
2021-09-03 09:35:20 +02:00
Joseph Nuthalapati 956b17da06 apache: Drop support for SSLv3, TLSv1 and TLSv1.1
- As recommended by Mozilla SSL Configuration Generator for 'intermediate'
compatibility configuration: https://ssl-config.mozilla.org/

- As recommended by IETF RFC 7525:
https://datatracker.ietf.org/doc/html/rfc7525#section-3.1.1

- As recommended by NIST: Guidelines for the Selection, Configuration, and Use
of Transport Layer Security (TLS) Implementations:
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf

- The following are now the client version requirements for FreedomBox web
interface: Firefox: 27, Android: 4.4.2, Chrome: 31, Edge: 12, IE: 11 (Win7),
Java: 8u31, OpenSSL: 1.0.1, Opera: 20, Safari: 9

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Drop SSLv2, it is not valid anymore as per Apache manual]
[sunil: More detailed commit message and comments]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-01 18:11:20 -07:00
Tiago Zaniquelli 4109d087bf plinth: remove diagnose command
[fioddor: squash fixing commit]
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
Reviewed-by: Fioddor Superconcentrado <fioddor@gmail.com>
2021-09-01 21:08:13 +02:00
Fioddor Superconcentrado d49d7f9b41 lintian: Overrides for remove-on-upgrade dpkg conffiles flag
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Limit the overrides to just the flag not understood by lintian]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-09-01 11:49:08 -07:00
Andrij Mizyk 6cc2120e4e Translated using Weblate (Ukrainian)
Currently translated at 66.8% (1012 of 1513 strings)
2021-09-01 18:33:31 +02:00
Michael Breidenbach 40f2638fde Translated using Weblate (Swedish)
Currently translated at 100.0% (1513 of 1513 strings)
2021-09-01 18:33:30 +02:00
Burak Yavuz 1cff5cf581 Translated using Weblate (Turkish)
Currently translated at 100.0% (1513 of 1513 strings)
2021-09-01 18:33:29 +02:00
James Valleroy 4bc837f6fc Merge remote-tracking branch 'freedombox-team/master' 2021-08-30 20:30:02 -04:00
James Valleroy 3dc7501f92 debian: Add gbp tag config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v21.8
2021-08-30 20:29:07 -04:00
James Valleroy c660cada6d Release v21.8 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-30 20:02:12 -04:00
James Valleroy 2774f06bdb doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-30 20:01:13 -04:00
Fioddor Superconcentrado 426cdefd71 container: freedombox-develop callable from anywhere
Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
2021-08-30 16:45:28 -07:00
Fioddor Superconcentrado 0a2091a366 container: Don't fail if there's no fbx network
Display debugging info if the reason for failure is different.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Indentation, fix pylint message]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-08-30 16:44:33 -07:00
James Valleroy 1345ad5f66 locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-30 19:38:29 -04:00
James Valleroy 4b51396860 security: Remove display of past vulnerabilities
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-08-26 14:22:07 -07:00
Sunil Mohan Adapa efa615201b wordpress: New app to manage a WordPress site/blog
- Use php-fpm instead of using mod-php.

- Create database and setup permissions manually. Tables and initial data are
created during the initial setup process done by WordPress. Database upgrades
are handled by WordPress. Minor versions are upgraded automatically and major
version need user intervention.

- Backup/restore functionality including database.

- Install recommended extensions for performance.

- Setup and run cron jobs to ensure that scheduled publications are
completed (among other things). Service has systemd security features. Timer is
set to run every 10 minutes.

- Functional tests for adding/removing posts and backup/restore.

- Increase file upload size limit to 128MiB.

- A private mode (default) for keeping the setup process secure. Should be
disabled after first setup is completed. This uses a new approach using
file-based flag for different Apache configurations.

TODO:

- Find a nice way to allow WordPress to upload plugins/themes. Currently this
operation files and users are expected to manually scp the files to
/var/lib/wordpress/wp-content/{plugins,themes} directory.

Tests:

- Functional tests.

- Schedule publishing of a post. Notice that post got published.

- Test uploading a file larger than 2MiB.

- Test enabling permalinks. This leads to nicer looking URLs.

- Test adding images to posts/pages.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-25 08:20:01 -04:00
Sunil Mohan Adapa 5340cf3119 tests: functional: Add a convenience method to logout
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-25 08:19:57 -04:00
Sunil Mohan Adapa 28030933dc d/control: Drop wireless-tools as recommends
Closes: #2100.

- wireless-tools package is being orphaned. https://bugs.debian.org/963896 .

- We use Network Manager to manage network and don't use iw* tools from
wireless-tools package. Network Manager itself does not need wireless-tools
package to configure and manage Wi-Fi connections. This is seen on typical
desktops.

- FreedomBox service uses NM D-Bus API to scan for available networks.

- Code does not refer to the tools iwconfig, iwevent, iwgetid, iwlist, iwpriv or
iwspy. These are the binaries provided by the wireless-tools package.

Tests:

- After removal of the wireless-tools package, wireless scan functionality does
not result in an error.

- Not tested: Attaching actual Wi-Fi hardware and seeing the list of available
Wi-Fi networks.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-21 18:00:44 -04:00
Sunil Mohan Adapa 7aca9d9299 d/lintian-overrides: Allow all systemd services paths
- Temporary workaround for https://bugs.debian.org/992465

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-21 16:12:08 -04:00
fliu f400eb9439 email: implemented service alert
- Better error handling
- You may retroactively diagnose and fix problems
- Shows the most important issues first

audit.models.Diagnosis
  - Added JSON serialization (needed for IPC)
  - Replaced ambiguous vocabulary
  - Provided a sorting key

audit, diagnosis
  - Support title translation
2021-08-20 19:24:21 -07:00
Andrij Mizyk 74bf8dc4a8 Translated using Weblate (Ukrainian)
Currently translated at 69.0% (1005 of 1456 strings)
2021-08-20 23:20:39 +02:00
Andrij Mizyk 396e14b572 Translated using Weblate (Ukrainian)
Currently translated at 61.9% (902 of 1456 strings)
2021-08-19 15:51:11 +02:00
Petter Reinholdtsen 930f39dc8e Translated using Weblate (Norwegian Bokmål)
Currently translated at 82.2% (1198 of 1456 strings)
2021-08-19 15:51:09 +02:00
Sunil Mohan Adapa 02ea2106bc container: Use keyserver.ubuntu.com as the default keyserver
Closes: #2091.

To avoid current issues with keys.gnupg.net.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-08-18 22:41:14 -04:00
fliu 3ff823e837 email: Sender spoofing patch 1/2: domain rewriting
A sender canonical map deletes the domain part from sender addresses.
Postfix will append @$myhostname after the rewriting.
2021-08-17 19:44:24 -07:00
fliu 1e712f6bc4 email: setup: Configure Roundcube 2021-08-17 19:44:21 -07:00
fliu 5a9c7e5077 email: Documentation, code cleanup
- Audit: finalize MainCfDiagnosis API
- Doc: document Diagnosis models
- Doc: remove hacky imports and replace them with autodoc mock imports
- Views: add `email_` prefix to email server templates
- Apache: delete unnecessary directives (robots tag, cookie header etc.)
2021-08-17 19:44:17 -07:00
fliu ea8150d9dd email: setup: Find Let's Encrypt certificates 2021-08-17 19:44:14 -07:00
fliu 9a98ddadd4 email: postfix: dovecot: Set strong security parameters
Other changes:
- Fix linter error
- Postfix port 25: do not trust localhost IP addresses
2021-08-17 19:44:11 -07:00
fliu b172b0b1cd email: Local delivery: use full email address
If the domain part was not provided, $myhostname will be used.
In case $myhostname is not in $mydestinations, the email will be relayed.
In case $myhostname is invalid, the email will be bounced.

The next hop should always be LMTP (local: transport)
and hence the `@localhost`
2021-08-17 19:44:08 -07:00
fliu 2f77d99899 email: Code cleanup, address reviews
- View: security.html -> email_security.html
- Setup: will not install Redis
- Setup: put clamav packages on hold
- Crash recovery: opening firewall ports becomes the last post action
- Crash recovery: group postconf.set_many into small transactions
- Crash recovery: safer postconf.set_master_cf_options
2021-08-17 19:44:05 -07:00
fliu 240b67c49e email: Reload postfix in domain view 2021-08-17 19:44:02 -07:00
fliu 27387d4a9c email: Implement outbound mail filtering
- Make extensive use of the milter protocol
- Milter: add X-Fbx- headers to emails
- All submitted mails go to smtp:localhost:10025 for filtering
- Header privacy for submitted mails
- Rspamd: be able to inject and replace FreedomBox-managed config
- Reserve special addresses for future use

Known issue: internal emails do not go through spam filtering
2021-08-17 19:43:58 -07:00
fliu 85c6b91fbc email: Code cleanup
- Move render_tabs into plinth.views
- Move admin_tabs and user_tabs into the class
- New interproc module contains inter-process functions
- New helper methods in TabMixin
2021-08-17 19:43:55 -07:00
fliu e454e8ac1b email: LMTP: remove the recipient's UID number from email headers 2021-08-17 19:43:52 -07:00
fliu cdfef82bf6 email: Implement auto-discovery 2021-08-17 19:43:49 -07:00
fliu 355cc84a1b email: apache: X-Robots-Tag header, full URL match 2021-08-17 19:43:46 -07:00
fliu c31a896e81 email: Implement spam sorting with sieve
- Sieve script detects spam headers used by Rspamd and SpamAssassin
- Autosubscribe to Archive, Drafts, Junk, Sent, Trash
- Autoexpunge Trash and Junk folders
- INBOX.Junk -> Junk, INBOX.Trash -> Trash, Sent Messages -> Sent
2021-08-17 19:43:42 -07:00