Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
195 matches across 9 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | setup/munin.sh | 64 | # Create a systemd service for munin. |
| MEDIUM | setup/management.sh | 24 | # Create a virtualenv for the installation of Python 3 packages |
| MEDIUM | setup/management.sh | 54 | # Create a backup directory and a random key for encrypting backups. |
| MEDIUM | setup/management.sh | 85 | # Create an init script to start the management daemon and keep it |
| MEDIUM | setup/ssl.sh | 6 | # Create an RSA private key, a self-signed SSL certificate, and some |
| MEDIUM | setup/ssl.sh | 39 | # Create a directory to store TLS-related things like "SSL" certificates. |
| MEDIUM | setup/dkim.sh | 45 | # Create a new DKIM key. This creates mail.private and mail.txt |
| MEDIUM | setup/firstuser.sh | 50 | # Create the user's mail account. This will ask for a password if none was given above. |
| MEDIUM | setup/firstuser.sh | 56 | # Create an alias to which we'll direct all automatically-created administrative aliases. |
| MEDIUM | setup/web.sh | 102 | # Create the iOS/OS X Mobile Configuration file which is exposed via the |
| MEDIUM | setup/web.sh | 115 | # Create the Mozilla Auto-configuration file which is exposed via the |
| MEDIUM | setup/web.sh | 125 | # Create a generic mta-sts.txt file which is exposed via the |
| MEDIUM | setup/dns.sh | 49 | # Create a directory for additional configuration directives, including |
| MEDIUM | setup/dns.sh | 96 | # Create the Key-Signing Key (KSK) (with `-k`) which is the so-called |
| MEDIUM | setup/mail-users.sh | 20 | # Create an empty database if it doesn't yet exist. |
| MEDIUM | setup/webmail.sh | 105 | # Create a configuration file. |
| MEDIUM | setup/start.sh | 69 | # Create the STORAGE_USER and STORAGE_ROOT directory if they don't already exist. |
| MEDIUM | setup/nextcloud.sh | 127 | # Create a symlink to the config.php in STORAGE_ROOT (for upgrades we're restoring the symlink we previously |
| MEDIUM | setup/nextcloud.sh | 182 | # Create a backup directory to store the current installation and database to |
| MEDIUM | setup/nextcloud.sh | 255 | # Create an initial configuration file. |
| MEDIUM | setup/nextcloud.sh | 281 | # Create an auto-configuration file to fill in database settings |
| MEDIUM | management/auth.py | 130 | # Create a token that changes if the user's password or MFA options change |
| MEDIUM | management/auth.py | 143 | # Create a new session. |
| MEDIUM | management/ssl_certificates.py | 304 | # Create a CSR file for our master private key so that certbot |
| MEDIUM | management/backup.py | 271 | # Create an global exclusive lock so that the backup script |
| MEDIUM | management/dns_update.py | 135 | # Create a dictionary of domains to a set of attributes for each |
| MEDIUM | management/dns_update.py | 660 | # Create a stable (by sorting the items) hash of all of the private keys |
| MEDIUM | management/dns_update.py | 724 | # Create a DS record based on the patched-up key files. The DS record is specific to the |
| MEDIUM | management/daemon.py | 138 | # Create a session key by checking the username/password in the Authorization header. |
| MEDIUM | management/daemon.py | 590 | # Create a temporary pool of processes for the status checks |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/parse-nginx-log-bootstrap-accesses.py | 1 | #!/usr/bin/python3 |
| LOW | tools/editconf.py | 1 | #!/usr/bin/python3 |
| LOW | setup/zpush.sh | 1 | #!/bin/bash |
| LOW | setup/management.sh | 1 | #!/bin/bash |
| LOW | setup/spamassassin.sh | 1 | #!/bin/bash |
| LOW | setup/spamassassin.sh | 41 | # check with: pyzor --homedir /etc/mail/spamassassin/pyzor ping |
| LOW | setup/spamassassin.sh | 61 | # content or execute scripts, and it is probably confusing to most users. |
| LOW | setup/spamassassin.sh | 121 | # ----------------- |
| LOW | setup/ssl.sh | 1 | #!/bin/bash |
| LOW | setup/ssl.sh | 41 | mkdir -p "$STORAGE_ROOT/ssl" |
| LOW | setup/mail-postfix.sh | 1 | #!/bin/bash |
| LOW | setup/mail-postfix.sh | 21 | # connections from users who can authenticate and then sends |
| LOW | setup/mail-postfix.sh | 41 | # always will. |
| LOW | setup/mail-postfix.sh | 81 | tools/editconf.py /etc/postfix/main.cf \ |
| LOW | setup/mail-postfix.sh | 121 | # Modify the `outgoing_mail_header_filters` file to use the local machine name and ip |
| LOW | setup/mail-postfix.sh | 161 | # relayed elsewhere. We don't want to be an "open relay". On outbound |
| LOW | setup/mail-postfix.sh | 181 | # for opportunistic encryption but "Intermediate" recommendations when DANE |
| LOW | setup/mail-postfix.sh | 221 | # Who can send mail to us? Some basic filters. |
| LOW | setup/mail-postfix.sh | 241 | smtpd_recipient_restrictions="permit_sasl_authenticated,permit_mynetworks,reject_rbl_client zen.spamhaus.org=127.0.0.[2 |
| LOW | setup/mail-dovecot.sh | 1 | #!/bin/bash |
| LOW | setup/mail-dovecot.sh | 21 | |
| LOW | setup/mail-dovecot.sh | 41 | # can be allocated. It should be set *reasonably high* to avoid allocation |
| LOW | setup/mail-dovecot.sh | 121 | # are made available (IMAPS on port 993; POP3S on port 995). |
| LOW | setup/mail-dovecot.sh | 141 | |
| LOW | setup/mail-dovecot.sh | 181 | "postmaster_address=postmaster@$PRIMARY_HOSTNAME" |
| LOW | setup/dkim.sh | 41 | RequireSafeKeys false |
| LOW | setup/dkim.sh | 101 | # intercepts outgoing mail to perform the signing (by adding a mail header) |
| LOW | setup/web.sh | 21 | |
| LOW | setup/system.sh | 21 | # permissions (group writeable) set on the following directories. |
| LOW | setup/system.sh | 121 | # PPAs so we can install those packages later. |
| LOW | setup/system.sh | 161 | fi |
| LOW | setup/system.sh | 201 | # * DNSSEC signing keys (see `dns.sh`) |
| LOW | setup/system.sh | 221 | # entropy saved across boots to a local file" as well as the order of |
| LOW | setup/system.sh | 301 | # (This is unrelated to the box's public, non-recursive DNS server that |
| LOW | setup/system.sh | 321 | # |
| LOW | setup/system.sh | 381 | # On first installation, the log files that the jails look at don't all exist. |
| LOW | setup/functions.sh | 41 | # |
| LOW | setup/functions.sh | 81 | } |
| LOW | setup/functions.sh | 101 | # assigned to an interface. `ip route get` reports the |
| LOW | setup/bootstrap.sh | 1 | #!/bin/bash |
| LOW | setup/dns.sh | 81 | # TLDs, registrars, and validating nameservers don't all support the same algorithms, |
| LOW | setup/dns.sh | 101 | # we're capturing into the `KSK` variable. |
| LOW | setup/dns.sh | 121 | # * `K_domain_.+007+08882.ds`: DS record normally provided to domain name registrar (but it's actually invalid with `_d |
| LOW | setup/mail-users.sh | 1 | #!/bin/bash |
| LOW | setup/mail-users.sh | 81 | |
| LOW | setup/mail-users.sh | 121 | # SQL statement to check if we handle incoming mail for a user. |
| LOW | setup/mail-users.sh | 141 | # before postfix gets to the third query for catch-alls/domain alises. |
| LOW | setup/webmail.sh | 1 | #!/bin/bash |
| LOW | setup/webmail.sh | 21 | # These dependencies are from `apt-cache showpkg roundcube-core`. |
| LOW | setup/start.sh | 1 | #!/bin/bash |
| LOW | setup/start.sh | 61 | # Skip on existing installs since we don't want this to block the ability to |
| LOW | setup/questions.sh | 1 | #!/bin/bash |
| LOW | setup/nextcloud.sh | 1 | #!/bin/bash |
| LOW | setup/nextcloud.sh | 21 | # we automatically install intermediate versions as needed. |
| LOW | setup/nextcloud.sh | 41 | |
| LOW | setup/nextcloud.sh | 301 | chown -R www-data:www-data "$STORAGE_ROOT/owncloud" /usr/local/lib/owncloud |
| LOW | setup/nextcloud.sh | 441 | EOF |
| LOW | tests/tls.py | 1 | #!/usr/bin/python3 |
| LOW | management/auth.py | 81 | # The user is trying to log in with a username and a password |
| LOW | management/ssl_certificates.py | 101 | |
| 11 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | setup/zpush.sh | 4 | # ---------------------------------------------- |
| MEDIUM | setup/spamassassin.sh | 3 | # ------------------------------------------- |
| MEDIUM | setup/spamassassin.sh | 16 | # ---------------------------------------- |
| MEDIUM | setup/spamassassin.sh | 72 | # --------------------------------------- |
| MEDIUM | setup/spamassassin.sh | 121 | # ----------------- |
| MEDIUM | setup/ssl.sh | 4 | # ------------------------------------------- |
| MEDIUM | setup/mail-postfix.sh | 4 | # -------------- |
| MEDIUM | setup/mail-dovecot.sh | 4 | # ---------------------- |
| MEDIUM | setup/system.sh | 6 | # ------------------------- |
| MEDIUM | setup/dns.sh | 3 | # ----------------------------------------------- |
| MEDIUM | setup/mail-users.sh | 4 | # ---------------------------------------------- |
| MEDIUM | setup/webmail.sh | 3 | # ---------------------- |
| MEDIUM | setup/nextcloud.sh | 16 | # -------------- |
| MEDIUM | setup/nextcloud.sh | 28 | # -------------- |
| MEDIUM | setup/nextcloud.sh | 51 | # ---------------------------- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/readable_bash.py | 299 | |
| LOW | tools/readable_bash.py | 402 | |
| LOW | setup/migrate.py | 69 | |
| LOW | setup/migrate.py | 150 | |
| LOW | tests/tls.py | 70 | |
| LOW | management/ssl_certificates.py | 12 | |
| LOW | management/ssl_certificates.py | 172 | |
| LOW | management/ssl_certificates.py | 240 | |
| LOW | management/ssl_certificates.py | 24 | |
| LOW | management/backup.py | 157 | |
| LOW | management/backup.py | 441 | |
| LOW | management/status_checks.py | 92 | |
| LOW | management/status_checks.py | 333 | |
| LOW | management/status_checks.py | 399 | |
| LOW | management/status_checks.py | 538 | |
| LOW | management/status_checks.py | 740 | |
| LOW | management/status_checks.py | 1012 | |
| LOW | management/dns_update.py | 175 | |
| LOW | management/dns_update.py | 474 | |
| LOW | management/dns_update.py | 671 | |
| LOW | management/dns_update.py | 750 | |
| LOW | management/dns_update.py | 803 | |
| LOW | management/dns_update.py | 855 | |
| LOW | management/dns_update.py | 890 | |
| LOW | management/dns_update.py | 982 | |
| LOW | management/dns_update.py | 1027 | |
| LOW | management/mail_log.py | 63 | |
| LOW | management/mail_log.py | 93 | |
| LOW | management/mail_log.py | 326 | |
| LOW | management/mail_log.py | 390 | |
| LOW | management/mail_log.py | 421 | |
| LOW | management/mail_log.py | 641 | |
| LOW | management/web_update.py | 59 | |
| LOW | management/web_update.py | 131 | |
| LOW | management/mailconfig.py | 117 | |
| LOW | management/mailconfig.py | 510 | |
| LOW | management/daemon.py | 363 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | management/auth.py | 36 | def parse_http_authorization_basic(header): |
| LOW | management/auth.py | 129 | def create_user_password_state_token(self, email, env): |
| LOW | management/ssl_certificates.py | 172 | def get_certificates_to_provision(env, limit_domains=None, show_valid_certs=True): |
| LOW | management/ssl_certificates.py | 374 | def provision_certificates_cmdline(): |
| LOW | management/backup.py | 219 | def get_duplicity_additional_args(env): |
| LOW | management/backup.py | 396 | def run_duplicity_verification(): |
| LOW | management/status_checks.py | 204 | def is_reboot_needed_due_to_package_installation(): |
| LOW | management/status_checks.py | 399 | def run_domain_checks_on_domain(domain, rounded_time, env, dns_domains, dns_zonefiles, mail_domains, web_domains, domain |
| LOW | management/status_checks.py | 456 | def check_primary_hostname_dns(domain, env, output, dns_domains, dns_zonefiles): |
| LOW | management/status_checks.py | 622 | def check_dns_zone_suggestions(domain, env, output, dns_zonefiles, domains_with_a_records): |
| LOW | management/dns_update.py | 378 | def is_domain_cert_signed_and_valid(domain, env): |
| LOW | management/mail_log.py | 541 | def scan_postfix_submission_line(date, log, collector): |
| LOW | management/web_update.py | 51 | def get_domains_with_a_records(env): |
| LOW | management/web_update.py | 59 | def get_web_domains_with_root_overrides(env): |
| LOW | management/mailconfig.py | 57 | def sanitize_idn_email_address(email): |
| LOW | management/mailconfig.py | 77 | def prettify_idn_email_address(email): |
| LOW | management/mailconfig.py | 483 | def add_remove_mail_user_privilege(email, priv, action, env): |
| LOW | management/daemon.py | 48 | def authorized_personnel_only(viewfunc): |
| LOW | management/daemon.py | 299 | def dns_get_secondary_nameserver(): |
| LOW | management/daemon.py | 305 | def dns_set_secondary_nameserver(): |
| LOW | management/daemon.py | 565 | def system_latest_upstream_version(): |
| LOW | management/daemon.py | 686 | def check_request_cookie_for_admin_access(): |
| LOW | management/daemon.py | 693 | def authorized_personnel_only_via_cookie(f): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup/migrate.py | 91 | except Exception as e: |
| MEDIUM | setup/migrate.py | 92 | print("Error updating IDNA alias", email, e) |
| LOW | setup/migrate.py | 248 | except Exception as e: |
| MEDIUM | setup/migrate.py | 250 | print("Error running the migration script:") |
| LOW | management/ssl_certificates.py | 364 | except Exception as e: |
| LOW | management/backup.py | 290 | except Exception as e: |
| LOW | management/daemon.py | 294 | except Exception as e: |
| LOW | management/daemon.py | 560 | except Exception as e: |
| LOW | management/daemon.py | 569 | except Exception as e: |
| LOW | management/daemon.py | 638 | except Exception as e: |
| MEDIUM | management/daemon.py | 171 | def logout(): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/editconf.py | 93 | # Check if this line contain this setting from the command-line arguments. |
| LOW | setup/system.sh | 71 | # Check if swap is mounted then activate on boot |
| LOW | management/backup.py | 162 | # Check if day of week is a weekend day |
| LOW | management/dns_update.py | 622 | # Check if the file is changing. If it isn't changing, |
| LOW | management/mail_log.py | 354 | # Check if the found date is within the time span we are scanning |
| LOW | management/mail_log.py | 424 | # Check if the incoming mail was rejected |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | management/mailconfig.py | 250 | # permitted_senders: ["user1@domain.com", "sender-only1@domain.com", ...] OR null, |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/readable_bash.py | 8 |