i2p firewall for smtp
This commit is contained in:
parent
0702d2448c
commit
6444469967
|
@ -36,6 +36,8 @@ SHOW_ON_ABOUT=1
|
|||
BDSMAIL_REPO="https://github.com/majestrate/bdsmail"
|
||||
BDSMAIL_COMMIT='6a2296b0b8e6c3da61081b85802e7b1cc88ca285'
|
||||
BDSMAIL_DIR=/etc/bdsmail
|
||||
I2P_SAM_PORT=7656
|
||||
I2P_SMTP_PORT=2525
|
||||
|
||||
bdsmail=(MY_USERNAME)
|
||||
|
||||
|
@ -205,6 +207,9 @@ function remove_bdsmail {
|
|||
rm /etc/systemd/system/bdsmail.service
|
||||
fi
|
||||
|
||||
firewall_remove $I2P_SAM_PORT
|
||||
firewall_remove $I2P_SMTP_PORT
|
||||
|
||||
for d in /home/*/ ; do
|
||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||
if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
|
||||
|
@ -277,9 +282,9 @@ function install_bdsmail {
|
|||
# create configuration file
|
||||
$BDSMAIL_DIR/bin/bdsconfig > $BDSMAIL_DIR/config.ini
|
||||
echo '[maild]' > $BDSMAIL_DIR/config.ini
|
||||
echo 'i2paddr = 127.0.0.1:7656' >> $BDSMAIL_DIR/config.ini
|
||||
echo "i2paddr = 127.0.0.1:$I2P_SAM_PORT" >> $BDSMAIL_DIR/config.ini
|
||||
echo 'i2pkeyfile = bdsmail-privkey.dat' >> $BDSMAIL_DIR/config.ini
|
||||
echo 'bindmail = 127.0.0.1:2525' >> $BDSMAIL_DIR/config.ini
|
||||
echo "bindmail = 127.0.0.1:$I2P_SMTP_PORT" >> $BDSMAIL_DIR/config.ini
|
||||
echo 'bindweb = 127.0.0.1:8489' >> $BDSMAIL_DIR/config.ini
|
||||
echo 'domain = localhost' >> $BDSMAIL_DIR/config.ini
|
||||
echo 'maildir = mail' >> $BDSMAIL_DIR/config.ini
|
||||
|
@ -352,7 +357,7 @@ function install_bdsmail {
|
|||
# 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 smtp_url=smtp://127.0.0.1:$I2P_SMTP_PORT/" >> /etc/skel/.mutt/bdsmail
|
||||
echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail
|
||||
echo "set from=username@${bds_domain}" >> /etc/skel/.mutt/bdsmail
|
||||
echo "set spoolfile=~/Maildir/i2p" >> /etc/skel/.mutt/bdsmail
|
||||
|
@ -385,6 +390,9 @@ function install_bdsmail {
|
|||
exit 638762424;;
|
||||
esac
|
||||
|
||||
firewall_add i2psam $I2P_SAM_PORT
|
||||
firewall_add i2psmtp $I2P_SMTP_PORT
|
||||
|
||||
APP_INSTALLED=1
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue