- When a timer is provided to 'systemctl show' not all expected keys are
provided in the result. This leads to a KeyError exception.
- Also the security analysis for a timer unit is not useful. Instead perform the
analysis on the corresponding .service unit.
Closes: #2145
Tests:
- Before the patch, Wordpress shows as not sandboxed. The security report page
crashes on Debian testing setup.
- After the patch, there is no crash. Wordpress shows as sandboxed with 86%
coverage.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: isort all files]
[sunil: Remove component in datetime component as managed_packages is empty]
[sunil: Minor refactor in minidlna for consistency]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Time to delay after app is enabled, before checking
diagnosics. Default value is 0 (no delay).
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Rename the backup/restore test to override base class]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Rename backup/restore test to override base class test]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
WAL journaling mode is causing problems with postfix unable to open the database
despite ownership and permission changes. Default is the DELETE rollback journal
mode. The former gives more performance but in our case, writes are very rare
and the DB is used mostly just for reads.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Creating home directories is no longer necessary. We store all mail in /var/mail
and don't allow use of direct access to mail folder.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Delivering mail to home directory is only needed when users are expected to
login via terminal and use command line tools for accessing their email. In
FreedomBox, we expect users to use GUI tools such as Thunderbird and K-9 Mail to
access their mail. So, POP3 and IMAP access sufficient.
Not trying to compatible with command line mail tools means that high
performance mailbox storage formats can be chosen. This is important to ensure
that accessing mail via IMAP is fast. In future, we can consider enabling full
text search using Apache Solr.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Most modern setups simply use to PAM to lookup local recipients instead of
integrating directly with LDAP. libnss-ldapd package that we install and
configure connects the password database with LDAP. Anyone then using PAM need
not be aware of LDAP integration. This reduces extra configuration and many
problems that come along with it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Typical mail systems are configured to work on usernames or virtual usernames.
UIDs/GIDs are only needed at the final moment when delivering mails to user
inboxes that need to have proper UID/GID set.
- This makes it easy for dovecot to simply use PAM authentication instead of
having to use LDAP.
- Trying to hide UID from email headers is no longer necessary. Received: header
is important for debugging mail delivery across the chain. Don't miss out.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Parse arguments in a readable way.
- Convert decorator into simple call.
- Make a simple call instead of looking for subcommand.
- Don't setup logging in global scope.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Based on what is already done in domains.py at the time of setting the
configuration.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- All the views are reachable using buttons.
- Add title to the domains page as tabs are removed.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- In FreedomBox we will obtain and manage certificates automatically. No need
for forms to manage TLS certificates
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Trim the button labels.
- Style the usual buttons as default buttons.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use the IntergrityError exception instead of a complex query to ignore an
already existing alias.
- When retrieving existing aliases, use explicit list of columns instead of * so
that schema updates adding columns won't fail the code using the row results.
- Use terminology used by post fix. "name" for the name of the alias. "value"
for the mapping.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Postfix has the ability to use sqlite3 databases directly. There is no need to
synchronize to a hash db and then use that.
- Store the aliases database in /var/lib/postfix/. This will make backup and
restore easier and remove dependence on FreedomBox and its data directory.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- In the list form, the values are already sanitized as they are retrieved from
the database. Don't refuse to manage existing aliases that don't fit the format.
- In the create form, the form already sanitizes as necessary.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>