From f2809eeb6775da02d63f1a763a49a67326a27150 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Mon, 25 Apr 2022 23:38:47 +0200
Subject: [PATCH 001/597] Update Changelog.md
---
Changelog.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Changelog.md b/Changelog.md
index 9c98c282..819eea8c 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,7 +1,7 @@
Version 0.9.8-26-55 [26-Apr-2022]
==================================================
* Support for MySQL 8
-* Preventing brute-force resetting password
+* Preventing brute-force resetting password (thanks to HestiaCP @hestiacp for fix)
* Many minor bugfixes
Version 0.9.8-26-54 [17-Dec-2021]
From 3a688f33fac01ee2c75c8243598f2f4a9d46d79e Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 7 May 2022 12:45:33 +0200
Subject: [PATCH 002/597] Update vst-install-debian.sh
---
install/vst-install-debian.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh
index 2dbd2c11..6f9410e4 100755
--- a/install/vst-install-debian.sh
+++ b/install/vst-install-debian.sh
@@ -1610,7 +1610,7 @@ fi
# Vesta data sessions permissions
chown admin:admin $VESTA/data/sessions
-echo "== Configuring system ips"
+echo "== Configuring system ips (this can take a few minutes, relax)"
$VESTA/bin/v-update-sys-ip
echo "== Get main ip"
From aeb210433f28d19b4871750f40e3fcecfdd62419 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 7 May 2022 14:23:11 +0200
Subject: [PATCH 003/597] conf/mariadb_installed and conf/mysql8_installed
---
install/vst-install-debian.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh
index 6f9410e4..8e87f737 100755
--- a/install/vst-install-debian.sh
+++ b/install/vst-install-debian.sh
@@ -1207,6 +1207,14 @@ fi
#----------------------------------------------------------#
if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
+
+ if [ "$mysql" = 'yes' ]; then
+ touch $VESTA/conf/mariadb_installed
+ fi
+ if [ "$mysql8" = 'yes' ]; then
+ touch $VESTA/conf/mysql8_installed
+ fi
+
if [ "$mysql" = 'yes' ]; then
echo "=== Configure MariaDB"
mycnf="my-small.cnf"
From 18e42c954060377ca53e9ef80702eb5ccc9a31a5 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 7 May 2022 21:11:10 +0200
Subject: [PATCH 004/597] exim4.conf.template-RC
---
install/debian/11/exim/exim4.conf.template-RC | 440 ++++++++++++++++++
1 file changed, 440 insertions(+)
create mode 100644 install/debian/11/exim/exim4.conf.template-RC
diff --git a/install/debian/11/exim/exim4.conf.template-RC b/install/debian/11/exim/exim4.conf.template-RC
new file mode 100644
index 00000000..9c5fc671
--- /dev/null
+++ b/install/debian/11/exim/exim4.conf.template-RC
@@ -0,0 +1,440 @@
+######################################################################
+# #
+# Exim configuration file for Vesta Control Panel #
+# #
+######################################################################
+
+#SPAMASSASSIN = yes
+#SPAM_SCORE = 50
+#CLAMD = yes
+
+disable_ipv6=true
+add_environment=<; PATH=/bin:/usr/bin
+keep_environment=
+
+#local_interfaces = 0.0.0.0
+#smtp_active_hostname = ${lookup{$interface_address}lsearch{/etc/exim4/virtual/helo_data}{$value}}
+#smtp_banner = "$smtp_active_hostname ESMTP $tod_full"
+
+domainlist local_domains = dsearch;/etc/exim4/domains/
+domainlist relay_to_domains = dsearch;/etc/exim4/domains/
+hostlist relay_from_hosts = 127.0.0.1
+hostlist whitelist = net-iplsearch;/etc/exim4/white-blocks.conf
+hostlist spammers = net-iplsearch;/etc/exim4/spam-blocks.conf
+no_local_from_check
+untrusted_set_sender = *
+acl_smtp_connect = acl_check_spammers
+acl_smtp_mail = acl_check_mail
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+acl_smtp_mime = acl_check_mime
+
+LIMIT_PER_EMAIL_ACCOUNT_MAX_RECIPIENTS = 15
+LIMIT_PER_HOSTING_ACCOUNT_MAX_RECIPIENTS = 5
+LIMIT_PER_EMAIL_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR = 40
+LIMIT_PER_HOSTING_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR = 40
+
+recipients_max = 150
+recipients_max_reject = true
+
+# log_selector = +smtp_connection
+smtp_accept_max = 50
+smtp_accept_max_per_host = 4
+
+.ifdef SPAMASSASSIN
+spamd_address = 127.0.0.1 783
+.endif
+
+.ifdef CLAMD
+av_scanner = clamd: /var/run/clamav/clamd.ctl
+.endif
+
+tls_advertise_hosts = *
+tls_certificate = /usr/local/vesta/ssl/$received_ip_address.crt
+tls_privatekey = /usr/local/vesta/ssl/$received_ip_address.key
+
+daemon_smtp_ports = 25 : 465 : 587 : 2525
+tls_on_connect_ports = 465
+never_users = root
+host_lookup = *
+rfc1413_hosts = *
+rfc1413_query_timeout = 0s
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+DKIM_DOMAIN = ${lc:${domain:$h_from:}}
+DKIM_FILE = /etc/exim4/domains/${lookup{${lc:${domain:$h_from:}}}dsearch{/etc/exim4/domains/}}/dkim.pem
+DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
+
+
+
+######################################################################
+# ACL CONFIGURATION #
+# Specifies access control lists for incoming SMTP mail #
+######################################################################
+
+acl_not_smtp = acl_not_smtp
+
+begin acl
+
+acl_not_smtp:
+ deny message = Too many recipients, limit is $acl_c_max_recipients recipients
+ set acl_c_max_recipients=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_hosting_account_max_recipients}{$value}{LIMIT_PER_HOSTING_ACCOUNT_MAX_RECIPIENTS}}
+ condition = ${if >{$rcpt_count}{$acl_c_max_recipients}}
+
+ deny message = Hosting account is sending too much emails [limitlog]: deny / account / $authenticated_id / $sender_rate / $sender_rate_period [limit=$acl_c_limit_per_hour]
+ set acl_c_limit_per_hour=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_hosting_account_max_sent_emails_per_hour}{$value}{LIMIT_PER_HOSTING_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR}}
+ ratelimit = $acl_c_limit_per_hour / 1h / $authenticated_id
+
+ warn ratelimit = 0 / 1h / strict / $authenticated_id
+ set acl_c_limit_per_hour=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_hosting_account_max_sent_emails_per_hour}{$value}{LIMIT_PER_HOSTING_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR}}
+ log_message = Sender rate [limitlog]: log / account / $authenticated_id / $sender_rate / $sender_rate_period [limit=$acl_c_limit_per_hour]
+
+ warn set acl_m3 = yes
+
+ accept
+
+acl_check_spammers:
+ accept hosts = +whitelist
+
+ drop message = Your host in blacklist on this server.
+ log_message = Host in blacklist
+ hosts = +spammers
+
+ accept
+
+
+acl_check_mail:
+ deny condition = ${if eq{$sender_helo_name}{}}
+ message = HELO required before MAIL
+
+ drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
+ condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
+ condition = ${if match{${lc:$sender_host_name}}{.telenor.rs}{false}{true}}
+ condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
+ delay = 45s
+
+ drop condition = ${if isip{$sender_helo_name}}
+ message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
+
+ drop condition = ${if eq{[$interface_address]}{$sender_helo_name}}
+ message = $interface_address is _my_ address
+
+ accept
+
+
+acl_check_rcpt:
+ accept hosts = :
+
+ deny message = Too many recipients, limit is $acl_c_max_recipients recipients
+ set acl_c_max_recipients=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_email_account_max_recipients}{$value}{LIMIT_PER_EMAIL_ACCOUNT_MAX_RECIPIENTS}}
+ condition = ${if >{$rcpt_count}{$acl_c_max_recipients}}
+
+ deny message = Email account is sending too much emails [limitlog]: deny / email / $authenticated_id / $sender_rate / $sender_rate_period [limit=$acl_c_limit_per_hour]
+ set acl_c_limit_per_hour=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_email_account_max_sent_emails_per_hour}{$value}{LIMIT_PER_EMAIL_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR}}
+ ratelimit = $acl_c_limit_per_hour / 1h / $authenticated_id
+
+ warn ratelimit = 0 / 1h / strict / $authenticated_id
+ set acl_c_limit_per_hour=${lookup{$authenticated_id}lsearch{/etc/exim4/limit_per_email_account_max_sent_emails_per_hour}{$value}{LIMIT_PER_EMAIL_ACCOUNT_MAX_SENT_EMAILS_PER_HOUR}}
+ log_message = Sender rate [limitlog]: log / email / $authenticated_id / $sender_rate / $sender_rate_period [limit=$acl_c_limit_per_hour]
+
+ warn set acl_m3 = no
+
+ deny message = Restricted characters in address
+ domains = +local_domains
+ local_parts = ^[.] : ^.*[@%!/|]
+
+ deny message = Restricted characters in address
+ domains = !+local_domains
+ local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+ require verify = sender
+
+ accept hosts = +relay_from_hosts
+ control = submission
+
+ accept authenticated = *
+ control = submission/domain=
+
+ deny message = Rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
+ hosts = !+whitelist
+ dnslists = ${readfile {/etc/exim4/dnsbl.conf}{:}}
+
+ require message = relay not permitted
+ domains = +local_domains : +relay_to_domains
+
+ deny message = smtp auth requried
+ sender_domains = +local_domains
+ !authenticated = *
+
+ require verify = recipient
+
+.ifdef CLAMD
+ warn set acl_m0 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antivirus}{yes}{no}}
+ set acl_m0 = yes
+.endif
+
+.ifdef SPAMASSASSIN
+ warn set acl_m1 = no
+
+ warn condition = ${if exists {/etc/exim4/domains/$domain/antispam}{yes}{no}}
+ set acl_m1 = yes
+.endif
+
+ accept
+
+
+acl_check_data:
+
+ deny senders = /etc/exim4/deny_senders
+
+.ifdef CLAMD
+ deny message = Message contains a virus ($malware_name) and has been rejected
+ malware = */defer_ok
+ condition = ${if eq{$acl_m0}{yes}{yes}{no}}
+.endif
+
+.ifdef SPAMASSASSIN
+ warn !authenticated = *
+ hosts = !+relay_from_hosts
+ condition = ${if < {$message_size}{600K}}
+ condition = ${if eq{$acl_m1}{yes}{yes}{no}}
+ spam = nobody:true/defer_ok
+ add_header = X-Spam-Score: $spam_score_int
+ add_header = X-Spam-Bar: $spam_bar
+ add_header = X-Spam-Report: $spam_report
+ set acl_m2 = $spam_score_int
+
+ warn condition = ${if !eq{$acl_m2}{} {yes}{no}}
+ condition = ${if >{$acl_m2}{SPAM_SCORE} {yes}{no}}
+ add_header = X-Spam-Status: Yes
+ message = SpamAssassin detected spam (from $sender_address to $recipients).
+.endif
+
+ accept
+
+
+acl_check_mime:
+ deny message = Blacklisted file extension detected
+ condition = ${if match {${lc:$mime_filename}}{\N(\.ade|\.adp|\.bat|\.chm|\.cmd|\.com|\.cpl|\.exe|\.hta|\.ins|\.isp|\.jse|\.lib|\.lnk|\.mde|\.msc|\.msp|\.mst|\.pif|\.scr|\.sct|\.shb|\.sys|\.vb|\.vbe|\.vbs|\.vxd|\.wsc|\.wsf|\.wsh|\.jar)$\N}{1}{0}}
+
+ accept
+
+
+
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+begin authenticators
+
+dovecot_plain:
+ driver = dovecot
+ public_name = PLAIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+dovecot_login:
+ driver = dovecot
+ public_name = LOGIN
+ server_socket = /var/run/dovecot/auth-client
+ server_set_id = $auth1
+
+
+
+######################################################################
+# ROUTERS CONFIGURATION #
+# Specifies how addresses are handled #
+######################################################################
+begin routers
+
+#smarthost:
+# driver = manualroute
+# domains = ! +local_domains
+# transport = remote_smtp
+# route_list = * smartrelay.vestacp.com
+# no_more
+# no_verify
+
+dnslookup:
+ driver = dnslookup
+ domains = !+local_domains
+ transport = remote_smtp
+ no_more
+
+localuser_spam:
+ driver = accept
+ transport = local_spam_delivery
+ condition = ${if eq {${if match{$h_X-Spam-Status:}{\N^Yes\N}{yes}{no}}} {${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{yes}{no_such_user}}}}
+
+userforward:
+ driver = redirect
+ check_local_user
+ file = $home/.forward
+ require_files = ${local_part}:+${home}/.forward
+ domains = +local_domains
+ allow_filter
+ no_verify
+ no_expn
+ check_ancestor
+ file_transport = address_file
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
+procmail:
+ driver = accept
+ check_local_user
+ require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
+ transport = procmail
+ no_verify
+
+autoreplay:
+ driver = accept
+ require_files = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg
+ condition = ${if exists{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${local_part}.msg}{yes}{no}}
+ retry_use_local_part
+ transport = userautoreply
+ unseen
+
+aliases:
+ driver = redirect
+ headers_add = X-redirected: yes
+ data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
+ require_files = /etc/exim4/domains/$domain/aliases
+ redirect_router = dnslookup
+ pipe_transport = address_pipe
+ unseen
+
+localuser_fwd_only:
+ driver = accept
+ transport = devnull
+ condition = ${if exists{/etc/exim4/domains/$domain/fwd_only}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/fwd_only}{true}{false}}}}
+
+localuser:
+ driver = accept
+ transport = local_delivery
+ condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}{true}{false}}
+
+catchall:
+ driver = redirect
+ headers_add = X-redirected: yes
+ require_files = /etc/exim4/domains/$domain/aliases
+ data = ${extract{1}{:}{${lookup{*@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}}}}
+ file_transport = local_delivery
+ redirect_router = dnslookup
+
+terminate_alias:
+ driver = accept
+ transport = devnull
+ condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{true}{false}}
+
+
+
+######################################################################
+# TRANSPORTS CONFIGURATION #
+######################################################################
+begin transports
+
+remote_smtp:
+ driver = smtp
+ #interface = ${if eq{$acl_m3}{yes}{FIRSTIP}{${lookup{$sender_address_domain}lsearch{/etc/exim4/virtual/interfaces} {$value}{SECONDIP}}}}
+ #helo_data = "${if eq{$acl_m3}{yes}{FIRSTHOST}{${lookup{$sending_ip_address}lsearch{/etc/exim4/virtual/helo_data}{$value}{SECONDHOST}}}}"
+ dkim_domain = DKIM_DOMAIN
+ dkim_selector = mail
+ dkim_private_key = DKIM_PRIVATE_KEY
+ dkim_canon = relaxed
+ dkim_strict = 0
+ hosts_try_chunking = !93.188.3.0/24
+
+procmail:
+ driver = pipe
+ command = "/usr/bin/procmail -d $local_part"
+ return_path_add
+ delivery_date_add
+ envelope_to_add
+ user = $local_part
+ initgroups
+ return_output
+
+local_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
+ quota_warn_threshold = 75%
+
+local_spam_delivery:
+ driver = appendfile
+ maildir_format
+ maildir_use_size_file
+ user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
+ group = mail
+ create_directory
+ directory_mode = 770
+ mode = 660
+ use_lockfile = no
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+ directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}/.Spam"
+ quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
+ quota_directory = "${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}"
+ quota_warn_threshold = 75%
+
+address_pipe:
+ driver = pipe
+ return_output
+
+address_file:
+ driver = appendfile
+ delivery_date_add
+ envelope_to_add
+ return_path_add
+
+address_reply:
+ driver = autoreply
+
+userautoreply:
+ driver = autoreply
+ file = /etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/autoreply.${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}.msg
+ from = "${extract{1}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/accounts}}}}@${lookup{$domain}dsearch{/etc/exim4/domains/}}"
+ headers = Content-Type: text/plain; charset=utf-8;\nContent-Transfer-Encoding: 8bit
+ subject = "${if def:h_Subject: {Autoreply: \"${rfc2047:$h_Subject:}\"} {Autoreply Message}}"
+ to = "${sender_address}"
+
+devnull:
+ driver = appendfile
+ file = /dev/null
+
+
+
+######################################################################
+# RETRY CONFIGURATION #
+######################################################################
+begin retry
+
+# Address or Domain Error Retries
+# ----------------- ----- -------
+* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
+
+
+######################################################################
+# REWRITE CONFIGURATION #
+######################################################################
+begin rewrite
+
+
+
+######################################################################
From f49479043f1894dd448b13a7c5054157d3d2f235 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 7 May 2022 21:39:40 +0200
Subject: [PATCH 005/597] Update v-make-separated-ip-for-email
---
bin/v-make-separated-ip-for-email | 39 ++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 8 deletions(-)
diff --git a/bin/v-make-separated-ip-for-email b/bin/v-make-separated-ip-for-email
index 6ede0d04..6ca4343b 100644
--- a/bin/v-make-separated-ip-for-email
+++ b/bin/v-make-separated-ip-for-email
@@ -137,18 +137,41 @@ $VESTA/bin/v-make-ip-ssl "$MAIL_USER" "$MAIL_HOSTNAME"
check_grep=$(grep -c 'smtp_active_hostname' /etc/exim4/exim4.conf.template)
if [ "$check_grep" -eq 0 ]; then
echo "=== patching exim4.conf.template"
- patch /etc/exim4/exim4.conf.template < /usr/local/vesta/src/deb/for-download/tools/patches/separate-mail-ip.patch
+ mv /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf.template-backup
+ cp /usr/local/vesta/install/debian/11/exim/exim4.conf.template-RC /etc/exim4/exim4.conf.template
+ sed -i "s|FIRSTIP|$HOST_IP|g" /etc/exim4/exim4.conf.template
+ sed -i "s|SECONDIP|$MAIL_IP|g" /etc/exim4/exim4.conf.template
+ sed -i "s|FIRSTHOST|$HOSTNAME|g" /etc/exim4/exim4.conf.template
+ sed -i "s|SECONDHOST|$MAIL_HOSTNAME|g" /etc/exim4/exim4.conf.template
+ sed -i "s|#local_interfaces|local_interfaces|g" /etc/exim4/exim4.conf.template
+ sed -i "s|#smtp_active_hostname|smtp_active_hostname|g" /etc/exim4/exim4.conf.template
+ sed -i "s|#smtp_banner|smtp_banner|g" /etc/exim4/exim4.conf.template
+ sed -i "s|#interface =|interface =|g" /etc/exim4/exim4.conf.template
+ sed -i "s|#helo_data =|helo_data =|g" /etc/exim4/exim4.conf.template
+ touch /etc/exim4/limit_per_email_account_max_sent_emails_per_hour
+ touch /etc/exim4/limit_per_email_account_max_recipients
+ touch /etc/exim4/limit_per_hosting_account_max_sent_emails_per_hour
+ touch /etc/exim4/limit_per_hosting_account_max_recipients
+ check_grep=$(grep -c '#SPAMASSASSIN' /etc/exim4/exim4.conf.template-backup)
+ if [ "$check_grep" -eq 0 ]; then
+ sed -i "s|#SPAMASSASSIN|SPAMASSASSIN|g" /etc/exim4/exim4.conf.template
+ fi
+ check_grep=$(grep -c '#SPAM_SCORE' /etc/exim4/exim4.conf.template-backup)
+ if [ "$check_grep" -eq 0 ]; then
+ sed -i "s|#SPAM_SCORE|SPAM_SCORE|g" /etc/exim4/exim4.conf.template
+ fi
+ check_grep=$(grep -c '#CLAMD' /etc/exim4/exim4.conf.template-backup)
+ if [ "$check_grep" -eq 0 ]; then
+ sed -i "s|#CLAMD|CLAMD|g" /etc/exim4/exim4.conf.template
+ fi
+ systemctl restart exim4
if [ $? -ne 0 ]; then
+ cp /etc/exim4/exim4.conf.template-backup /etc/exim4/exim4.conf.template
+ systemctl restart exim4
echo "=== Patching failed, aborting"
exit 1
- else
- echo "=== Patching successful"
- sed -i "s|IP1|$HOST_IP|g" /etc/exim4/exim4.conf.template
- sed -i "s|IP2|$MAIL_IP|g" /etc/exim4/exim4.conf.template
- sed -i "s|HOST1|$HOSTNAME|g" /etc/exim4/exim4.conf.template
- sed -i "s|HOST2|$MAIL_HOSTNAME|g" /etc/exim4/exim4.conf.template
- service exim4 restart
fi
+ echo "=== Patching successful"
else
echo "=== exim4.conf.template already patched"
fi
From 23ba131e6978e7bb3fa2b7a5173ebd7d1df93edc Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 7 May 2022 22:21:20 +0200
Subject: [PATCH 006/597] Update v-make-separated-ip-for-email
---
bin/v-make-separated-ip-for-email | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/v-make-separated-ip-for-email b/bin/v-make-separated-ip-for-email
index 6ca4343b..69c8565b 100644
--- a/bin/v-make-separated-ip-for-email
+++ b/bin/v-make-separated-ip-for-email
@@ -40,7 +40,7 @@ fi
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'MAIL_HOSTNAME MAIL_IP'
+check_args '2' "$#" 'MAIL_HOSTNAME MAIL_IP [NETMASK]'
is_domain_format_valid "$MAIL_HOSTNAME"
is_ip_format_valid "$MAIL_IP"
From aaf20378b1a2888f81af624e582486ef6507f849 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 8 May 2022 15:59:46 +0200
Subject: [PATCH 007/597] Create barracuda.cf
---
.../for-download/tools/spamassassin/barracuda.cf | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 src/deb/for-download/tools/spamassassin/barracuda.cf
diff --git a/src/deb/for-download/tools/spamassassin/barracuda.cf b/src/deb/for-download/tools/spamassassin/barracuda.cf
new file mode 100644
index 00000000..8d0fada9
--- /dev/null
+++ b/src/deb/for-download/tools/spamassassin/barracuda.cf
@@ -0,0 +1,15 @@
+header IN_BCUDA_RBL rbleval:check_rbl('bcuda', 'b.barracudacentral.org')
+describe IN_BCUDA_RBL Received via a relay listed by Barracuda BRBL
+tflags IN_BCUDA_RBL net
+
+header RCVD_IN_BCUDA_RELAY rbleval:check_rbl_results_for('bcuda', '127.0.0.2')
+describe RCVD_IN_BCUDA_RELAY BCUDA: relay ip is convicted spammer
+tflags RCVD_IN_BCUDA_RELAY net
+
+score RCVD_IN_BCUDA_RBL 1.50
+score RCVD_IN_BCUDA_RELAY 1.50
+
+header IN_BCUDA_HOP rbleval:check_rbl('bcuda-notfirsthop', 'b.barracudacentral.org')
+describe IN_BCUDA_HOP Received via a relay listed by Barracuda BRBL
+tflags IN_BCUDA_HOP net
+score RCVD_IN_BCUDA_HOP 1.50
From d8fb531865e8c899e2f5f9e1ceb90bf643b8f507 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sun, 8 May 2022 16:24:56 +0200
Subject: [PATCH 008/597] Update barracuda.cf
---
src/deb/for-download/tools/spamassassin/barracuda.cf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/deb/for-download/tools/spamassassin/barracuda.cf b/src/deb/for-download/tools/spamassassin/barracuda.cf
index 8d0fada9..4491d645 100644
--- a/src/deb/for-download/tools/spamassassin/barracuda.cf
+++ b/src/deb/for-download/tools/spamassassin/barracuda.cf
@@ -6,10 +6,10 @@ header RCVD_IN_BCUDA_RELAY rbleval:check_rbl_results_for('bcuda', '127.0.0.2')
describe RCVD_IN_BCUDA_RELAY BCUDA: relay ip is convicted spammer
tflags RCVD_IN_BCUDA_RELAY net
-score RCVD_IN_BCUDA_RBL 1.50
-score RCVD_IN_BCUDA_RELAY 1.50
+score RCVD_IN_BCUDA_RBL 1.00
+score RCVD_IN_BCUDA_RELAY 3.00
header IN_BCUDA_HOP rbleval:check_rbl('bcuda-notfirsthop', 'b.barracudacentral.org')
describe IN_BCUDA_HOP Received via a relay listed by Barracuda BRBL
tflags IN_BCUDA_HOP net
-score RCVD_IN_BCUDA_HOP 1.50
+score RCVD_IN_BCUDA_HOP 1.00
From 360abd80c07a00d9ad7f546f3d2af45bee89b4dd Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Sat, 21 May 2022 12:42:29 +0200
Subject: [PATCH 009/597] Update v-make-separated-ip-for-email
---
bin/v-make-separated-ip-for-email | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/v-make-separated-ip-for-email b/bin/v-make-separated-ip-for-email
index 69c8565b..a26c68e3 100644
--- a/bin/v-make-separated-ip-for-email
+++ b/bin/v-make-separated-ip-for-email
@@ -40,7 +40,7 @@ fi
# Verifications #
#----------------------------------------------------------#
-check_args '2' "$#" 'MAIL_HOSTNAME MAIL_IP [NETMASK]'
+check_args '2' "$#" 'MAIL_HOSTNAME MAIL_IP [NETMASK] [INTERFACE]'
is_domain_format_valid "$MAIL_HOSTNAME"
is_ip_format_valid "$MAIL_IP"
From 93f2a62ee84e0642a472136549fe9a6f10f2b367 Mon Sep 17 00:00:00 2001
From: myvesta <38690722+myvesta@users.noreply.github.com>
Date: Fri, 27 May 2022 23:28:25 +0200
Subject: [PATCH 010/597] Fixing insane HTML form bug in Lisr backup details
page
Without this fix, selecting first item and skiping next item and selecting any other item below, resulted with selected only first item in HTML form array
---
web/templates/admin/list_backup_detail.html | 46 +++++++++++----------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/web/templates/admin/list_backup_detail.html b/web/templates/admin/list_backup_detail.html
index 096f5198..b2f378d0 100644
--- a/web/templates/admin/list_backup_detail.html
+++ b/web/templates/admin/list_backup_detail.html
@@ -1,15 +1,18 @@
+
+
+