aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-28 00:46:11 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-28 00:46:11 +0100
commit591ebd877b8d5465da95fd7e212da5ef747944ca (patch)
tree777a1c08ed67de2f0b132ca16998a6297627a7a2
parentc9af72bccc8324af25dde5704867fad0f56418bb (diff)
downloadNix-591ebd877b8d5465da95fd7e212da5ef747944ca.tar.gz
Nix-591ebd877b8d5465da95fd7e212da5ef747944ca.tar.zst
Nix-591ebd877b8d5465da95fd7e212da5ef747944ca.zip
Configure mailer spool for tools
Fixes https://git.immae.eu/mantisbt/view.php?id=104
-rw-r--r--nixops/modules/websites/tools/diaspora/diaspora.nix4
-rw-r--r--nixops/modules/websites/tools/git/mantisbt/mantisbt.nix4
-rw-r--r--nixops/modules/websites/tools/mastodon/mastodon.nix7
-rw-r--r--nixops/modules/websites/tools/tools/ttrss.nix5
-rw-r--r--nixops/modules/websites/tools/tools/wallabag.nix10
5 files changed, 15 insertions, 15 deletions
diff --git a/nixops/modules/websites/tools/diaspora/diaspora.nix b/nixops/modules/websites/tools/diaspora/diaspora.nix
index 765c0a5..74be4fe 100644
--- a/nixops/modules/websites/tools/diaspora/diaspora.nix
+++ b/nixops/modules/websites/tools/diaspora/diaspora.nix
@@ -69,10 +69,10 @@ let
69 mail: 69 mail:
70 enable: true 70 enable: true
71 sender_address: 'diaspora@immae.eu' 71 sender_address: 'diaspora@immae.eu'
72 method: 'smtp' 72 method: 'sendmail'
73 smtp: 73 smtp:
74 host: 'mail.immae.eu'
75 sendmail: 74 sendmail:
75 location: '/run/wrappers/bin/sendmail'
76 admins: 76 admins:
77 account: "ismael" 77 account: "ismael"
78 podmin_email: 'diaspora@immae.eu' 78 podmin_email: 'diaspora@immae.eu'
diff --git a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix
index c6c3bff..b1837eb 100644
--- a/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix
+++ b/nixops/modules/websites/tools/git/mantisbt/mantisbt.nix
@@ -30,8 +30,8 @@ let
30 $g_allow_anonymous_login = ON; 30 $g_allow_anonymous_login = ON;
31 $g_anonymous_account = 'anonymous'; 31 $g_anonymous_account = 'anonymous';
32 32
33 $g_phpMailer_method = PHPMAILER_METHOD_SMTP; 33 $g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL;
34 $g_smtp_host = 'mail.immae.eu'; 34 $g_smtp_host = 'localhost';
35 $g_smtp_username = '''; 35 $g_smtp_username = ''';
36 $g_smtp_password = '''; 36 $g_smtp_password = ''';
37 $g_webmaster_email = 'webmaster@immae.eu'; 37 $g_webmaster_email = 'webmaster@immae.eu';
diff --git a/nixops/modules/websites/tools/mastodon/mastodon.nix b/nixops/modules/websites/tools/mastodon/mastodon.nix
index 770aa2c..8650ee3 100644
--- a/nixops/modules/websites/tools/mastodon/mastodon.nix
+++ b/nixops/modules/websites/tools/mastodon/mastodon.nix
@@ -84,10 +84,9 @@ let
84 VAPID_PRIVATE_KEY=${env.vapid.private} 84 VAPID_PRIVATE_KEY=${env.vapid.private}
85 VAPID_PUBLIC_KEY=${env.vapid.public} 85 VAPID_PUBLIC_KEY=${env.vapid.public}
86 86
87 SMTP_SERVER=mail.immae.eu 87 SMTP_DELIVERY_METHOD=sendmail
88 SMTP_PORT=587
89 SMTP_FROM_ADDRESS=notifications@mastodon.immae.eu 88 SMTP_FROM_ADDRESS=notifications@mastodon.immae.eu
90 SMTP_DELIVERY_METHOD=smtp 89 SENDMAIL_LOCATION="/run/wrappers/bin/sendmail"
91 PAPERCLIP_ROOT_PATH=${varDir} 90 PAPERCLIP_ROOT_PATH=${varDir}
92 91
93 STREAMING_CLUSTER_NUM=1 92 STREAMING_CLUSTER_NUM=1
@@ -115,6 +114,8 @@ let
115 cp -a $mastodon $out 114 cp -a $mastodon $out
116 cd $out 115 cd $out
117 chmod u+rwX . public 116 chmod u+rwX . public
117 chmod -R u+rwX config/
118 sed -i -e 's@^end$@ config.action_mailer.sendmail_settings = { location: ENV.fetch("SENDMAIL_LOCATION", "/usr/sbin/sendmail") }\nend@' config/environments/production.rb
118 RAILS_ENV=production ${gems}/bin/rails assets:precompile 119 RAILS_ENV=production ${gems}/bin/rails assets:precompile
119 rm -rf tmp/cache 120 rm -rf tmp/cache
120 ln -sf ../../../../../../../${varDir}/tmp/cache tmp 121 ln -sf ../../../../../../../${varDir}/tmp/cache tmp
diff --git a/nixops/modules/websites/tools/tools/ttrss.nix b/nixops/modules/websites/tools/tools/ttrss.nix
index 95cca9d..9e6f98d 100644
--- a/nixops/modules/websites/tools/tools/ttrss.nix
+++ b/nixops/modules/websites/tools/tools/ttrss.nix
@@ -97,11 +97,6 @@ let
97 define('REG_NOTIFY_ADDRESS', 'outils@immae.eu'); 97 define('REG_NOTIFY_ADDRESS', 'outils@immae.eu');
98 define('REG_MAX_USERS', 10); 98 define('REG_MAX_USERS', 10);
99 99
100 define('SMTP_SERVER', 'mail.immae.eu:25');
101 define('SMTP_LOGIN', ''');
102 define('SMTP_PASSWORD', ''');
103 define('SMTP_SECURE', 'tls');
104
105 define('SMTP_FROM_NAME', 'Tiny Tiny RSS'); 100 define('SMTP_FROM_NAME', 'Tiny Tiny RSS');
106 define('SMTP_FROM_ADDRESS', 'outils@immae.eu'); 101 define('SMTP_FROM_ADDRESS', 'outils@immae.eu');
107 define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours'); 102 define('DIGEST_SUBJECT', '[tt-rss] New headlines for last 24 hours');
diff --git a/nixops/modules/websites/tools/tools/wallabag.nix b/nixops/modules/websites/tools/tools/wallabag.nix
index 4bda808..1c08bbf 100644
--- a/nixops/modules/websites/tools/tools/wallabag.nix
+++ b/nixops/modules/websites/tools/tools/wallabag.nix
@@ -17,8 +17,8 @@ let
17 database_socket: null 17 database_socket: null
18 database_charset: utf8 18 database_charset: utf8
19 domain_name: https://tools.immae.eu/wallabag 19 domain_name: https://tools.immae.eu/wallabag
20 mailer_transport: smtp 20 mailer_transport: sendmail
21 mailer_host: mail.immae.eu 21 mailer_host: 127.0.0.1
22 mailer_user: null 22 mailer_user: null
23 mailer_password: null 23 mailer_password: null
24 locale: fr 24 locale: fr
@@ -55,6 +55,10 @@ let
55 ldap_email_attribute: mail 55 ldap_email_attribute: mail
56 ldap_name_attribute: cn 56 ldap_name_attribute: cn
57 ldap_enabled_attribute: null 57 ldap_enabled_attribute: null
58 services:
59 swiftmailer.mailer.default.transport:
60 class: Swift_SendmailTransport
61 arguments: ['/run/wrappers/bin/sendmail -bs']
58 ''; 62 '';
59 webappDir = composerEnv.buildPackage rec { 63 webappDir = composerEnv.buildPackage rec {
60 packages = { 64 packages = {
@@ -172,7 +176,7 @@ let
172 176
173 ; Needed to avoid clashes in browser cookies (same domain) 177 ; Needed to avoid clashes in browser cookies (same domain)
174 php_value[session.name] = WallabagPHPSESSID 178 php_value[session.name] = WallabagPHPSESSID
175 php_admin_value[open_basedir] = "${basedir}:/tmp" 179 php_admin_value[open_basedir] = "/run/wrappers/bin/sendmail:${basedir}:/tmp"
176 php_value[max_execution_time] = 300 180 php_value[max_execution_time] = 300
177 ''; 181 '';
178 }; 182 };