feat: Add message_size_limit option (#86)
* feat: Add MESSAGE_SIZE_LIMIT configuration option (PR #86)
This commit is contained in:
		@@ -37,3 +37,6 @@
 | 
			
		||||
 | 
			
		||||
# Optional: This will disable (no) or enable (yes) the use of SMTPUTF8
 | 
			
		||||
#SMTPUTF8_ENABLE=no
 | 
			
		||||
 | 
			
		||||
# Optional: This will use allow you to set a custom $message_size_limit value. Default is 10240000.
 | 
			
		||||
#MESSAGE_SIZE_LIMIT=
 | 
			
		||||
 
 | 
			
		||||
@@ -83,6 +83,8 @@ The following env variable(s) are optional.
 | 
			
		||||
 | 
			
		||||
* `SMTPUTF8_ENABLE` This will enable (default) or disable support for SMTPUTF8. Valid values are `no` to disable and `yes` to enable. Not setting this variable will use the postfix default, which is `yes`.
 | 
			
		||||
 | 
			
		||||
* `MESSAGE_SIZE_LIMIT` This will change the default limit of 10240000 bytes (10MB).
 | 
			
		||||
 | 
			
		||||
To use this container from anywhere, the 25 port or the one specified by `SMTP_PORT` needs to be exposed to the docker host server:
 | 
			
		||||
 | 
			
		||||
    docker run -d --name postfix -p "25:25"  \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								run.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								run.sh
									
									
									
									
									
								
							@@ -99,6 +99,12 @@ if [ ! -z "${OVERWRITE_FROM}" ]; then
 | 
			
		||||
  echo "Setting configuration option OVERWRITE_FROM with value: ${OVERWRITE_FROM}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Set message_size_limit
 | 
			
		||||
if [ ! -z "${MESSAGE_SIZE_LIMIT}" ]; then
 | 
			
		||||
  postconf -e "message_size_limit = ${MESSAGE_SIZE_LIMIT}"
 | 
			
		||||
  echo "Setting configuration option message_size_limit with value: ${MESSAGE_SIZE_LIMIT}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#Start services
 | 
			
		||||
 | 
			
		||||
# If host mounting /var/spool/postfix, we need to delete old pid file before
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user