Skip to content

Commit

Permalink
added: OWA_MAILER_SMTP_SECURE setting
Browse files Browse the repository at this point in the history
  • Loading branch information
scolastico authored Jun 21, 2024
1 parent 3ac8775 commit 98cedbb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/owa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ RUN sed -i 's/ErrorLog .*/ErrorLog \/proc\/self\/fd\/2/' /etc/apache2/apache2.co
} > /usr/local/etc/php/conf.d/docker-php-errors.ini

COPY mail.php /mail.php
COPY secure.php /secure.php
RUN sed -i '/function applyConfigConstants() {/r /mail.php' /var/www/html/modules/base/classes/settings.php
RUN rm /mail.php
RUN sed -i '/$this->mailer->IsSMTP();/r /secure.php' /var/www/html/modules/base/classes/mailer.php
RUN rm /mail.php /secure.php

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
15 changes: 8 additions & 7 deletions src/owa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,20 @@ services:
define('OWA_PUBLIC_URL', 'http://domain/path/to/owa/');
define('OWA_MAILER_HOST', 'your_smtp_host');
define('OWA_MAILER_PORT', 465);
define('OWA_MAILER_SMTP_SECURE', 'ssl');
define('OWA_MAILER_USE_SMTP', true);
define('OWA_MAILER_SMTP_AUTH', true);
define('OWA_MAILER_USERNAME', 'your_smtp_username');
define('OWA_MAILER_PASSWORD', 'your_smtp_password');
define('OWA_MAILER_FROM_ADDRESS', '[email protected]');
define('OWA_MAILER_FROM_NAME', 'OWA Server');
define('OWA_MAILER_OPTIONS', array(
'ssl' => [
'verify_peer' => true,
'verify_depth' => 3,
'allow_self_signed' => false,
],
));
//define('OWA_MAILER_OPTIONS', array(
// 'ssl' => [
// 'verify_peer' => true,
// 'verify_depth' => 3,
// 'allow_self_signed' => false,
// ],
//));
?>
volumes:
Expand Down
3 changes: 3 additions & 0 deletions src/owa/secure.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if (defined('OWA_MAILER_SMTP_SECURE')) {
$this->mailer->SMTPSecure = OWA_MAILER_SMTP_SECURE
}

0 comments on commit 98cedbb

Please sign in to comment.