diff --git a/CHANGELOG b/CHANGELOG index 1bbaec7..ac69085 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Revision history for Lufi ?.??.? ????-??-?? - 🔧 Set default morbo port to 3000 (as it should have stay) - 🐛 Fix `Notification not defined` in Duckduckgo browser (Fix #224 again) + - ✨ Add `disable_mail_sending` config parameter 0.05.13 2021-01-28 - 🐛 Fix latest git tag improperly fetched diff --git a/lib/Lufi.pm b/lib/Lufi.pm index 10f8206..a480979 100644 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -232,7 +232,7 @@ sub startup { # Submit mail $r->post('/m') - ->to('Mail#send_mail'); + ->to('Mail#send_mail') unless $self->config('disable_mail_sending'); # Upload files websocket $r->websocket('/upload') diff --git a/lib/Lufi/DefaultConfig.pm b/lib/Lufi/DefaultConfig.pm index 7385778..e1ea0ac 100644 --- a/lib/Lufi/DefaultConfig.pm +++ b/lib/Lufi/DefaultConfig.pm @@ -17,6 +17,7 @@ our $default_config = { how => 'sendmail' }, mail_sender => 'no-reply@lufi.io', + disable_mail_sending => 0, theme => 'default', upload_dir => 'files', session_duration => 3600, diff --git a/lufi.conf.template b/lufi.conf.template index ed2f388..b7401b4 100644 --- a/lufi.conf.template +++ b/lufi.conf.template @@ -166,6 +166,10 @@ # optional, default to no-reply@lufi.io #mail_sender => 'no-reply@lufi.io', + # Disable sending mail through the server + # optional, default is false + #disable_mail_sending => 0, + ############# # DB settings ############# diff --git a/themes/default/templates/mail.html.ep b/themes/default/templates/mail.html.ep index 4d47684..b8ef5d5 100644 --- a/themes/default/templates/mail.html.ep +++ b/themes/default/templates/mail.html.ep @@ -43,7 +43,9 @@ % } - + % if (!$self->config('disable_mail_sending')) { + + % } <%= l('Send with your own mail software') %>