[Postfix] Create ham/spam mailboxes @ localhost
parent
76c747041d
commit
63ce1ba2d6
|
@ -3,10 +3,12 @@
|
|||
trap "postfix stop" EXIT
|
||||
|
||||
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
|
||||
if [[ -z $(grep null /etc/aliases) ]]; then
|
||||
echo null: /dev/null >> /etc/aliases;
|
||||
newaliases;
|
||||
fi
|
||||
|
||||
cat /dev/null > /etc/aliases;
|
||||
echo "null: /dev/null" >> /etc/aliases;
|
||||
echo "ham: '|/usr/bin/curl -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/learnham'" >> /etc/aliases;
|
||||
echo "spam: '|/usr/bin/curl -s --data-binary @- --unix-socket /rspamd-sock/rspamd.sock http://rspamd/learnspam'" >> /etc/aliases;
|
||||
newaliases;
|
||||
|
||||
cat <<EOF > /opt/postfix/conf/sql/mysql_relay_recipient_maps.cf
|
||||
user = ${DBUSER}
|
||||
|
|
Loading…
Reference in New Issue