|
@@ -252,12 +252,21 @@ function install_bdsmail {
|
252
|
252
|
echo 'python2 get_address bdsmail-privkey.dat' >> /usr/bin/bdsmail_domain
|
253
|
253
|
chmod +x /usr/bin/bdsmail_domain
|
254
|
254
|
|
|
255
|
+ # wait for domain to be generated by the daemon
|
|
256
|
+ sleep 10
|
|
257
|
+
|
|
258
|
+ bds_domain=$(bdsmail_domain)
|
|
259
|
+ if [ ! $bds_domain ]; then
|
|
260
|
+ echo $'Failed to get the bdsmail domain'
|
|
261
|
+ exit 8934638
|
|
262
|
+ fi
|
|
263
|
+
|
255
|
264
|
# Create mutt configuration
|
256
|
265
|
mkdir /etc/skel/.mutt
|
257
|
266
|
echo 'set mbox_type=Maildir' > /etc/skel/.mutt/bdsmail
|
258
|
267
|
echo 'set smtp_url=smtp://127.0.0.1:2525/' >> /etc/skel/.mutt/bdsmail
|
259
|
268
|
echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail
|
260
|
|
- echo "set from=username@$(bdsmail_domain)" >> /etc/skel/.mutt/bdsmail
|
|
269
|
+ echo "set from=username@${bds_domain}" >> /etc/skel/.mutt/bdsmail
|
261
|
270
|
echo 'set spoolfile=/etc/bdsmail/mail/username' >> /etc/skel/.mutt/bdsmail
|
262
|
271
|
|
263
|
272
|
# mutt configuration for the admin user
|