Browse Source

Create bdsmail admin password

Bob Mottram 7 years ago
parent
commit
ae46a1b5e6
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      src/freedombone-app-bdsmail

+ 6
- 2
src/freedombone-app-bdsmail View File

@@ -34,7 +34,7 @@ IN_DEFAULT_INSTALL=0
34 34
 SHOW_ON_ABOUT=1
35 35
 
36 36
 BDSMAIL_REPO="https://github.com/majestrate/bdsmail"
37
-BDSMAIL_COMMIT='32f50455ddafafef715917a4458b8a97e99ecd73'
37
+BDSMAIL_COMMIT='2f047942e1cc0e36258fef27dc2fa49be299fca4'
38 38
 BDSMAIL_DIR=/etc/bdsmail
39 39
 I2P_SAM_PORT=7656
40 40
 I2P_SMTP_PORT=2525
@@ -381,10 +381,14 @@ function install_bdsmail {
381 381
         exit 8934638
382 382
     fi
383 383
 
384
+    bdsmail_admin_password="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
385
+    ${PROJECT_NAME}-pass -u $new_username -a bdsmail -p "$bdsmail_admin_password"
386
+    $BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini admin $BDSMAIL_DIR/Maildir/i2p/admin $bdsmail_admin_password
387
+
384 388
     # Create mutt configuration
385 389
     mkdir /etc/skel/.mutt
386 390
     echo 'set mbox_type=Maildir' > /etc/skel/.mutt/bdsmail
387
-    echo "set smtp_url=smtp://127.0.0.1:$I2P_SMTP_PORT/" >> /etc/skel/.mutt/bdsmail
391
+    echo "set smtp_url=smtp://admin:${bdsmail_admin_password}@127.0.0.1:$I2P_SMTP_PORT/" >> /etc/skel/.mutt/bdsmail
388 392
     echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail
389 393
     echo "set from=username@${bds_domain}" >> /etc/skel/.mutt/bdsmail
390 394
     echo "set spoolfile=~/Maildir/i2p" >> /etc/skel/.mutt/bdsmail