Include ssh onion address as an email domain
This commit is contained in:
parent
97b564bd7a
commit
e080551639
|
@ -73,17 +73,6 @@ GPGIT_COMMIT='583dc76119f19420f8a33f606744faa7c8922738'
|
|||
# refresh gpg keys every few hours
|
||||
REFRESH_GPG_KEYS_HOURS=2
|
||||
|
||||
function add_email_hostname {
|
||||
extra_email_hostname="$1"
|
||||
email_hostnames=$(cat /etc/exim4/update-exim4.conf.conf | grep "dc_other_hostnames" | awk -F "'" '{print $2}')
|
||||
if [[ "$email_hostnames" != *"$extra_email_hostname"* ]]; then
|
||||
sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames;extra_email_hostname'|g" /etc/exim4/update-exim4.conf.conf
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
systemctl restart saslauthd
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_email_onion {
|
||||
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
|
||||
return
|
||||
|
|
|
@ -28,6 +28,17 @@
|
|||
# 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/>.
|
||||
|
||||
function add_email_hostname {
|
||||
extra_email_hostname="$1"
|
||||
email_hostnames=$(cat /etc/exim4/update-exim4.conf.conf | grep "dc_other_hostnames" | awk -F "'" '{print $2}')
|
||||
if [[ "$email_hostnames" != *"$extra_email_hostname"* ]]; then
|
||||
sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames;extra_email_hostname'|g" /etc/exim4/update-exim4.conf.conf
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
systemctl restart saslauthd
|
||||
fi
|
||||
}
|
||||
|
||||
function onion_update {
|
||||
# update so that new onion services appear
|
||||
systemctl reload tor
|
||||
|
@ -231,6 +242,7 @@ function configure_ssh_onion {
|
|||
SSH_ONION_HOSTNAME=$(add_onion_service ssh ${SSH_PORT} ${SSH_PORT})
|
||||
|
||||
set_completion_param "ssh onion domain" "${SSH_ONION_HOSTNAME}"
|
||||
add_email_hostname "${SSH_ONION_HOSTNAME}"
|
||||
|
||||
mark_completed $FUNCNAME
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue