You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							48 lines
						
					
					
						
							1.5 KiB
						
					
					
				
			
		
		
	
	
							48 lines
						
					
					
						
							1.5 KiB
						
					
					
				#!/bin/bash
 | 
						|
# info: disable system wide smtp relay support
 | 
						|
# options:
 | 
						|
#
 | 
						|
# example: v-delete-sys-smtp-relay
 | 
						|
#
 | 
						|
# This function disables system wide smtp relay support.
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                Variables & Functions                     #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Includes
 | 
						|
# shellcheck source=/etc/hestiacp/hestia.conf
 | 
						|
source /etc/hestiacp/hestia.conf
 | 
						|
# shellcheck source=/usr/local/hestia/func/main.sh
 | 
						|
source $HESTIA/func/main.sh
 | 
						|
# load config file
 | 
						|
source_conf "$HESTIA/conf/hestia.conf"
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                    Verifications                         #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Perform verification if read-only mode is enabled
 | 
						|
check_hestia_demo_mode
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                       Action                             #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
change_sys_value "SMTP_RELAY" "false"
 | 
						|
change_sys_value "SMTP_RELAY_HOST" ""
 | 
						|
change_sys_value "SMTP_RELAY_PORT" ""
 | 
						|
change_sys_value "SMTP_RELAY_USER" ""
 | 
						|
 | 
						|
rm -f /etc/exim4/smtp_relay.conf
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                       Hestia                             #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Logging
 | 
						|
$BIN/v-log-action "system" "Info" "Mail" "Global SMTP Relay disabled."
 | 
						|
log_event "$OK" "$ARGUMENTS"
 | 
						|
 | 
						|
exit
 |