From 2ba7792ebbe18626fcaf1e60b0b458021718a32f Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Sun, 11 Feb 2018 22:08:12 +0000
Subject: [PATCH] add bdsmail app

---
 man/freedombone-template.1.gz  | Bin 1294 -> 1315 bytes
 src/freedombone-app-bdsmail    | 274 +++++++++++++++++++++++++++++++++
 src/freedombone-backup-local   |   6 +-
 src/freedombone-backup-remote  |   4 +
 src/freedombone-restore-local  |   8 +
 src/freedombone-restore-remote |   8 +
 6 files changed, 299 insertions(+), 1 deletion(-)
 create mode 100755 src/freedombone-app-bdsmail

diff --git a/man/freedombone-template.1.gz b/man/freedombone-template.1.gz
index b91fe51cd10b11b7f14810a4a4afe90ec86c9e34..e6fd942c5b43288daf2d226cc6de396458e519ce 100644
GIT binary patch
literal 1315
zcmV+;1>E`{iwFQ^o`6~a1Kn3`Puw^V{+?ek%9noW?n3WH6*^V7P$)<Ttad?nC#aAU
zPZA%Ao!SnoociN$Z0BW{F0|5BCv<3m*zt^Ko_XeFr&p(tX+*B7L`j@jtm=|kgnfwj
zeufiF;LYCt+ZbZ{oQwzI+Ms@A;GD^Zm2nhJSEmqP%+HVGXs5p034B0_nw||vT!Trq
zs4esd3}i|Jt7{W=%2t0~TrO5;t0xprCUh8XB&+ZvOb~9cVxpu+4L2HV1&wyA6mC*g
zRl?Hqq*mIJNK+-K`?Zi3wPfYyzEqqPwrD;}<<?3HB{w(fqTXC`hSk;q4mTCkg7M^Y
zt&Ghznop%aDabq_jb&vCw7}FV-G1zSet*0=TAnSg&Mq(F=&BF~Ol!zxXbd65z@P<{
zb=VnL7a}cyqgy8k$Y|wISqn=KkU5wwlbmTT{zeX2BU9^Kaj2OoTopLzN|^-GA*8T^
zjB6q9!o}%wA#<?K9ET+-1ovwTl#q$Cq$8@a-L0~vYc##n(D}*yl^iX_$4sN(7guQH
zD+{Sc7flBApSKgMCb@Dxy!KbLsv)%m)dT7lN^y^5m?SoURggBus)`(QmXN$@O6v>_
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7dmP4Q|nMV1Nw)b3^(6^HI7z&q2YJUy$*J+Wc}7pYGzu3QTC`P4<`
z7)RMo+}UHnXT1}4?ges$($HJl<in7R4!gR_G~+#5bJT=<85rKaGd^@j<famdFGRYQ
zutt0+x+{oT@=#azg`)SL>uO(bK;eR8aI-uHuIaLRVo>>@Yur+^2%E->ab{VFCP)Xx
z+fFzH?4F38@InTb6Fna{7#bYeR`sMOpXmr??)1;u<^1<kDsIt9S5w>S)@Fv|yhvbv
zK8LEPsdqQakHz%T^{IEqgmCOkQMm*9`HGf%cjq<i{n=^9)J3Ufx^~%iOL+UNxY5aU
z(=&2sTsHLAxfDfbKF%v@-hZ2+4{nF)kc^qZmyFYo6FY%EEA7XGDcWS(M>k9vPSH1j
zX-+Aw<N(vWpHsdEMjVDYsg3_R*_Xw}4L7btb-29tV^A%rKKX$oMoaZ6RQ1-8c0Tf1
z6%y5zeLsI5zWL$Dmt@}_E`5P~1C~1@vUB|#;QKVP?L<4kOFo1tnfic()wMq>lDc3z
zplNfh>MZwQr*v{nE#v=%F8p+GaPW1g&i-R@Z{c;LfFwZKBZbc50zI@eJov9UG#yeJ
zn(y2Qo(C~_8nXQh*!bpneDj_f;{rY2ah*|nu+)1Yx3)4z(`iOrtm6rJG$k75+Zw0B
zm>T=<rL&vW`SoHH9jh2Fm8JQugkNJ7|F$7Ak!asWlUPT8V0_e@**OvY3)IdWSbh%x
E0C!1#lmGw#

diff --git a/src/freedombone-app-bdsmail b/src/freedombone-app-bdsmail
new file mode 100755
index 000000000..102cbe3dd
--- /dev/null
+++ b/src/freedombone-app-bdsmail
@@ -0,0 +1,274 @@
+#!/bin/bash
+#
+# .---.                  .              .
+# |                      |              |
+# |--- .--. .-.  .-.  .-.|  .-. .--.--. |.-.  .-. .--.  .-.
+# |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
+# '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
+#
+#                    Freedom in the Cloud
+#
+# Brain Dead Simple Mail Server for i2p
+#
+# License
+# =======
+#
+# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+VARIANTS='full full-vim'
+
+IN_DEFAULT_INSTALL=0
+SHOW_ON_ABOUT=1
+
+BDSMAIL_REPO="https://github.com/majestrate/bdsmail"
+BDSMAIL_COMMIT='6a2296b0b8e6c3da61081b85802e7b1cc88ca285'
+
+bdsmail=(MY_USERNAME)
+
+function logging_on_bdsmail {
+    echo -n ''
+}
+
+function logging_off_bdsmail {
+    echo -n ''
+}
+
+function remove_user_bdsmail {
+    remove_username="$1"
+}
+
+function add_user_bdsmail {
+    new_username="$1"
+    new_user_password="$2"
+
+    if [ ! -d /home/$new_username/.mutt ]; then
+        mkdir /home/$new_username/.mutt
+        cp /etc/skel/.mutt/bdsmail /home/$new_username/.mutt
+    fi
+    sed -i "s|username|$new_username|g" /home/$new_username/.mutt/bdsmail
+    chown -R $new_username:$new_username /home/$new_username/.mutt
+    echo '0'
+}
+
+function install_interactive_bdsmail {
+    echo -n ''
+    APP_INSTALLED=1
+}
+
+function change_password_bdsmail {
+    curr_username="$1"
+    new_user_password="$2"
+}
+
+function reconfigure_bdsmail {
+    # This is used if you need to switch identity. Dump old keys and generate new ones
+    echo -n ''
+}
+
+function upgrade_bdsmail {
+    CURR_BDSMAIL_COMMIT=$(get_completion_param "bdsmail commit")
+    if [[ "$CURR_BDSMAIL_COMMIT" == "$BDSMAIL_COMMIT" ]]; then
+        return
+    fi
+
+    # update to the next commit
+    set_repo_commit /etc/bdsmail "bdsmail commit" "$BDSMAIL_COMMIT" $BDSMAIL_REPO
+    chown -R bdsmail:bdsmail /etc/bdsmail
+}
+
+function backup_local_bdsmail {
+    systemctl stop bdsmail
+
+    source_directory=/etc/bdsmail
+
+    function_check backup_directory_to_usb
+    dest_directory=bdsmail
+    backup_directory_to_usb $source_directory $dest_directory
+
+    systemctl start bdsmail
+}
+
+function restore_local_bdsmail {
+    systemctl stop bdsmail
+
+    temp_restore_dir=/root/tempbdsmail
+    bdsmail_dir=/etc/bdsmail
+
+    function_check restore_directory_from_usb
+    restore_directory_from_usb $temp_restore_dir bdsmail
+    if [ -d $temp_restore_dir ]; then
+        if [ -d cp $temp_restore_dir$bdsmail_dir ]; then
+            cp -rp $temp_restore_dir$bdsmail_dir $bdsmail_dir/
+        else
+            if [ ! -d $bdsmail_dir ]; then
+                mkdir $bdsmail_dir
+            fi
+            cp -rp $temp_restore_dir/* $bdsmail_dir
+        fi
+        chown -R bdsmail:bdsmail $bdsmail_dir
+        rm -rf $temp_restore_dir
+    fi
+
+    systemctl start bdsmail
+}
+
+function backup_remote_bdsmail {
+    systemctl stop bdsmail
+
+    source_directory=/etc/bdsmail
+
+    function_check backup_directory_to_friend
+    dest_directory=bdsmail
+    backup_directory_to_friend $source_directory $dest_directory
+
+    systemctl start bdsmail
+}
+
+function restore_remote_bdsmail {
+    systemctl stop bdsmail
+
+    temp_restore_dir=/root/tempbdsmail
+    bdsmail_dir=/etc/bdsmail
+
+    function_check restore_directory_from_friend
+    restore_directory_from_friend $temp_restore_dir bdsmail
+    if [ -d $temp_restore_dir ]; then
+        if [ -d cp $temp_restore_dir$bdsmail_dir ]; then
+            cp -rp $temp_restore_dir$bdsmail_dir $bdsmail_dir/
+        else
+            if [ ! -d $bdsmail_dir ]; then
+                mkdir $bdsmail_dir
+            fi
+            cp -rp $temp_restore_dir/* $bdsmail_dir
+        fi
+        chown -R bdsmail:bdsmail $bdsmail_dir
+        rm -rf $temp_restore_dir
+    fi
+
+    systemctl start bdsmail
+}
+
+function remove_bdsmail {
+    if [ -f /etc/systemd/system/bdsmail.service ]; then
+        systemctl stop bdsmail
+        systemctl disable bdsmail
+        rm /etc/systemd/system/bdsmail.service
+    fi
+    userdel -r bdsmail
+
+    remove_app bdsmail
+    remove_completion_param install_bdsmail
+    sed -i '/bdsmail/d' $COMPLETION_FILE
+    rm -rf /etc/skel/.mutt
+    remove_i2p
+}
+
+function install_bdsmail {
+    if [ -d /etc/bdsmail ]; then
+        rm -rf /etc/bdsmail
+    fi
+
+    if [ -d /repos/bdsmail ]; then
+        mkdir /etc/bdsmail
+        cp -r -p /repos/bdsmail/. /etc/bdsmail
+        cd /etc/bdsmail
+        git pull
+    else
+        git_clone $BDSMAIL_REPO /etc/bdsmail
+    fi
+
+    if [ ! -d /etc/bdsmail ]; then
+        echo $'Unable to clone bdsmail repo'
+        exit 5735735
+    fi
+
+    cd /etc/bdsmail
+    git checkout $BDSMAIL_COMMIT -b $BDSMAIL_COMMIT
+    set_completion_param "bdsmail commit" "$BDSMAIL_COMMIT"
+
+    useradd -d /etc/bdsmail -s /bin/false bdsmail
+
+    make make GOROOT=/home/go/go${GO_VERSION}
+    if [ ! -f /etc/bdsmail/bin/bdsconfig ]; then
+        echo $'Unable to make bdsmail'
+        exit 87923567842
+    fi
+
+    install_i2p
+
+    # create configuration file
+    /etc/bdsmail/bin/bdsconfig > /etc/bdsmail/config.ini
+    echo '[maild]' > /etc/bdsmail/config.ini
+    echo 'i2paddr = 127.0.0.1:7656' >> /etc/bdsmail/config.ini
+    echo 'i2pkeyfile = bdsmail-privkey.dat' >> /etc/bdsmail/config.ini
+    echo 'bindmail = 127.0.0.1:2525' >> /etc/bdsmail/config.ini
+    echo 'bindweb = 127.0.0.1:8489' >> /etc/bdsmail/config.ini
+    echo 'domain = localhost' >> /etc/bdsmail/config.ini
+    echo 'maildir = mail' >> /etc/bdsmail/config.ini
+    echo 'database = localhost.sqlite' >> /etc/bdsmail/config.ini
+    echo 'assets = contrib/assets/web' >> /etc/bdsmail/config.ini
+
+    echo '[Unit]' > /etc/systemd/system/bdsmail.service
+    echo 'Description=bdsmail' >> /etc/systemd/system/bdsmail.service
+    echo 'After=syslog.target' >> /etc/systemd/system/bdsmail.service
+    echo 'After=network.target' >> /etc/systemd/system/bdsmail.service
+    echo '' >> /etc/systemd/system/bdsmail.service
+    echo '[Service]' >> /etc/systemd/system/bdsmail.service
+    echo 'Type=simple' >> /etc/systemd/system/bdsmail.service
+    echo 'User=bdsmail' >> /etc/systemd/system/bdsmail.service
+    echo 'Group=bdsmail' >> /etc/systemd/system/bdsmail.service
+    echo 'WorkingDirectory=/etc/bdsmail' >> /etc/systemd/system/bdsmail.service
+    echo 'ExecStart=/etc/bdsmail/bin/maild /etc/bdsmail/config.ini' >> /etc/systemd/system/bdsmail.service
+    echo 'Restart=always' >> /etc/systemd/system/bdsmail.service
+    echo 'Environment="USER=bdsmail"' >> /etc/systemd/system/bdsmail.service
+    echo '' >> /etc/systemd/system/bdsmail.service
+    echo '[Install]' >> /etc/systemd/system/bdsmail.service
+    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/bdsmail.service
+    systemctl enable bdsmail
+    chown -R bdsmail:bdsmail /etc/bdsmail
+    systemctl start bdsmail
+
+    echo '#!/usr/bin/env python2' > /etc/bdsmail/get_address
+    echo 'import base64, hashlib, sys' >> /etc/bdsmail/get_address
+    echo 'with open(sys.argv[1]) as f:' >> /etc/bdsmail/get_address
+    echo "    print(base64.b32encode(hashlib.sha256(base64.b64decode(f.read(516), '-~')).digest()).strip('=')+\".b32.i2p\")" >> /etc/bdsmail/get_address
+    chmod +x  >> /etc/bdsmail/get_address
+
+    echo '#!/bin/bash' > /usr/bin/bdsmail_domain
+    echo 'cd /etc/bdsmail' >> /usr/bin/bdsmail_domain
+    echo 'python2 get_address bdsmail-privkey.dat' >> /usr/bin/bdsmail_domain
+    chmod +x /usr/bin/bdsmail_domain
+
+    # Create mutt configuration
+    mkdir /etc/skel/.mutt
+    echo 'set mbox_type=Maildir' > /etc/skel/.mutt/bdsmail
+    echo 'set smtp_url=smtp://127.0.0.1:2525/' >> /etc/skel/.mutt/bdsmail
+    echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail
+    echo "set from=username@$(bdsmail_domain)" >> /etc/skel/.mutt/bdsmail
+    echo 'set spoolfile=/etc/bdsmail/mail/username' >> /etc/skel/.mutt/bdsmail
+
+    # mutt configuration for the admin user
+    if [ ! -d /home/$MY_USERNAME/.mutt ]; then
+        mkdir /home/$MY_USERNAME/.mutt
+    fi
+    cp /etc/skel/.mutt/bdsmail /home/$MY_USERNAME/.mutt
+    sed -i "s|username|$MY_USERNAME|g" /home/$MY_USERNAME/.mutt/bdsmail
+    chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.mutt
+
+    APP_INSTALLED=1
+}
+
+# NOTE: deliberately there is no "exit 0"
diff --git a/src/freedombone-backup-local b/src/freedombone-backup-local
index b324a4445..482f6162a 100755
--- a/src/freedombone-backup-local
+++ b/src/freedombone-backup-local
@@ -13,7 +13,7 @@
 # License
 # =======
 #
-# Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
+# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
@@ -177,6 +177,10 @@ function backup_users {
                 fi
                 backup_directory_to_usb /home/$USERNAME/tempbackup mutt/$USERNAME
             fi
+            if [ -d /home/$USERNAME/.mutt ]; then
+                echo $"Backing up Mutt configurations for $USERNAME"
+                backup_directory_to_usb /home/$USERNAME/.mutt mutt/${USERNAME}configs
+            fi
 
             # Backup email
             if [ -d /home/$USERNAME/Maildir ]; then
diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote
index bb76192c7..69e3f529a 100755
--- a/src/freedombone-backup-remote
+++ b/src/freedombone-backup-remote
@@ -231,6 +231,10 @@ function backup_users {
                 fi
                 backup_directory_to_friend /home/$USERNAME/tempbackup mutt/$USERNAME
             fi
+            if [ -d /home/$USERNAME/.mutt ]; then
+                echo $"Backing up Mutt configurations for $USERNAME"
+                backup_directory_to_friend /home/$USERNAME/.mutt mutt/${USERNAME}configs
+            fi
 
             # procmail settings
             if [ -f /home/$USERNAME/.procmailrc ]; then
diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local
index 62e1e3a95..bacbe5cb1 100755
--- a/src/freedombone-restore-local
+++ b/src/freedombone-restore-local
@@ -404,10 +404,18 @@ function restore_mutt_settings {
     if [ -d $USB_MOUNT/backup/mutt ]; then
         for d in $USB_MOUNT/backup/mutt/*/ ; do
             USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
+
+            # skip over configurations
+            if [[ "$USERNAME" == *'configs' ]]; then
+                continue
+            fi
+
             if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
                 if [ ! -d /home/$USERNAME ]; then
                     ${PROJECT_NAME}-adduser $USERNAME
                 fi
+                echo $"Restoring Mutt configurations for $USERNAME"
+                restore_directory_from_usb /home/$USERNAME/.mutt mutt/${USERNAME}configs
                 echo $"Restoring Mutt settings for $USERNAME"
                 temp_restore_dir=/root/tempmutt
                 restore_directory_from_usb $temp_restore_dir mutt/$USERNAME
diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote
index b7d557826..61226fdc9 100755
--- a/src/freedombone-restore-remote
+++ b/src/freedombone-restore-remote
@@ -360,11 +360,19 @@ function restore_mutt_settings {
     fi
     for d in $SERVER_DIRECTORY/backup/mutt/*/ ; do
         USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
+
+        # skip over configurations
+        if [[ "$USERNAME" == *'configs' ]]; then
+            continue
+        fi
+
         if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
             if [ -d $SERVER_DIRECTORY/backup/mutt/$USERNAME ]; then
                 if [ ! -d /home/$USERNAME ]; then
                     ${PROJECT_NAME}-adduser $USERNAME
                 fi
+                echo $"Restoring Mutt configurations for $USERNAME"
+                restore_directory_from_friend /home/$USERNAME/.mutt mutt/${USERNAME}configs
                 echo $"Restoring Mutt settings for $USERNAME"
                 temp_restore_dir=/root/tempmutt
                 restore_directory_from_friend ${temp_restore_dir} mutt/$USERNAME
-- 
GitLab