mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	Merge branch 'main' of https://github.com/mail-in-a-box/mailinabox
This commit is contained in:
		
						commit
						5fc9edb3d7
					
				| @ -539,7 +539,7 @@ def list_target_files(config): | ||||
| 		 | ||||
| 		# Extract information from target | ||||
| 		b2_application_keyid = target.netloc[:target.netloc.index(':')] | ||||
| 		b2_application_key = target.netloc[target.netloc.index(':')+1:target.netloc.index('@')] | ||||
| 		b2_application_key = urllib.parse.unquote(target.netloc[target.netloc.index(':')+1:target.netloc.index('@')]) | ||||
| 		b2_bucket = target.netloc[target.netloc.index('@')+1:] | ||||
| 
 | ||||
| 		try: | ||||
|  | ||||
| @ -812,7 +812,7 @@ def query_dns(qname, rtype, nxdomain='[Not Set]', at=None, as_list=False): | ||||
| 	# running bind server), or if the 'at' argument is specified, use that host | ||||
| 	# as the nameserver. | ||||
| 	resolver = dns.resolver.get_default_resolver() | ||||
| 	 | ||||
| 
 | ||||
| 	# Make sure at is not a string that cannot be used as a nameserver | ||||
| 	if at and at not in {'[Not set]', '[timeout]'}: | ||||
| 		resolver = dns.resolver.Resolver() | ||||
| @ -924,11 +924,11 @@ def list_apt_updates(apt_update=True): | ||||
| 	return pkgs | ||||
| 
 | ||||
| def what_version_is_this(env): | ||||
| 	# This function runs `git describe --abbrev=0` on the Mail-in-a-Box installation directory. | ||||
| 	# This function runs `git describe --always --abbrev=0` on the Mail-in-a-Box installation directory. | ||||
| 	# Git may not be installed and Mail-in-a-Box may not have been cloned from github, | ||||
| 	# so this function may raise all sorts of exceptions. | ||||
| 	miab_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||||
| 	tag = shell("check_output", ["/usr/bin/git", "describe", "--abbrev=0"], env={"GIT_DIR": os.path.join(miab_dir, '.git')}).strip() | ||||
| 	tag = shell("check_output", ["/usr/bin/git", "describe", "--always", "--abbrev=0"], env={"GIT_DIR": os.path.join(miab_dir, '.git')}).strip() | ||||
| 	return tag | ||||
| 
 | ||||
| def get_latest_miab_version(): | ||||
|  | ||||
| @ -291,7 +291,7 @@ function show_custom_backup() { | ||||
|           var b2_applicationkey = targetPath.split(':')[1].split('@')[0]; | ||||
|           var b2_bucket = targetPath.split('@')[1]; | ||||
|           $("#backup-target-b2-user").val(b2_application_keyid); | ||||
|           $("#backup-target-b2-pass").val(b2_applicationkey); | ||||
|           $("#backup-target-b2-pass").val(decodeURIComponent(b2_applicationkey)); | ||||
|           $("#backup-target-b2-bucket").val(b2_bucket); | ||||
|         } | ||||
|         toggle_form() | ||||
| @ -316,7 +316,7 @@ function set_custom_backup() { | ||||
|                                                                 + "/" + $("#backup-target-rsync-path").val(); | ||||
|     target_user = ''; | ||||
|   } else if (target_type == "b2") { | ||||
|     target = 'b2://' + $('#backup-target-b2-user').val() + ':' + $('#backup-target-b2-pass').val() | ||||
|     target = 'b2://' + $('#backup-target-b2-user').val() + ':' + encodeURIComponent($('#backup-target-b2-pass').val()) | ||||
|         + '@' + $('#backup-target-b2-bucket').val() | ||||
|     target_user = ''; | ||||
|     target_pass = ''; | ||||
|  | ||||
| @ -101,7 +101,7 @@ fi | ||||
| cd $HOME/mailinabox | ||||
| 
 | ||||
| # Update it. | ||||
| if [ "$TAG" != $(git describe) ]; then | ||||
| if [ "$TAG" != $(git describe --always) ]; then | ||||
| 	echo Updating Mail-in-a-Box to $TAG . . . | ||||
| 	git fetch --depth 1 --force --prune origin tag $TAG | ||||
| 	if ! git checkout -q $TAG; then | ||||
|  | ||||
| @ -72,7 +72,7 @@ chmod go-rwx $STORAGE_ROOT/mail/dkim | ||||
| tools/editconf.py /etc/opendmarc.conf -s \ | ||||
| 	"Syslog=true" \ | ||||
| 	"Socket=inet:8893@[127.0.0.1]" \ | ||||
| 	"FailureReports=true" | ||||
| 	"FailureReports=false" | ||||
| 
 | ||||
| # SPFIgnoreResults causes the filter to ignore any SPF results in the header | ||||
| # of the message. This is useful if you want the filter to perfrom SPF checks | ||||
| @ -118,11 +118,11 @@ tools/editconf.py /etc/opendmarc.conf -s \ | ||||
| tools/editconf.py /etc/opendmarc.conf -s \ | ||||
|         "SPFSelfValidate=false" | ||||
| 
 | ||||
| # Enables generation of failure reports for sending domains that publish a | ||||
| # Disables generation of failure reports for sending domains that publish a | ||||
| # "none" policy. | ||||
| 
 | ||||
| tools/editconf.py /etc/opendmarc.conf -s \ | ||||
|         "FailureReportsOnNone=true" | ||||
|         "FailureReportsOnNone=false" | ||||
| 
 | ||||
| # AlwaysAddARHeader Adds an "Authentication-Results:" header field even to | ||||
| # unsigned messages from domains with no "signs all" policy. The reported DKIM | ||||
|  | ||||
| @ -234,7 +234,7 @@ if [ ! -d /usr/local/lib/owncloud/ ] || [[ ! ${CURRENT_NEXTCLOUD_VER} =~ ^$nextc | ||||
| 			CURRENT_NEXTCLOUD_VER="22.2.6" | ||||
| 		fi | ||||
| 		if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^22 ]]; then | ||||
| 			InstallNextcloud 23.0.12 7aa5d61632c1ccf4ca3ff00fb6b295d318c05599 4.1.0 697f6b4a664e928d72414ea2731cb2c9d1dc3077 3.2.2 ce4030ab57f523f33d5396c6a81396d440756f5f 3.0.0 22cabc88b6fc9c26dad3b46be1a652979c9fcf15 | ||||
| 			InstallNextcloud 23.0.12 d138641b8e7aabebe69bb3ec7c79a714d122f729 4.1.0 697f6b4a664e928d72414ea2731cb2c9d1dc3077 3.2.2 ce4030ab57f523f33d5396c6a81396d440756f5f 3.0.0 0df781b261f55bbde73d8c92da3f99397000972f | ||||
| 			CURRENT_NEXTCLOUD_VER="23.0.12" | ||||
| 		fi | ||||
| 		if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^23 ]]; then | ||||
|  | ||||
| @ -216,6 +216,6 @@ if [ "$PRIVATE_IPV6" != "$PUBLIC_IPV6" ]; then | ||||
| 	echo "Private IPv6 Address: $PRIVATE_IPV6" | ||||
| fi | ||||
| if [ -f /usr/bin/git ] && [ -d .git ]; then | ||||
| 	echo "Mail-in-a-Box Version: " $(git describe) | ||||
| 	echo "Mail-in-a-Box Version: " $(git describe --always) | ||||
| fi | ||||
| echo | ||||
|  | ||||
| @ -50,7 +50,15 @@ if [ $needs_update == 1 ]; then | ||||
| 	mv /tmp/z-push/*/src /usr/local/lib/z-push | ||||
| 	rm -rf /tmp/z-push.zip /tmp/z-push | ||||
| 
 | ||||
| 	# Create admin and top scripts with PHP_VER   | ||||
| 	rm -f /usr/sbin/z-push-{admin,top} | ||||
|     echo '#!/bin/bash' > /usr/sbin/z-push-admin | ||||
|     echo php$PHP_VER /usr/local/lib/z-push/z-push-admin.php '"$@"' >> /usr/sbin/z-push-admin | ||||
|     chmod 755 /usr/sbin/z-push-admin | ||||
|     echo '#!/bin/bash' > /usr/sbin/z-push-top | ||||
|     echo php$PHP_VER /usr/local/lib/z-push/z-push-top.php '"$@"' >> /usr/sbin/z-push-top | ||||
|     chmod 755 /usr/sbin/z-push-top | ||||
| 	 | ||||
| 	echo $VERSION > /usr/local/lib/z-push/version | ||||
| fi | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user