Add xmpp address to email headers
This commit is contained in:
parent
71abe7cb5b
commit
0df2c9ca7a
|
@ -88,4 +88,11 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# add the xmpp address to email headers
|
||||
if [ -f /home/$USERNAME/.muttrc ]; then
|
||||
if ! grep -q "Jabber-ID" /home/$USERNAME/.muttrc; then
|
||||
echo "my_hdr Jabber-ID: ${USERNAME}@${HOSTNAME}" >> /home/$USERNAME/.muttrc
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -226,6 +226,19 @@ function remove_xmpp {
|
|||
sed '/XMPP /d' $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function xmpp_email_headers {
|
||||
for d in /home/*/ ; do
|
||||
USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
|
||||
if [[ $USERNAME != "git" && $USERNAME != "mirrors" && $USERNAME != "sync" ]]; then
|
||||
if [ -f /home/$USERNAME/.muttrc ]; then
|
||||
if ! grep -q "Jabber-ID" /home/$USERNAME/.muttrc; then
|
||||
echo "my_hdr Jabber-ID: ${USERNAME}@${HOSTNAME}" >> /home/$USERNAME/.muttrc
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function install_xmpp_main {
|
||||
update_prosody_modules
|
||||
|
||||
|
@ -398,6 +411,7 @@ function install_xmpp_main {
|
|||
|
||||
function_check configure_firewall_for_xmpp
|
||||
configure_firewall_for_xmpp
|
||||
xmpp_email_headers
|
||||
|
||||
echo 'install_xmpp_main' >> $COMPLETION_FILE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue