openship 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -24
- package/dist/bare-2HYDXQEH.js +23 -0
- package/dist/{bowser-MFQA6OS4.js → bowser-O3AEA6AN.js} +5 -1
- package/dist/{chunk-KD7VO4LG.js → chunk-2ZLR7ULL.js} +255 -65
- package/dist/{chunk-YHXCHW7Q.js → chunk-3JQTL4R4.js} +236 -99
- package/dist/{chunk-E77LJWJK.js → chunk-4TJC4JZQ.js} +20 -9
- package/dist/{chunk-YL67EWYZ.js → chunk-4Z5QO7N6.js} +6 -2
- package/dist/{chunk-WJPCBU7Z.js → chunk-5FNIWBFI.js} +10 -6
- package/dist/{chunk-Y37KHU7L.js → chunk-5MZ624VX.js} +5 -0
- package/dist/{chunk-QKFRZNKN.js → chunk-6APIPIJY.js} +8 -4
- package/dist/{chunk-JZLNHGLW.js → chunk-6APULWSU.js} +153 -133
- package/dist/{chunk-F4DFVG6Q.js → chunk-6B5YCFFV.js} +8 -4
- package/dist/{chunk-XVSAUO2I.js → chunk-AVIB7CT7.js} +5 -1
- package/dist/{chunk-TEYJYSMT.js → chunk-C5OHTYEF.js} +12 -6
- package/dist/{chunk-7UOB5GGQ.js → chunk-DYPH4HCI.js} +5 -0
- package/dist/{chunk-XIFRMKYT.js → chunk-EI575GHN.js} +6 -2
- package/dist/{chunk-4CQWT2WL.js → chunk-FPRHYBY2.js} +5 -0
- package/dist/chunk-FQGJZ2HS.js +248 -0
- package/dist/{chunk-JR2OCMJA.js → chunk-FRNAR33O.js} +6 -2
- package/dist/{chunk-JUJBBF5U.js → chunk-FXTBHTWY.js} +362 -42
- package/dist/chunk-ILFETZOM.js +131 -0
- package/dist/{chunk-5ZCKQ2MI.js → chunk-IXCHURVK.js} +7 -3
- package/dist/{chunk-6ERIMTBC.js → chunk-JYGD5WSN.js} +5 -0
- package/dist/{chunk-4VNS5WPM.js → chunk-KI2EY3WB.js} +4 -0
- package/dist/{chunk-3U4SPZD5.js → chunk-L2VOGB2X.js} +7 -104
- package/dist/{chunk-NB2VEIWG.js → chunk-MZ2WEHHY.js} +7 -3
- package/dist/{chunk-BUBSSKO6.js → chunk-O6ZZF52V.js} +5 -1
- package/dist/{chunk-LBFH7THC.js → chunk-OWED2GRM.js} +5 -1
- package/dist/{chunk-4MG3BVHE.js → chunk-OXWDY22G.js} +6 -2
- package/dist/{chunk-4FABQGQP.js → chunk-Q2CIRAOK.js} +5 -0
- package/dist/{chunk-4LEL3H2Z.js → chunk-RPHRPFEH.js} +5 -0
- package/dist/{chunk-46YJFP4S.js → chunk-SQ77DZOI.js} +1728 -1484
- package/dist/{chunk-S6DSRLNE.js → chunk-TGIINPVM.js} +15 -2
- package/dist/{chunk-U2DPZSXA.js → chunk-TYVME3XD.js} +9 -1
- package/dist/{chunk-HFYDYK4D.js → chunk-V6AN6XLZ.js} +18 -6
- package/dist/{chunk-ZKJOFWBJ.js → chunk-VDMQJHPI.js} +38 -15
- package/dist/{chunk-E6W2JMMU.js → chunk-VFINNTUL.js} +22 -1
- package/dist/{chunk-OJE6YWPQ.js → chunk-VWPEKOH6.js} +6 -2
- package/dist/{chunk-5N7VUGL6.js → chunk-W73X43R7.js} +6 -2
- package/dist/cloud-7QYOGF7F.js +11 -0
- package/dist/cloud-ZSKOS4GY.js +30 -0
- package/dist/detect-SH4FHFBI.js +36 -0
- package/dist/{dist-L3MPOWCA.js → dist-IQJ6H6UZ.js} +6 -2
- package/dist/{dist-es-KE56MWYO.js → dist-es-5DY7K32L.js} +9 -5
- package/dist/dist-es-JSTDUS7Q.js +26 -0
- package/dist/{dist-es-GTAMF674.js → dist-es-OSNJBLXB.js} +8 -4
- package/dist/{dist-es-NRZIQY5B.js → dist-es-RYHIPOTN.js} +17 -13
- package/dist/{dist-es-XQCOTGC7.js → dist-es-VNKHQVIB.js} +7 -3
- package/dist/{dist-es-WZCR7DHQ.js → dist-es-WV4AMOII.js} +11 -7
- package/dist/{dist-es-ZW3HFQUM.js → dist-es-X3B5QYKB.js} +9 -5
- package/dist/docker-U7AF5PTA.js +16 -0
- package/dist/docker-edge-executor-VHW3JPJS.js +13 -0
- package/dist/edge-import-V5CBA47C.js +45 -0
- package/dist/ensure-container-edge-CMYROUSI.js +33 -0
- package/dist/{event-streams-7LGDL56D.js → event-streams-EHRAKL75.js} +7 -3
- package/dist/executor-YPT6RH6O.js +30 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +258 -245
- package/dist/{loadSso-N273C5I7.js → loadSso-46FQRIZS.js} +13 -9
- package/dist/local-executor-V7U5VOZW.js +12 -0
- package/dist/nginx-2GTRUIDE.js +24 -0
- package/dist/noop-FMMFG2EZ.js +11 -0
- package/dist/{openresty-lua-HAO4EUDY.js → openresty-lua-4WLGDSER.js} +13 -3
- package/dist/server/engine/ChangeLog +2289 -0
- package/dist/server/engine/Documentations +5 -0
- package/dist/server/engine/LICENSE +674 -0
- package/dist/server/engine/README.md +34 -0
- package/dist/server/engine/conf/amavisd +150 -0
- package/dist/server/engine/conf/clamav +71 -0
- package/dist/server/engine/conf/core +632 -0
- package/dist/server/engine/conf/dovecot +151 -0
- package/dist/server/engine/conf/fail2ban +72 -0
- package/dist/server/engine/conf/global +698 -0
- package/dist/server/engine/conf/iredapd +52 -0
- package/dist/server/engine/conf/logwatch +28 -0
- package/dist/server/engine/conf/postfix +97 -0
- package/dist/server/engine/conf/postgresql +93 -0
- package/dist/server/engine/conf/spamassassin +39 -0
- package/dist/server/engine/dialog/config_via_dialog.sh +258 -0
- package/dist/server/engine/dialog/optional_components.sh +122 -0
- package/dist/server/engine/dialog/pgsql_config.sh +52 -0
- package/dist/server/engine/dialog/virtual_domain_config.sh +94 -0
- package/dist/server/engine/functions/amavisd.sh +267 -0
- package/dist/server/engine/functions/backend.sh +85 -0
- package/dist/server/engine/functions/clamav.sh +100 -0
- package/dist/server/engine/functions/cleanup.sh +393 -0
- package/dist/server/engine/functions/dovecot.sh +583 -0
- package/dist/server/engine/functions/fail2ban.sh +209 -0
- package/dist/server/engine/functions/iredapd.sh +356 -0
- package/dist/server/engine/functions/optional_components.sh +24 -0
- package/dist/server/engine/functions/packages.sh +522 -0
- package/dist/server/engine/functions/packages_freebsd.sh +179 -0
- package/dist/server/engine/functions/postfix.sh +457 -0
- package/dist/server/engine/functions/postgresql.sh +239 -0
- package/dist/server/engine/functions/spamassassin.sh +49 -0
- package/dist/server/engine/functions/system_accounts.sh +128 -0
- package/dist/server/engine/iRedMail.sh +144 -0
- package/dist/server/engine/pkgs/get_all.sh +338 -0
- package/dist/server/engine/pkgs/pkgs.freebsd.sha256 +3 -0
- package/dist/server/engine/pkgs/pkgs.openbsd.sha256 +6 -0
- package/dist/server/engine/pkgs/pkgs.sha256 +1 -0
- package/dist/server/engine/samples/amavisd/amavisd.conf +677 -0
- package/dist/server/engine/samples/amavisd/amavisd.mysql +278 -0
- package/dist/server/engine/samples/amavisd/amavisd.pgsql +253 -0
- package/dist/server/engine/samples/amavisd/amavisd.schema +942 -0
- package/dist/server/engine/samples/amavisd/default_spam_policy.sql +46 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-mariadb.conf +758 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-openldap.conf +767 -0
- package/dist/server/engine/samples/dovecot/dovecot-2.4-pgsql.conf +762 -0
- package/dist/server/engine/samples/dovecot/dovecot-last-login.conf +50 -0
- package/dist/server/engine/samples/dovecot/dovecot-ldap.conf +21 -0
- package/dist/server/engine/samples/dovecot/dovecot-share-folder.conf +22 -0
- package/dist/server/engine/samples/dovecot/dovecot-sql.conf +28 -0
- package/dist/server/engine/samples/dovecot/dovecot-used-quota.conf +13 -0
- package/dist/server/engine/samples/dovecot/dovecot.conf +484 -0
- package/dist/server/engine/samples/dovecot/dovecot.sieve +7 -0
- package/dist/server/engine/samples/dovecot/dovecot2-quota-warning.sh +38 -0
- package/dist/server/engine/samples/dovecot/sql/imap_share_folder.mysql +16 -0
- package/dist/server/engine/samples/dovecot/sql/last_login.mysql +12 -0
- package/dist/server/engine/samples/dovecot/sql/used_quota.mysql +26 -0
- package/dist/server/engine/samples/dovecot/systemd/override.conf +3 -0
- package/dist/server/engine/samples/fail2ban/action.d/banned_db.conf +9 -0
- package/dist/server/engine/samples/fail2ban/bin/fail2ban_banned_db +268 -0
- package/dist/server/engine/samples/fail2ban/fail2ban.local +17 -0
- package/dist/server/engine/samples/fail2ban/filter.d/dovecot.iredmail.conf +5 -0
- package/dist/server/engine/samples/fail2ban/filter.d/postfix-pregreet.iredmail.conf +16 -0
- package/dist/server/engine/samples/fail2ban/filter.d/postfix.iredmail.conf +18 -0
- package/dist/server/engine/samples/fail2ban/filter.d/roundcube.iredmail.conf +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/dovecot.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/nginx-http-auth.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/postfix-pregreet.local +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/postfix.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/roundcube.local +9 -0
- package/dist/server/engine/samples/fail2ban/jail.d/sogo.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.d/sshd.local +8 -0
- package/dist/server/engine/samples/fail2ban/jail.local +6 -0
- package/dist/server/engine/samples/fail2ban/openbsd/rc +27 -0
- package/dist/server/engine/samples/fail2ban/sql/fail2ban.mysql +49 -0
- package/dist/server/engine/samples/fail2ban/sql/fail2ban.pgsql +48 -0
- package/dist/server/engine/samples/firewall/firewalld/services/ssh.xml +6 -0
- package/dist/server/engine/samples/firewall/firewalld/zones/iredmail.xml +15 -0
- package/dist/server/engine/samples/firewall/iptables/ip6tables.init.debian +362 -0
- package/dist/server/engine/samples/firewall/iptables/ip6tables.rules +53 -0
- package/dist/server/engine/samples/firewall/iptables/iptables.init.debian +363 -0
- package/dist/server/engine/samples/firewall/iptables/iptables.rules +54 -0
- package/dist/server/engine/samples/firewall/nftables.conf +58 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/dovecot.conf +3 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/iredapd.conf +1 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/mlmmjadmin.conf +1 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/php-fpm.conf +2 -0
- package/dist/server/engine/samples/freebsd/newsyslog.conf.d/slapd.conf +1 -0
- package/dist/server/engine/samples/freebsd/syslog.d/dovecot.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/fail2ban.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/iredapd.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/mlmmjadmin.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/php-fpm.conf +2 -0
- package/dist/server/engine/samples/freebsd/syslog.d/slapd.conf +2 -0
- package/dist/server/engine/samples/iredmail/iredmail.mysql +491 -0
- package/dist/server/engine/samples/iredmail/iredmail.pgsql +465 -0
- package/dist/server/engine/samples/iredmail/iredmail.schema +456 -0
- package/dist/server/engine/samples/iredmail/used_quota_triggers_dovecot_2.3.pgsql +40 -0
- package/dist/server/engine/samples/iredmail/used_quota_triggers_dovecot_2.4.pgsql +18 -0
- package/dist/server/engine/samples/logrotate/dovecot +13 -0
- package/dist/server/engine/samples/logrotate/iredapd +13 -0
- package/dist/server/engine/samples/logrotate/mlmmjadmin +13 -0
- package/dist/server/engine/samples/logrotate/openldap +19 -0
- package/dist/server/engine/samples/logrotate/php-fpm +13 -0
- package/dist/server/engine/samples/openbsd/ldapd.conf +58 -0
- package/dist/server/engine/samples/openbsd/pf.conf +28 -0
- package/dist/server/engine/samples/postfix/command_filter.pcre +3 -0
- package/dist/server/engine/samples/postfix/freebsd/mailer.conf +9 -0
- package/dist/server/engine/samples/postfix/helo_access.pcre +180 -0
- package/dist/server/engine/samples/postfix/ldap/catchall_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/recipient_bcc_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/recipient_bcc_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/relay_domains.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_bcc_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_bcc_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_dependent_relayhost_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_dependent_relayhost_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/sender_login_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/transport_maps_domain.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/transport_maps_user.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_alias_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_group_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_group_members_maps.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_mailbox_domains.cf +11 -0
- package/dist/server/engine/samples/postfix/ldap/virtual_mailbox_maps.cf +12 -0
- package/dist/server/engine/samples/postfix/main.cf +282 -0
- package/dist/server/engine/samples/postfix/main.cf.amavisd +7 -0
- package/dist/server/engine/samples/postfix/main.cf.dovecot +8 -0
- package/dist/server/engine/samples/postfix/main.cf.ldap +39 -0
- package/dist/server/engine/samples/postfix/main.cf.mlmmj +5 -0
- package/dist/server/engine/samples/postfix/main.cf.mysql +39 -0
- package/dist/server/engine/samples/postfix/main.cf.pgsql +39 -0
- package/dist/server/engine/samples/postfix/main.cf.postscreen +30 -0
- package/dist/server/engine/samples/postfix/master.cf +87 -0
- package/dist/server/engine/samples/postfix/mysql/catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/domain_alias_catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/domain_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/recipient_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/recipient_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/relay_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/sender_dependent_relayhost_maps.cf +6 -0
- package/dist/server/engine/samples/postfix/mysql/sender_login_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_maillist.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/transport_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_mailbox_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/mysql/virtual_mailbox_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/domain_alias_catchall_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/domain_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/recipient_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/recipient_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/relay_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_bcc_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_bcc_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_dependent_relayhost_maps.cf +6 -0
- package/dist/server/engine/samples/postfix/pgsql/sender_login_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_domain.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_maillist.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/transport_maps_user.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_alias_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_mailbox_domains.cf +5 -0
- package/dist/server/engine/samples/postfix/pgsql/virtual_mailbox_maps.cf +5 -0
- package/dist/server/engine/samples/postfix/postscreen_access.cidr +6 -0
- package/dist/server/engine/samples/postgresql/sql/add_first_domain_and_user.sql +34 -0
- package/dist/server/engine/samples/postgresql/sql/grant_permissions.sql +14 -0
- package/dist/server/engine/samples/postgresql/sql/init_vmail_db.sql +15 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-dovecot.conf +23 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-fail2ban.conf +2 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-iredapd.conf +12 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-mlmmjadmin.conf +12 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-openldap.conf +2 -0
- package/dist/server/engine/samples/rsyslog.d/1-iredmail-phpfpm.conf +3 -0
- package/dist/server/engine/samples/spamassassin/local.cf +186 -0
- package/dist/server/engine/samples/spamassassin/razor.conf +1 -0
- package/dist/server/engine/samples/systemd/clamd.service.d/override.conf +2 -0
- package/dist/server/engine/samples/systemd/mariadb.service.d/override.conf +3 -0
- package/dist/server/engine/samples/systemd/slapd.service.d/override.conf +6 -0
- package/dist/server/engine/samples/yum/CentOS-Linux-AppStream.repo +6 -0
- package/dist/server/engine/samples/yum/CentOS-Linux-PowerTools.repo +6 -0
- package/dist/server/engine/samples/yum/CentOS-Stream-AppStream.repo +7 -0
- package/dist/server/engine/samples/yum/CentOS-Stream-PowerTools.repo +7 -0
- package/dist/server/engine/samples/yum/symas-openldap.repo +6 -0
- package/dist/server/engine/tools/add_enabled_service.py +60 -0
- package/dist/server/engine/tools/backup_mysql.sh +238 -0
- package/dist/server/engine/tools/backup_openldap.sh +230 -0
- package/dist/server/engine/tools/backup_pgsql.sh +217 -0
- package/dist/server/engine/tools/backup_sogo.sh +156 -0
- package/dist/server/engine/tools/create_mail_user_OpenLDAP.py +335 -0
- package/dist/server/engine/tools/create_mail_user_OpenLDAP.sh +287 -0
- package/dist/server/engine/tools/create_mail_user_SQL.sh +127 -0
- package/dist/server/engine/tools/enable_postscreen.sh +144 -0
- package/dist/server/engine/tools/fail2ban_unban_ip.sh +39 -0
- package/dist/server/engine/tools/find_sasl_login_ip.sh +20 -0
- package/dist/server/engine/tools/find_top_sasl_usernames.sh +28 -0
- package/dist/server/engine/tools/generate_ssl_keys.sh +85 -0
- package/dist/server/engine/tools/kill_high_cpu_sogo_process.sh +32 -0
- package/dist/server/engine/tools/ldap_assign_user_to_groups.py +151 -0
- package/dist/server/engine/tools/ldap_move_members_to_another_group.py +129 -0
- package/dist/server/engine/tools/migrate_sql_alias_table.py +177 -0
- package/dist/server/engine/update/0.9.8/amavisd.mysql +29 -0
- package/dist/server/engine/update/0.9.8/amavisd.pgsql +39 -0
- package/dist/server/engine/update/0.9.8/iredmail.mysql +53 -0
- package/dist/server/engine/update/0.9.8/iredmail.pgsql +61 -0
- package/dist/server/engine/update/0.9.9/iredmail.mysql +2 -0
- package/dist/server/engine/update/0.9.9/iredmail.pgsql +2 -0
- package/dist/server/engine/update/1.0/iredmail.mysql +2 -0
- package/dist/server/engine/update/1.0/iredmail.pgsql +2 -0
- package/dist/server/engine/update/1.2/last_login.mysql +16 -0
- package/dist/server/engine/update/1.4.0/iredmail.mysql +22 -0
- package/dist/server/engine/update/1.4.0/iredmail.pgsql +20 -0
- package/dist/server/engine/update/1.4.1/iredmail.mysql +3 -0
- package/dist/server/engine/update/1.4.1/iredmail.pgsql +3 -0
- package/dist/server/engine/update/1.4.1/sogo.mysql +11 -0
- package/dist/server/engine/update/1.4.1/sogo.pgsql +30 -0
- package/dist/server/engine/update/1.4.1/update-ldap.py +66 -0
- package/dist/server/engine/update/1.4.2/iredmail.mysql +9 -0
- package/dist/server/engine/update/1.4.2/iredmail.pgsql +9 -0
- package/dist/server/engine/update/1.4.2/sogo.pgsql +30 -0
- package/dist/server/engine/update/1.6.0/sogo_view.pgsql +27 -0
- package/dist/server/engine/update/1.6.3/iredmail.mysql +1 -0
- package/dist/server/engine/update/1.7.0/fail2ban.mysql +11 -0
- package/dist/server/engine/update/1.7.0/fail2ban.pgsql +12 -0
- package/dist/server/engine/update/1.7.1/amavisd.mysql +1 -0
- package/dist/server/engine/update/1.7.2/vmail.mysql +30 -0
- package/dist/server/engine/update/1.7.3/deleted_mailboxes.mysql +43 -0
- package/dist/server/engine/update/1.7.3/iredadmin.mysql +26 -0
- package/dist/server/engine/update/1.7.3/vmail.mysql +79 -0
- package/dist/server/engine/update/1.7.3/vmail.pgsql +9 -0
- package/dist/server/engine/update/README.md +1 -0
- package/dist/server/engine/update/ldap/README.md +40 -0
- package/dist/server/engine/update/ldap/update-ldap-dovecot-2.3.py +69 -0
- package/dist/server/index.js +55574 -53675
- package/dist/server/migrations/0071_gh_device_token.sql +3 -0
- package/dist/server/migrations/0072_gh_device_token_method.sql +1 -0
- package/dist/server/migrations/meta/_journal.json +14 -0
- package/dist/setup-HQIZLUOJ.js +20 -0
- package/dist/{signin-DR462ERO.js → signin-ITOPKKUB.js} +13 -9
- package/dist/{sso-oidc-VBZLJUK5.js → sso-oidc-NON2PD7Y.js} +13 -9
- package/dist/{sts-EJLZ4Z77.js → sts-HHFFSAY2.js} +12 -8
- package/package.json +1 -1
- package/dist/bare-ITM45QBX.js +0 -18
- package/dist/cloud-JMPHO3CW.js +0 -7
- package/dist/cloud-W5G6YXAY.js +0 -24
- package/dist/dist-es-4C322O5D.js +0 -22
- package/dist/docker-3FVJMFC3.js +0 -12
- package/dist/docker-edge-executor-ZIWAZWPL.js +0 -9
- package/dist/edge-import-Y34YL6JK.js +0 -39
- package/dist/executor-J7BHW5HF.js +0 -26
- package/dist/nginx-YZWKYKQU.js +0 -16
- package/dist/noop-RRNCIUI5.js +0 -7
- package/dist/setup-5X3WEEHA.js +0 -14
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Author: Zhang Huangbin (zhb _at_ iredmail.org)
|
|
4
|
+
|
|
5
|
+
#---------------------------------------------------------------------
|
|
6
|
+
# This file is part of iRedMail, which is an open source mail server
|
|
7
|
+
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
|
|
8
|
+
#
|
|
9
|
+
# iRedMail is free software: you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
# (at your option) any later version.
|
|
13
|
+
#
|
|
14
|
+
# iRedMail is distributed in the hope that it will be useful,
|
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
# GNU General Public License for more details.
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the GNU General Public License
|
|
20
|
+
# along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
#---------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
export PROG_NAME='iRedMail'
|
|
24
|
+
export PROG_NAME_LOWERCASE='iredmail'
|
|
25
|
+
export PROG_VERSION='1.8.1'
|
|
26
|
+
|
|
27
|
+
export DATE="$(/bin/date +%Y.%m.%d.%H.%M.%S)"
|
|
28
|
+
|
|
29
|
+
# For perl and run-time locale setting.
|
|
30
|
+
export LC_ALL=C
|
|
31
|
+
export LC_CTYPE=C
|
|
32
|
+
export LANG=C
|
|
33
|
+
|
|
34
|
+
# Tells ncurses (dialog) to use Unicode values which correspond to the VT100
|
|
35
|
+
# line-drawing glyphs.
|
|
36
|
+
export NCURSES_NO_UTF8_ACS=1
|
|
37
|
+
|
|
38
|
+
# Debug mode: YES, NO.
|
|
39
|
+
export IREDMAIL_DEBUG="${IREDMAIL_DEBUG:=NO}"
|
|
40
|
+
|
|
41
|
+
# -----------------
|
|
42
|
+
# ---- Generic ----
|
|
43
|
+
# -----------------
|
|
44
|
+
# Maildir style: hashed, normal.
|
|
45
|
+
export MAILDIR_STYLE='hashed'
|
|
46
|
+
|
|
47
|
+
# Mailboxes will be stored under sub-directory ${STORAGE_NODE} of vmail user's
|
|
48
|
+
# home directory. e.g. home directory is /var/vmail, the mailboxes will be
|
|
49
|
+
# /var/vmail/vmail1.
|
|
50
|
+
export STORAGE_NODE="${STORAGE_NODE:=vmail1}"
|
|
51
|
+
|
|
52
|
+
# Enabled backends.
|
|
53
|
+
export ENABLE_BACKEND_OPENLDAP='YES'
|
|
54
|
+
export ENABLE_BACKEND_PGSQL='YES'
|
|
55
|
+
export ENABLE_BACKEND_MARIADB='YES'
|
|
56
|
+
|
|
57
|
+
# For better distributed deployment
|
|
58
|
+
#
|
|
59
|
+
# IP address of localhost.
|
|
60
|
+
# Usually it's 127.0.0.1, but not in FreeBSD Jail.
|
|
61
|
+
export LOCAL_ADDRESS="${LOCAL_ADDRESS:=127.0.0.1}"
|
|
62
|
+
|
|
63
|
+
# LDAP server
|
|
64
|
+
export LDAP_SERVER_HOST="${LDAP_SERVER_HOST:=${LOCAL_ADDRESS}}"
|
|
65
|
+
export LDAP_SERVER_PORT="${LDAP_SERVER_PORT:=389}"
|
|
66
|
+
|
|
67
|
+
# MySQL server
|
|
68
|
+
export MYSQL_SERVER_ADDRESS="${MYSQL_SERVER_ADDRESS:=${LOCAL_ADDRESS}}"
|
|
69
|
+
export MYSQL_SERVER_PORT="${MYSQL_SERVER_PORT:=3306}"
|
|
70
|
+
export MYSQL_ROOT_USER="${MYSQL_ROOT_USER:=root}"
|
|
71
|
+
|
|
72
|
+
# Use existing MySQL server, no matter it's local or remote.
|
|
73
|
+
export USE_EXISTING_MYSQL="${USE_EXISTING_MYSQL:=NO}"
|
|
74
|
+
# Create required SQL databases and records for applications
|
|
75
|
+
# Should be set to NO if you're installing iRedMail with a MySQL cluster, and
|
|
76
|
+
# you're installing on second or later nodes.
|
|
77
|
+
export INITIALIZE_SQL_DATA="${INITIALIZE_SQL_DATA:=YES}"
|
|
78
|
+
|
|
79
|
+
# PGSQL server
|
|
80
|
+
export PGSQL_SERVER_ADDRESS="${PGSQL_SERVER_ADDRESS:=${LOCAL_ADDRESS}}"
|
|
81
|
+
export PGSQL_SERVER_PORT="${PGSQL_SERVER_PORT:=5432}"
|
|
82
|
+
# host address used in ~postgres/.pgpass
|
|
83
|
+
export PGSQL_PGPASS_HOST='localhost'
|
|
84
|
+
if [ X"${LOCAL_ADDRESS}" != X'127.0.0.1' ]; then
|
|
85
|
+
export PGSQL_PGPASS_HOST="${LOCAL_ADDRESS}"
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# Dovecot: POP3, IMAP, managesieve
|
|
89
|
+
export IMAP_SERVER="${IMAP_SERVER:=${LOCAL_ADDRESS}}"
|
|
90
|
+
export LMTP_BIND_ADDRESS="${LMTP_BIND_ADDRESS:=${LOCAL_ADDRESS}}"
|
|
91
|
+
export LMTP_BIND_PORT="${LMTP_BIND_PORT:=24}"
|
|
92
|
+
export MANAGESIEVE_BIND_HOST="${MANAGESIEVE_BIND_HOST:=${LOCAL_ADDRESS}}"
|
|
93
|
+
export MANAGESIEVE_BIND_PORT="${MANAGESIEVE_BIND_PORT:=4190}"
|
|
94
|
+
export MANAGESIEVE_SERVER="${MANAGESIEVE_SERVER:=${LOCAL_ADDRESS}}"
|
|
95
|
+
export MANAGESIEVE_PORT="${MANAGESIEVE_PORT:=4190}"
|
|
96
|
+
export DOVECOT_SERVICE_QUOTA_STATUS_BIND_ADDRESS="${DOVECOT_QUOTA_STATUS_BIND_ADDRESS:=127.0.0.1}"
|
|
97
|
+
# SMTP server (Postfix)
|
|
98
|
+
export SMTP_SERVER="${SMTP_SERVER:=${LOCAL_ADDRESS}}"
|
|
99
|
+
# php-fpm
|
|
100
|
+
export PHP_FPM_BIND_HOST="${PHP_FPM_BIND_HOST:=${LOCAL_ADDRESS}}"
|
|
101
|
+
export PHP_FPM_PORT="${PHP_FPM_PORT:=9999}"
|
|
102
|
+
# Amavisd
|
|
103
|
+
export AMAVISD_SERVER="${LOCAL_ADDRESS}"
|
|
104
|
+
# ClamAV
|
|
105
|
+
export CLAMD_BIND_HOST="${LOCAL_ADDRESS}"
|
|
106
|
+
# iRedAPD
|
|
107
|
+
export IREDAPD_BIND_HOST="${LOCAL_ADDRESS}"
|
|
108
|
+
export IREDAPD_SERVER_ADDRESS="${IREDAPD_SERVER_ADDRESS:=${IREDAPD_BIND_HOST}}"
|
|
109
|
+
# mlmmjadmin
|
|
110
|
+
export MLMMJADMIN_BIND_HOST="${LOCAL_ADDRESS}"
|
|
111
|
+
export MLMMJADMIN_SERVER_ADDRESS="${MLMMJADMIN_SERVER_ADDRESS:=${MLMMJADMIN_BIND_HOST}}"
|
|
112
|
+
# For managesieve service and software.
|
|
113
|
+
export USE_MANAGESIEVE='YES'
|
|
114
|
+
|
|
115
|
+
# vmail user/group name, uid and gid.
|
|
116
|
+
export SYS_USER_VMAIL='vmail'
|
|
117
|
+
export SYS_GROUP_VMAIL='vmail'
|
|
118
|
+
|
|
119
|
+
# netdata
|
|
120
|
+
export SYS_USER_NETDATA='netdata'
|
|
121
|
+
export SYS_GROUP_NETDATA='netdata'
|
|
122
|
+
|
|
123
|
+
# Specify UID/GID for system accounts. Required if you have multiple LDA/LMTP
|
|
124
|
+
# servers access same mailbox storage. e.g. cluster environment.
|
|
125
|
+
# vmail
|
|
126
|
+
export SYS_USER_VMAIL_UID='2000'
|
|
127
|
+
export SYS_GROUP_VMAIL_GID='2000'
|
|
128
|
+
# iredadmin
|
|
129
|
+
export SYS_USER_IREDADMIN_UID='2001'
|
|
130
|
+
export SYS_GROUP_IREDADMIN_GID='2001'
|
|
131
|
+
# netdata
|
|
132
|
+
export SYS_USER_IREDAPD_UID='2002'
|
|
133
|
+
export SYS_GROUP_IREDAPD_GID='2002'
|
|
134
|
+
# mlmmj
|
|
135
|
+
export SYS_USER_MLMMJ_UID='2003'
|
|
136
|
+
export SYS_GROUP_MLMMJ_GID='2003'
|
|
137
|
+
# netdata
|
|
138
|
+
export SYS_USER_NETDATA_UID='2004'
|
|
139
|
+
export SYS_GROUP_NETDATA_GID='2004'
|
|
140
|
+
|
|
141
|
+
# Default SQL database name used to store mail accounts.
|
|
142
|
+
export VMAIL_DB_NAME='vmail'
|
|
143
|
+
export VMAIL_DB_BIND_USER='vmail'
|
|
144
|
+
export VMAIL_DB_ADMIN_USER='vmailadmin'
|
|
145
|
+
|
|
146
|
+
# Default virtual domain admin name without domain name (@example.com).
|
|
147
|
+
export DOMAIN_ADMIN_NAME='postmaster'
|
|
148
|
+
|
|
149
|
+
# Directory used to store mailboxes
|
|
150
|
+
export STORAGE_BASE_DIR="${STORAGE_BASE_DIR:=/var/vmail}"
|
|
151
|
+
|
|
152
|
+
# Tools.
|
|
153
|
+
export CONFIG_VIA_DIALOG="${DIALOG_DIR}/config_via_dialog.sh"
|
|
154
|
+
# Note: config file will be sourced in file 'conf/core', function 'check_env()'.
|
|
155
|
+
export IREDMAIL_CONFIG_FILE="${ROOTDIR}/config"
|
|
156
|
+
export TIP_FILE="${ROOTDIR}/${PROG_NAME}.tips"
|
|
157
|
+
export DOC_FILE="${ROOTDIR}/Documentations"
|
|
158
|
+
export STATUS_FILE="${RUNTIME_DIR}/install.status"
|
|
159
|
+
export INSTALL_LOG="${RUNTIME_DIR}/install.log"
|
|
160
|
+
export PKG_INSTALL_LOG="${RUNTIME_DIR}/pkg.install.log"
|
|
161
|
+
# Directory used to store kv files (one value in one file).
|
|
162
|
+
export IREDMAIL_KV_DIR='/root/.iredmail/kv'
|
|
163
|
+
|
|
164
|
+
# Output flag.
|
|
165
|
+
export _INFO_FLAG="[ INFO ]"
|
|
166
|
+
export _SKIP_FLAG="< SKIP >"
|
|
167
|
+
export _ERROR_FLAG="<< ERROR >>"
|
|
168
|
+
export _QUESTION_FLAG="< Question >"
|
|
169
|
+
export _BACKUP_FLAG=" + < Backup >"
|
|
170
|
+
export _DEBUG_FLAG=" + < DEBUG >"
|
|
171
|
+
|
|
172
|
+
export CONF_MSG="#
|
|
173
|
+
# File generated by ${PROG_NAME} (${DATE}):
|
|
174
|
+
#
|
|
175
|
+
# Version: ${PROG_VERSION}
|
|
176
|
+
# Project: https://www.iredmail.org/
|
|
177
|
+
#
|
|
178
|
+
# Community: https://forum.iredmail.org/
|
|
179
|
+
#
|
|
180
|
+
"
|
|
181
|
+
|
|
182
|
+
# TERM.
|
|
183
|
+
if [ X"${TERM}" == X"" ]; then
|
|
184
|
+
export TERM='xterm'
|
|
185
|
+
fi
|
|
186
|
+
|
|
187
|
+
# Logrotate configuration directory.
|
|
188
|
+
export LOGROTATE_DIR='/etc/logrotate.d'
|
|
189
|
+
|
|
190
|
+
# Kernel name, in upper cases.
|
|
191
|
+
export KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')"
|
|
192
|
+
|
|
193
|
+
# Command used to genrate a random string.
|
|
194
|
+
# Usage: str="$(${RANDOM_STRING})"
|
|
195
|
+
if [ X"${KERNEL_NAME}" == X'OPENBSD' ]; then
|
|
196
|
+
export RANDOM_STRING='eval </dev/random tr -cd [:alnum:] | fold -w 32 | head -1'
|
|
197
|
+
elif [ X"${KERNEL_NAME}" == X'FREEBSD' ]; then
|
|
198
|
+
export RANDOM_STRING='eval </dev/urandom LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 32'
|
|
199
|
+
else
|
|
200
|
+
# Linux/FreeBSD
|
|
201
|
+
export RANDOM_STRING='eval </dev/urandom tr -dc A-Za-z0-9 | (head -c $1 &>/dev/null || head -c 32)'
|
|
202
|
+
fi
|
|
203
|
+
|
|
204
|
+
# Global variable to store missing packages before installing all mail
|
|
205
|
+
# services related packages.
|
|
206
|
+
export MISSING_PKGS=""
|
|
207
|
+
|
|
208
|
+
# command: dialog.
|
|
209
|
+
export BIN_DIALOG="dialog"
|
|
210
|
+
export PKG_DIALOG="dialog"
|
|
211
|
+
|
|
212
|
+
# command: bzip2.
|
|
213
|
+
export BIN_BZIP2='bzip2'
|
|
214
|
+
export PKG_BZIP2='bzip2'
|
|
215
|
+
|
|
216
|
+
# Shells
|
|
217
|
+
export SHELL_NOLOGIN='/sbin/nologin'
|
|
218
|
+
export SHELL_BASH='/bin/bash'
|
|
219
|
+
|
|
220
|
+
# Path to some programs
|
|
221
|
+
export CMD_PYTHON3='python3'
|
|
222
|
+
export CMD_PIP3='pip3'
|
|
223
|
+
|
|
224
|
+
# Default password scheme for SQL backends.
|
|
225
|
+
# LDAP backend will use SSHA instead (defined in dialog/config_via_dialog.sh)
|
|
226
|
+
# for easier third-party application integrations.
|
|
227
|
+
export DEFAULT_PASSWORD_SCHEME='SSHA512'
|
|
228
|
+
|
|
229
|
+
# Check distribution.
|
|
230
|
+
# - DISTRO
|
|
231
|
+
# - DISTRO_VERSION
|
|
232
|
+
# - DISTRO_CODENAME
|
|
233
|
+
#
|
|
234
|
+
# UNSUPPORTED_RELEASE will be set to 'YES' if current Linux/BSD release is
|
|
235
|
+
# an old release and unsupported anymore.
|
|
236
|
+
export UNSUPPORTED_RELEASE='NO'
|
|
237
|
+
|
|
238
|
+
# Detect distro name and release version.
|
|
239
|
+
if [ X"${KERNEL_NAME}" == X'LINUX' ]; then
|
|
240
|
+
export DISTRO_VERSION=$(awk -F'"' '/^VERSION_ID=/ {print $2}' /etc/os-release)
|
|
241
|
+
|
|
242
|
+
# Debian:
|
|
243
|
+
# - 12: bookworm
|
|
244
|
+
# - 13: trixie
|
|
245
|
+
# Ubuntu:
|
|
246
|
+
# - 24.04: noble
|
|
247
|
+
# - 26.04: noble
|
|
248
|
+
export DISTRO_CODENAME=$(awk -F'=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release)
|
|
249
|
+
|
|
250
|
+
# Directory of RC scripts.
|
|
251
|
+
export DIR_RC_SCRIPTS='/etc/init.d'
|
|
252
|
+
|
|
253
|
+
if [ -f /etc/redhat-release ]; then
|
|
254
|
+
# RHEL/CentOS/Rocky/Alma
|
|
255
|
+
export DISTRO='RHEL'
|
|
256
|
+
|
|
257
|
+
# RedHat has minor version number in `VERSION_ID` line, e.g. `VERSION_ID="8.3"`.
|
|
258
|
+
export DISTRO_VERSION="$(echo ${DISTRO_VERSION} | awk -F'.' '{print $1}')"
|
|
259
|
+
|
|
260
|
+
if [[ X"${DISTRO_VERSION}" != X'9' ]] && [[ X"${DISTRO_VERSION}" != X'10' ]]; then
|
|
261
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
262
|
+
fi
|
|
263
|
+
|
|
264
|
+
export CMD_UWSGI='/usr/sbin/uwsgi'
|
|
265
|
+
export UWSGI_PLUGIN_PYTHON="python3"
|
|
266
|
+
|
|
267
|
+
# Get distribution name as DISTRO_CODENAME
|
|
268
|
+
if [ -e /etc/rocky-release ]; then
|
|
269
|
+
export DISTRO_CODENAME='rocky'
|
|
270
|
+
elif [ -e /etc/almalinux-release ]; then
|
|
271
|
+
export DISTRO_CODENAME='alma'
|
|
272
|
+
elif [ -e /etc/centos-release ]; then
|
|
273
|
+
# CentOS Stream is ok, but not CentOS Linux.
|
|
274
|
+
if grep -i 'CentOS Stream release' /etc/centos-release &>/dev/null; then
|
|
275
|
+
export DISTRO_CODENAME='stream'
|
|
276
|
+
else
|
|
277
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
278
|
+
fi
|
|
279
|
+
else
|
|
280
|
+
if grep -i '^Red Hat Enterprise Linux' /etc/redhat-release &>/dev/null; then
|
|
281
|
+
# RHEL
|
|
282
|
+
export DISTRO_CODENAME='rhel'
|
|
283
|
+
else
|
|
284
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
285
|
+
fi
|
|
286
|
+
fi
|
|
287
|
+
|
|
288
|
+
elif [ -f /etc/lsb-release ] && grep -i 'DISTRIB_ID=Ubuntu' /etc/lsb-release &>/dev/null; then
|
|
289
|
+
# Ubuntu
|
|
290
|
+
export DISTRO='UBUNTU'
|
|
291
|
+
|
|
292
|
+
# Supported releases: 24.04, 26.04.
|
|
293
|
+
if echo "${DISTRO_VERSION}" | grep -E '^(24.04|26.04)' &>/dev/null ; then
|
|
294
|
+
:
|
|
295
|
+
else
|
|
296
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
297
|
+
fi
|
|
298
|
+
elif [ -f /etc/debian_version ]; then
|
|
299
|
+
# Debian
|
|
300
|
+
export DISTRO='DEBIAN'
|
|
301
|
+
|
|
302
|
+
# Supported releases: 12 (bookworm), 13 (trixie).
|
|
303
|
+
echo "${DISTRO_VERSION}" | grep -E '^(12|13)' &>/dev/null
|
|
304
|
+
if [[ $? != 0 ]]; then
|
|
305
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
306
|
+
fi
|
|
307
|
+
else
|
|
308
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
309
|
+
fi
|
|
310
|
+
elif [ X"${KERNEL_NAME}" == X'FREEBSD' ]; then
|
|
311
|
+
export DISTRO='FREEBSD'
|
|
312
|
+
export DISTRO_VERSION="$(uname -r |awk -F'[.-]' '{print $1}')"
|
|
313
|
+
|
|
314
|
+
export BIN_DIALOG="cdialog"
|
|
315
|
+
export PKG_DIALOG="cdialog"
|
|
316
|
+
|
|
317
|
+
# pkg mirror site.
|
|
318
|
+
export FREEBSD_PKG_MIRROR_URL='pkg+https://pkg.FreeBSD.org/${ABI}/quarterly'
|
|
319
|
+
export FREEBSD_PKG_MIRROR_TYPE=''
|
|
320
|
+
|
|
321
|
+
# Directory of RC scripts.
|
|
322
|
+
export DIR_RC_SCRIPTS='/usr/local/etc/rc.d'
|
|
323
|
+
export RC_CONF_LOCAL='/etc/rc.conf.local'
|
|
324
|
+
|
|
325
|
+
export CMD_PYTHON3='/usr/local/bin/python3'
|
|
326
|
+
|
|
327
|
+
# Unsupported releases: 7, 8, 9, 10, 11, 12, 13.
|
|
328
|
+
if echo "${DISTRO_VERSION}" | grep -E '^(7|8|9|10|11|12|13)' &>/dev/null ; then
|
|
329
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
330
|
+
fi
|
|
331
|
+
|
|
332
|
+
export SHELL_BASH='/usr/local/bin/bash'
|
|
333
|
+
|
|
334
|
+
# Default password scheme.
|
|
335
|
+
export DEFAULT_PASSWORD_SCHEME='BCRYPT'
|
|
336
|
+
|
|
337
|
+
elif [ X"${KERNEL_NAME}" == X'OPENBSD' ]; then
|
|
338
|
+
export DISTRO='OPENBSD'
|
|
339
|
+
export DISTRO_VERSION="$(uname -r)"
|
|
340
|
+
|
|
341
|
+
# Default password scheme.
|
|
342
|
+
export DEFAULT_PASSWORD_SCHEME='BCRYPT'
|
|
343
|
+
|
|
344
|
+
# Directory of RC scripts.
|
|
345
|
+
export DIR_RC_SCRIPTS='/etc/rc.d'
|
|
346
|
+
export RC_CONF_LOCAL='/etc/rc.conf.local'
|
|
347
|
+
export SHELL_BASH='/usr/local/bin/bash'
|
|
348
|
+
export PYTHON_VERSION='3.12'
|
|
349
|
+
export CMD_PYTHON3='/usr/local/bin/python3'
|
|
350
|
+
export CMD_PIP3="pip${PYTHON_VERSION}"
|
|
351
|
+
|
|
352
|
+
# Supported release: 7.8
|
|
353
|
+
echo "${DISTRO_VERSION}" | grep '^7\.8$' &>/dev/null
|
|
354
|
+
if [[ X"$?" != X"0" ]]; then
|
|
355
|
+
export UNSUPPORTED_RELEASE='YES'
|
|
356
|
+
fi
|
|
357
|
+
else
|
|
358
|
+
# Not support *BSD and other distrobutions yet.
|
|
359
|
+
echo "Error: Your OS is not supported yet."
|
|
360
|
+
exit 255
|
|
361
|
+
fi
|
|
362
|
+
|
|
363
|
+
# Exit and prompt to use a supported Linux/BSD distribution
|
|
364
|
+
if [ X"${UNSUPPORTED_RELEASE}" == X'YES' ]; then
|
|
365
|
+
cat <<EOF
|
|
366
|
+
********* ERROR *********
|
|
367
|
+
Release version of the operating system on this server is unsupported by
|
|
368
|
+
iRedMail, please access below link to get the latest iRedMail and a list
|
|
369
|
+
of supported Linux/BSD distributions and release versions.
|
|
370
|
+
|
|
371
|
+
http://www.iredmail.org/download.html
|
|
372
|
+
|
|
373
|
+
*************************
|
|
374
|
+
EOF
|
|
375
|
+
|
|
376
|
+
exit 255
|
|
377
|
+
fi
|
|
378
|
+
|
|
379
|
+
# Check processor type.
|
|
380
|
+
if [ X"${DISTRO}" == X'DEBIAN' ]; then
|
|
381
|
+
arch="$(uname -m)"
|
|
382
|
+
else
|
|
383
|
+
arch="$(uname -p)"
|
|
384
|
+
fi
|
|
385
|
+
|
|
386
|
+
case $arch in
|
|
387
|
+
i[3456]86) export OS_ARCH='i386' ;;
|
|
388
|
+
x86_64|amd64) export OS_ARCH='x86_64' ;;
|
|
389
|
+
*) export OS_ARCH="${arch}" ;;
|
|
390
|
+
esac
|
|
391
|
+
|
|
392
|
+
# Hostname.
|
|
393
|
+
if [ X"${IREDMAIL_HOSTNAME}" != X'' ]; then
|
|
394
|
+
# Read from 'IREDMAIL_HOSTNAME'
|
|
395
|
+
export HOSTNAME="${IREDMAIL_HOSTNAME}"
|
|
396
|
+
else
|
|
397
|
+
if [ X"${DISTRO}" == X'OPENBSD' ]; then
|
|
398
|
+
export HOSTNAME="$(hostname)"
|
|
399
|
+
else
|
|
400
|
+
export HOSTNAME="$(hostname -f)"
|
|
401
|
+
fi
|
|
402
|
+
fi
|
|
403
|
+
|
|
404
|
+
# root user/group name. Note: not all OSes have group 'root'.
|
|
405
|
+
export SYS_USER_ROOT='root'
|
|
406
|
+
export SYS_GROUP_ROOT='root'
|
|
407
|
+
|
|
408
|
+
# Syslog
|
|
409
|
+
export USE_RSYSLOG='YES'
|
|
410
|
+
export USE_BSD_SYSLOG='NO'
|
|
411
|
+
export SYS_USER_SYSLOG='root'
|
|
412
|
+
export SYS_GROUP_SYSLOG='root'
|
|
413
|
+
export SYSLOG_POSTROTATE_CMD='/usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true'
|
|
414
|
+
export SYSLOG_SOCKET='/dev/log'
|
|
415
|
+
export IREDMAIL_SYSLOG_FACILITY='local5'
|
|
416
|
+
# rsyslog
|
|
417
|
+
export SYSLOG_CONF_DIR='/etc/rsyslog.d'
|
|
418
|
+
|
|
419
|
+
# Use systemd
|
|
420
|
+
export USE_SYSTEMD='YES'
|
|
421
|
+
export SYSTEMD_SERVICE_DIR='/lib/systemd/system'
|
|
422
|
+
|
|
423
|
+
# install_pkg: function used to install packages without confirm.
|
|
424
|
+
# remove_pkg: function used to remove packages without confirm.
|
|
425
|
+
# LIST_ALL_PKGS: command used to list all installed packages.
|
|
426
|
+
# LIST_FILES_IN_PKG: command used to list files installed by special package.
|
|
427
|
+
if [ X"${DISTRO}" == X'RHEL' ]; then
|
|
428
|
+
# RHEL/CentOS.
|
|
429
|
+
# Package management.
|
|
430
|
+
if [ X"${YUM}" != X"" ]; then
|
|
431
|
+
export YUM="${YUM}"
|
|
432
|
+
else
|
|
433
|
+
export YUM="yum -d 2"
|
|
434
|
+
fi
|
|
435
|
+
export install_pkg='install_pkg_rhel'
|
|
436
|
+
export remove_pkg="remove_pkg_rhel"
|
|
437
|
+
export LIST_ALL_PKGS='rpm -qa'
|
|
438
|
+
export LIST_FILES_IN_PKG='rpm -ql'
|
|
439
|
+
|
|
440
|
+
# Directory /etc/sysconfig/ on RHEL/CentOS.
|
|
441
|
+
export ETC_SYSCONFIG_DIR='/etc/sysconfig'
|
|
442
|
+
|
|
443
|
+
# Firewalld
|
|
444
|
+
export USE_FIREWALLD='YES'
|
|
445
|
+
export FIREWALLD_CONF_DIR='/etc/firewalld'
|
|
446
|
+
export FIREWALLD_CONF='/etc/firewalld/firewalld.conf'
|
|
447
|
+
export FIREWALL_RULE_CONF="${FIREWALLD_CONF_DIR}/zones/iredmail.xml"
|
|
448
|
+
|
|
449
|
+
# main config file
|
|
450
|
+
export SYSLOG_CONF='/etc/rsyslog.conf'
|
|
451
|
+
|
|
452
|
+
# SSHD log file
|
|
453
|
+
export SSHD_LOGFILE='/var/log/secure'
|
|
454
|
+
|
|
455
|
+
# Crontab related.
|
|
456
|
+
export CRON_SPOOL_DIR='/var/spool/cron'
|
|
457
|
+
|
|
458
|
+
# Directory used to store SSL/TLS key/cert file.
|
|
459
|
+
export SSL_FILE_DIR="/etc/pki/tls"
|
|
460
|
+
export SSL_CA_FILE="/etc/pki/tls/certs/ca-bundle.crt"
|
|
461
|
+
|
|
462
|
+
# Yum repository related.
|
|
463
|
+
export YUM_REPOS_DIR='/etc/yum.repos.d'
|
|
464
|
+
export LOCAL_REPO_NAME="${PROG_NAME}"
|
|
465
|
+
export LOCAL_REPO_FILE="${YUM_REPOS_DIR}/${LOCAL_REPO_NAME}.repo"
|
|
466
|
+
|
|
467
|
+
elif [ X"${DISTRO}" == X'DEBIAN' -o X"${DISTRO}" == X'UBUNTU' ]; then
|
|
468
|
+
# Ubuntu & Debian.
|
|
469
|
+
export DEBIAN_FRONTEND='noninteractive'
|
|
470
|
+
export SHELL_NOLOGIN='/usr/sbin/nologin'
|
|
471
|
+
|
|
472
|
+
# Package management.
|
|
473
|
+
if [ X"${APTGET}" != X"" ]; then
|
|
474
|
+
export APTGET="${APTGET}"
|
|
475
|
+
else
|
|
476
|
+
# "WARNING: `apt` does not have a stable CLI interface. Use with caution in scripts."
|
|
477
|
+
export APTGET='apt-get'
|
|
478
|
+
fi
|
|
479
|
+
|
|
480
|
+
# Package management.
|
|
481
|
+
export install_pkg='install_pkg_debian'
|
|
482
|
+
export remove_pkg='remove_pkg_debian'
|
|
483
|
+
export LIST_ALL_PKGS="dpkg -l |awk '{print $2}'"
|
|
484
|
+
export LIST_FILES_IN_PKG='dpkg -L'
|
|
485
|
+
|
|
486
|
+
# Syslog
|
|
487
|
+
export SYS_GROUP_SYSLOG='adm'
|
|
488
|
+
if [ X"${DISTRO}" == X'DEBIAN' ]; then
|
|
489
|
+
export SYSLOG_CONF='/etc/rsyslog.conf'
|
|
490
|
+
elif [ X"${DISTRO}" == X'UBUNTU' ]; then
|
|
491
|
+
export SYS_USER_SYSLOG='syslog'
|
|
492
|
+
export SYSLOG_CONF='/etc/rsyslog.d/iredmail.conf'
|
|
493
|
+
fi
|
|
494
|
+
|
|
495
|
+
# SSHD log file
|
|
496
|
+
export SSHD_LOGFILE='/var/log/auth.log'
|
|
497
|
+
|
|
498
|
+
# Crontab related.
|
|
499
|
+
export CRON_SPOOL_DIR='/var/spool/cron/crontabs'
|
|
500
|
+
|
|
501
|
+
# Directory /etc/default/ on Debian/Ubuntu.
|
|
502
|
+
export ETC_SYSCONFIG_DIR='/etc/default'
|
|
503
|
+
|
|
504
|
+
export USE_NFTABLES='YES'
|
|
505
|
+
export NFTABLES_CONF='/etc/nftables.conf'
|
|
506
|
+
export FIREWALL_RULE_CONF="${NFTABLES_CONF}"
|
|
507
|
+
|
|
508
|
+
# Directory used to store SSL/TLS key/cert file.
|
|
509
|
+
export SSL_FILE_DIR="/etc/ssl"
|
|
510
|
+
export SSL_CA_FILE="/etc/ssl/certs/ca-certificates.crt"
|
|
511
|
+
|
|
512
|
+
# `python3` is a symbol link to `python3X`.
|
|
513
|
+
export UWSGI_PY3_PLUGIN_NAME='python3'
|
|
514
|
+
elif [ X"${DISTRO}" == X'FREEBSD' ]; then
|
|
515
|
+
export USE_SYSTEMD='NO'
|
|
516
|
+
export SYS_GROUP_ROOT='wheel'
|
|
517
|
+
export SYSLOG_SOCKET='/var/run/log'
|
|
518
|
+
|
|
519
|
+
# sysrc: safely edit system rc files
|
|
520
|
+
export SYSRC='/usr/sbin/sysrc'
|
|
521
|
+
|
|
522
|
+
export LIST_ALL_PKGS="pkg info | awk '{print $1}'"
|
|
523
|
+
export LIST_FILES_IN_PKG='pkg query "%Fp"'
|
|
524
|
+
|
|
525
|
+
# Port directory
|
|
526
|
+
export PORT_WORKDIRPREFIX='/usr/ports'
|
|
527
|
+
|
|
528
|
+
# Syslog (newsyslog)
|
|
529
|
+
export USE_RSYSLOG='NO'
|
|
530
|
+
export USE_BSD_SYSLOG='YES'
|
|
531
|
+
export SYS_GROUP_SYSLOG='wheel'
|
|
532
|
+
export SYSLOG_CONF='/etc/syslog.conf'
|
|
533
|
+
export SYSLOG_CONF_DIR='/usr/local/etc/syslog.d'
|
|
534
|
+
|
|
535
|
+
# SSHD log file
|
|
536
|
+
export SSHD_LOGFILE='/var/log/auth.log'
|
|
537
|
+
|
|
538
|
+
# Crontab related.
|
|
539
|
+
export CRON_SPOOL_DIR='/var/cron/tabs'
|
|
540
|
+
|
|
541
|
+
export ETC_SYSCONFIG_DIR='/etc/defaults'
|
|
542
|
+
export FREEBSD_MAKE_CONF='/etc/make.conf'
|
|
543
|
+
|
|
544
|
+
# IPFW rule file.
|
|
545
|
+
export FIREWALL_RULE_CONF="${ETC_SYSCONFIG_DIR}/ipfw.rules"
|
|
546
|
+
|
|
547
|
+
# Directory used to store SSL/TLS key/cert file.
|
|
548
|
+
export SSL_FILE_DIR="/etc/ssl"
|
|
549
|
+
export SSL_CA_FILE="/etc/ssl/cert.pem"
|
|
550
|
+
|
|
551
|
+
# Logrotate directory.
|
|
552
|
+
export LOGROTATE_DIR='/usr/local/etc/newsyslog.conf.d'
|
|
553
|
+
|
|
554
|
+
elif [ X"${DISTRO}" == X'OPENBSD' ]; then
|
|
555
|
+
export USE_SYSTEMD='NO'
|
|
556
|
+
export SYS_GROUP_ROOT='wheel'
|
|
557
|
+
|
|
558
|
+
# Package management.
|
|
559
|
+
export install_pkg='install_pkg_openbsd'
|
|
560
|
+
export remove_pkg='pkg_delete'
|
|
561
|
+
export LIST_ALL_PKGS="pkg_info -a | awk '{print $1}'"
|
|
562
|
+
export LIST_FILES_IN_PKG='pkg_info -L'
|
|
563
|
+
|
|
564
|
+
# Syslog (newsyslog)
|
|
565
|
+
export USE_RSYSLOG='NO'
|
|
566
|
+
export USE_BSD_SYSLOG='YES'
|
|
567
|
+
export SYS_GROUP_SYSLOG='wheel'
|
|
568
|
+
export SYSLOG_CONF='/etc/syslog.conf'
|
|
569
|
+
|
|
570
|
+
# SSHD log file
|
|
571
|
+
export SSHD_LOGFILE='/var/log/authlog'
|
|
572
|
+
|
|
573
|
+
# Crontab related.
|
|
574
|
+
export CRON_SPOOL_DIR='/var/cron/tabs'
|
|
575
|
+
|
|
576
|
+
# PF rule file.
|
|
577
|
+
export FIREWALL_RULE_CONF="/etc/pf.conf"
|
|
578
|
+
|
|
579
|
+
# Directory used to store SSL/TLS key/cert file.
|
|
580
|
+
export SSL_FILE_DIR="/etc/ssl"
|
|
581
|
+
export SSL_CA_FILE="/etc/ssl/cert.pem"
|
|
582
|
+
else
|
|
583
|
+
# Not support yet.
|
|
584
|
+
echo "Your distrobution is not supported yet."
|
|
585
|
+
exit 255
|
|
586
|
+
fi
|
|
587
|
+
|
|
588
|
+
# Use a seperated directory to store iRedMail certs/keys.
|
|
589
|
+
if [ X"${DISTRO}" == X'OPENBSD' ]; then
|
|
590
|
+
export SSL_CERT_DIR="${SSL_FILE_DIR}"
|
|
591
|
+
export SSL_KEY_DIR="${SSL_FILE_DIR}"
|
|
592
|
+
else
|
|
593
|
+
export SSL_CERT_DIR="${SSL_FILE_DIR}/certs"
|
|
594
|
+
export SSL_KEY_DIR="${SSL_FILE_DIR}/private"
|
|
595
|
+
fi
|
|
596
|
+
|
|
597
|
+
# Root's cron file
|
|
598
|
+
export CRON_FILE_ROOT="${CRON_SPOOL_DIR}/${SYS_USER_ROOT}"
|
|
599
|
+
|
|
600
|
+
# dhparam file required to fix 'The Logjam Attack'.
|
|
601
|
+
export SSL_DH512_PARAM_FILE="${SSL_FILE_DIR}/dh512_param.pem"
|
|
602
|
+
export SSL_DH1024_PARAM_FILE="${SSL_FILE_DIR}/dh2048_param.pem"
|
|
603
|
+
|
|
604
|
+
# use of the most secure ciphers first and gradually fall back to
|
|
605
|
+
# less-preferred ciphers should the client not support them.
|
|
606
|
+
export SSL_CIPHERS='EECDH+CHACHA20:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH'
|
|
607
|
+
|
|
608
|
+
# SSL key.
|
|
609
|
+
export OPENSSL_CONF="${SSL_FILE_DIR}/openssl.cnf"
|
|
610
|
+
export SSL_CERT_FILE="${SSL_CERT_DIR}/iRedMail.crt"
|
|
611
|
+
export SSL_KEY_FILE="${SSL_KEY_DIR}/iRedMail.key"
|
|
612
|
+
export TLS_COUNTRY='CN'
|
|
613
|
+
export TLS_STATE='GuangDong'
|
|
614
|
+
export TLS_CITY='ShenZhen'
|
|
615
|
+
export TLS_COMPANY="${HOSTNAME}"
|
|
616
|
+
export TLS_DEPARTMENT='IT'
|
|
617
|
+
export TLS_HOSTNAME="${HOSTNAME}"
|
|
618
|
+
export TLS_ADMIN="root@${HOSTNAME}"
|
|
619
|
+
|
|
620
|
+
# Default SSL key size in bits
|
|
621
|
+
export SSL_KEY_SIZE='4096'
|
|
622
|
+
default_ssl_key_size="$(awk '/^default_bits/ {print $3}' ${OPENSSL_CONF} 2>/dev/null)"
|
|
623
|
+
if [ -z ${default_ssl_key_size} ]; then
|
|
624
|
+
:
|
|
625
|
+
elif [ ${default_ssl_key_size} -ge ${SSL_KEY_SIZE} ]; then
|
|
626
|
+
export SSL_KEY_SIZE="${default_ssl_key_size}"
|
|
627
|
+
fi
|
|
628
|
+
|
|
629
|
+
# Location of sshd_config
|
|
630
|
+
export SSHD_CONFIG='/etc/ssh/sshd_config'
|
|
631
|
+
|
|
632
|
+
if [[ -f ${SSHD_CONFIG} ]]; then
|
|
633
|
+
export SSHD_PORT="$(awk '/^Port/ {print $2}' ${SSHD_CONFIG} /etc/ssh/sshd_config.d/*.conf 2>/dev/null | head -1)"
|
|
634
|
+
export SSHD_PORT2="$(awk '/^Port/ {print $2}' ${SSHD_CONFIG} /etc/ssh/sshd_config.d/*.conf 2>/dev/null | tail -1)"
|
|
635
|
+
fi
|
|
636
|
+
|
|
637
|
+
if [ X"${SSHD_PORT}" == X'' ]; then
|
|
638
|
+
# No port number defined, use default port number (22).
|
|
639
|
+
export SSHD_PORT='22'
|
|
640
|
+
export SSHD_PORT2='22'
|
|
641
|
+
fi
|
|
642
|
+
|
|
643
|
+
export SSHD_PORTS_WITH_COMMA="${SSHD_PORT}"
|
|
644
|
+
export SSHD_PORTS_WITH_SPACE="${SSHD_PORT}"
|
|
645
|
+
|
|
646
|
+
if [ X"${SSHD_PORT}" != X'' -a X"${SSHD_PORT2}" != X'' -a X"${SSHD_PORT}" != X"${SSHD_PORT2}" ]; then
|
|
647
|
+
export SSHD_PORTS_WITH_COMMA="${SSHD_PORT},${SSHD_PORT2}"
|
|
648
|
+
export SSHD_PORTS_WITH_SPACE="${SSHD_PORT} ${SSHD_PORT2}"
|
|
649
|
+
fi
|
|
650
|
+
|
|
651
|
+
# sysctl.conf
|
|
652
|
+
export SYSCTL_CONF='/etc/sysctl.conf'
|
|
653
|
+
|
|
654
|
+
# Command use to fetch source tarballs.
|
|
655
|
+
if [ X"${DISTRO}" == X'FREEBSD' ]; then
|
|
656
|
+
if [ -f /usr/local/etc/ssl/cert.pem ]; then
|
|
657
|
+
# require package/port 'security/ca_root_nss'
|
|
658
|
+
FETCH_CMD='fetch'
|
|
659
|
+
else
|
|
660
|
+
FETCH_CMD='fetch --no-verify-hostname --no-verify-peer'
|
|
661
|
+
fi
|
|
662
|
+
elif [ X"${DISTRO}" == X'OPENBSD' ]; then
|
|
663
|
+
# -i: Turns off interactive prompting during multiple file transfers.
|
|
664
|
+
# -V: Disable verbose and progress
|
|
665
|
+
FETCH_CMD='ftp -iV'
|
|
666
|
+
else
|
|
667
|
+
# -c: Continue getting a partially-downloaded file.
|
|
668
|
+
FETCH_CMD="wget -c --timeout=30"
|
|
669
|
+
|
|
670
|
+
if [ X"${DISTRO}" == X'RHEL' ]; then
|
|
671
|
+
FETCH_CMD="${FETCH_CMD} --ca-certificate=${SSL_CERT_DIR}/ca-bundle.crt"
|
|
672
|
+
fi
|
|
673
|
+
fi
|
|
674
|
+
|
|
675
|
+
# Detect IPv6 support with `ping6`.
|
|
676
|
+
export IREDMAIL_HAS_IPV6='NO'
|
|
677
|
+
ping6 -c 1 ::1 &>/dev/null
|
|
678
|
+
if [ X"$?" == X'0' ]; then
|
|
679
|
+
IREDMAIL_HAS_IPV6='YES'
|
|
680
|
+
fi
|
|
681
|
+
|
|
682
|
+
# Backup script file names.
|
|
683
|
+
export BACKUP_SCRIPT_LDAP_NAME='backup_openldap.sh'
|
|
684
|
+
export BACKUP_SCRIPT_MYSQL_NAME='backup_mysql.sh'
|
|
685
|
+
export BACKUP_SCRIPT_PGSQL_NAME='backup_pgsql.sh'
|
|
686
|
+
|
|
687
|
+
#
|
|
688
|
+
# Mirror sites
|
|
689
|
+
#
|
|
690
|
+
# Where to fetch/store binary packages and source tarball.
|
|
691
|
+
export IREDMAIL_MIRROR="${IREDMAIL_MIRROR:=https://dl.iredmail.org}"
|
|
692
|
+
|
|
693
|
+
# Ubuntu mirror site. For example: https://archive.ubuntu.com/ubuntu
|
|
694
|
+
export UBUNTU_MIRROR_SITE="${UBUNTU_MIRROR_SITE:=}"
|
|
695
|
+
|
|
696
|
+
# pip mirror site. Use `pypi.org` if not set.
|
|
697
|
+
export PIP_MIRROR_SITE="${PIP_MIRROR_SITE:=}"
|
|
698
|
+
export PIP_TRUSTED_HOST="${PIP_TRUSTED_HOST:=}"
|