swish/commit

FIXED: legal default email config file.

authorJan Wielemaker
Thu Sep 7 13:35:44 2017 +0200
committerJan Wielemaker
Thu Sep 7 13:35:44 2017 +0200
commit8209a44e4a7313f634971515adf7687c8ffa59b3
treea94db6e2713b517332a7687cee780feae9dc1525
parentfe8d89dcbb70e256a1d9a5c3d25759d015a9e10c
Diff style: patch stat
diff --git a/config-available/email.pl b/config-available/email.pl
index b1c59dc..1108099 100644
--- a/config-available/email.pl
+++ b/config-available/email.pl
@@ -51,12 +51,18 @@ and notifications.
 % email_test(MyMailAddress) to verify that the   setup is correct. Watch
 % your spam box if Prolog reports no problems   but you do not receive a
 % message.
-:- set_setting_default(smtp:host,        '****').
-:- set_setting_default(smtp:port,        ****).
-:- set_setting_default(smtp:security,    ****).
-:- set_setting_default(smtp:from,        '****').
-:- set_setting_default(smtp:user,        '****').
-:- set_setting_default(smtp:password,    "****").
+%
+% The provided defaults suffice  for  Unix   machines  with  a  properly
+% configured local sendmail and DNS. Such  configurations are rare these
+% days, so you probably must edit this.
+:- set_setting_default(smtp:host,        localhost).
+:- set_setting_default(smtp:port,        25).
+:- set_setting_default(smtp:security,    none).
+:- gethostname(Host),
+   atom_concat('swish@', Host, Email),
+   set_setting_default(smtp:from,        Email).
+%:- set_setting_default(smtp:user,        '****').
+%:- set_setting_default(smtp:password,    "****").
 %:- set_setting_default(smtp:auth_method, default).
 %:- set_setting_default(smtp:hostname,    '').