2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								The latest version of the script `setup.sh`  is included in the `docker-mailserver`  repository. Get the last version to the script by copying this command in your console:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								wget -q -O setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2017-03-17 15:34:05 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								if you use curl:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								curl -o setup.sh https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh; chmod a+x ./setup.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Run `./setup.sh`  without arguments and you get some usage informations.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2016-12-03 01:11:25 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Usage: ./setup.sh [-i IMAGE_NAME] [-c CONTAINER_NAME] < subcommand >  < subcommand >  [args]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								OPTIONS:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -i IMAGE_NAME     The name of the docker-mailserver image, by default
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    'tvial/docker-mailserver:latest'.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  -c CONTAINER_NAME The name of the running container.
							 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								SUBCOMMANDS:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  email:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh email add < email >  < password > 
							 
						 
					
						
							
								
									
										
										
										
											2018-01-30 18:05:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ./setup.sh email update < email >  < password > 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    ./setup.sh email del < email > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh email list
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-05-13 14:15:04 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  alias:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh alias add < email >  < recipient > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh alias del < email >  < recipient > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh alias list
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  config:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh config dkim
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh config ssl
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  debug:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh debug fetchmail
							 
						 
					
						
							
								
									
										
										
										
											2016-12-03 01:11:25 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ./setup.sh debug show-mail-logs
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh debug inspect
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ./setup.sh debug login < commands > 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2018-01-30 18:05:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# email 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh email add <email> <password>` : Add an email-account (\<password\> is optional) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh email update <email> <password>` : Change the password of an email-account (\<password\> is optional) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh email del < email > ': delete an email-account 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh email list` : list all existing email-accounts 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# alias
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh alias add <email> <recipient>` : add an alias(email) for an email-account(recipient) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh alias del <email> <recipient>` : delete an alias 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh alias list` : list all aliases 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# config 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh config dkim` : autoconfig the dkim-config 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh config ssl` : generate ssl-certificates 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# debug 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh debug fetchmail` : see [wiki ](https://github.com/tomav/docker-mailserver/wiki/Retrieve-emails-from-a-remote-mail-server-%28using-builtin-fetchmail%29#debugging ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh debug show-mail-logs` : show the logfile contents of the mail container 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh debug inspect` : show infos about the running container 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  `./setup.sh debug login <commands>` : run a < command >  inside the mail container (omit the command to get shell access) 
						 
					
						
							
								
									
										
										
										
											2016-08-29 21:51:09 +02:00