From bc6c21e4a7283c22224a9fd612498ee1b9bc8b42 Mon Sep 17 00:00:00 2001 From: Jason Kendall Date: Wed, 12 Feb 2020 11:01:14 -0500 Subject: [PATCH] Add SMTP server and configs --- docker-compose.yml | 5 +++++ server-configs/email.php | 31 +++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6740403..cbfac47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,10 @@ version: '3' services: + # This is capible to relay via gmail, Amazon SES, or generic relays + # See: https://hub.docker.com/r/namshi/smtp + mail: + image: namshi/smtp + redis: image: redis:5.0.6 diff --git a/server-configs/email.php b/server-configs/email.php index e135795..bf460cb 100644 --- a/server-configs/email.php +++ b/server-configs/email.php @@ -45,20 +45,27 @@ class EmailConfig { // to set the return-path header, simply uncomment the line below and change you@localhost to the desired e-mail address public $default = array( - 'transport' => 'Mail', - 'charset' => 'utf-8', - 'headers' => array('Precedence' => 'bulk'), - //'additionalParameters' => '-f you@localhost' + 'transport' => 'Smtp', + 'from' => array('misp-dev@admin.test' => 'Misp DEV'), + 'host' => 'mail', + 'port' => 25, + 'timeout' => 30, +// 'username' => 'user', +// 'password' => 'secret', + 'client' => null, + 'log' => false, + //'charset' => 'utf-8', + //'headerCharset' => 'utf-8', ); public $smtp = array( 'transport' => 'Smtp', - 'from' => array('site@localhost' => 'My Site'), - 'host' => 'localhost', + 'from' => array('misp-dev@admin.test' => 'Misp DEV'), + 'host' => 'mail', 'port' => 25, 'timeout' => 30, - 'username' => 'user', - 'password' => 'secret', +// 'username' => 'user', +// 'password' => 'secret', 'client' => null, 'log' => false, //'charset' => 'utf-8', @@ -66,7 +73,7 @@ class EmailConfig { ); public $fast = array( - 'from' => 'you@localhost', + 'from' => 'misp-dev@admin.test', 'sender' => null, 'to' => null, 'cc' => null, @@ -85,11 +92,11 @@ class EmailConfig { 'attachments' => null, 'emailFormat' => null, 'transport' => 'Smtp', - 'host' => 'localhost', + 'host' => 'mail', 'port' => 25, 'timeout' => 30, - 'username' => 'user', - 'password' => 'secret', +// 'username' => 'user', +// 'password' => 'secret', 'client' => null, 'log' => true, //'charset' => 'utf-8',