mailman/mailman-update_aliases.sh

26 lines
729 B
Bash
Raw Normal View History

#!/bin/bash
#
# Written by Silvan Calarco for the QiLinux and the openmamba distributions
# Copyright (c) 2003-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Released under the GNU GPL version 2 license
[ -e /usr/sbin/postfix ] && {
/usr/share/mailman/bin/genaliases -q > /etc/aliases-mailman
newaliases
exit 0
}
[ -e /var/qmail/bin/newaliases ] && {
# generate a new aliases file for qmail
cat > /etc/aliases << EOF
#
# This aliases file was automatically generated by update_aliases
# for mailman
# Please, don't add manual aliases here because they will be lost
# when this file is regenerated
#
EOF
/usr/share/mailman/bin/genaliases -q >> /etc/aliases
/var/qmail/bin/newaliases
exit 0
}
exit 0