[Postfix] Create ham/spam mailboxes @ localhost
parent
76c747041d
commit
63ce1ba2d6
|
@ -3,10 +3,12 @@
|
||||||
trap "postfix stop" EXIT
|
trap "postfix stop" EXIT
|
||||||
|
|
||||||
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
|
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
|
||||||
if [[ -z $(grep null /etc/aliases) ]]; then
|
|
||||||
echo null: /dev/null >> /etc/aliases;
|
cat /dev/null > /etc/aliases;
|
||||||
newaliases;
|
echo "null: /dev/null" >> /etc/aliases;
|
||||||
fi
|
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
|
cat <<EOF > /opt/postfix/conf/sql/mysql_relay_recipient_maps.cf
|
||||||
user = ${DBUSER}
|
user = ${DBUSER}
|
||||||
|
|
Loading…
Reference in New Issue