mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:26:19 +00:00
Restrict monitoring to maillog.debug
This commit is contained in:
parent
3694e80a70
commit
c6f664d254
2 changed files with 3 additions and 3 deletions
|
|
@ -43,4 +43,4 @@ postfix reload &&
|
||||||
echo -e "\n\e[1;32mMail service is ready\e[0m\n"
|
echo -e "\n\e[1;32mMail service is ready\e[0m\n"
|
||||||
|
|
||||||
# Monitor log
|
# Monitor log
|
||||||
tail -f /var/log/mail/maillog{,.{0..9}} /var/log/mail/maillog.debug{,.{0..9}}
|
tail -f /var/log/mail/maillog.debug{,.{0..9}} # /var/log/mail/maillog{,.{0..9}}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
# Notify if rejected emails were found
|
# Notify if rejected emails were found
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
bash -c 'tail -n +0 --pid=$$ -f /var/log/mail/maillog* | grep --line-buffered -F -v -f /var/log/mail/reject.log | { sed "/NOQUEUE: reject/q" && kill $$ ;}'
|
bash -c 'tail -n +0 --pid=$$ -f /var/log/mail/maillog.debug* | grep --line-buffered -F -v -f /var/log/mail/reject.log | { sed "/NOQUEUE: reject/q" && kill $$ ;}'
|
||||||
grep -h "NOQUEUE: reject" /var/log/mail/maillog* | grep -F -v -f /var/log/mail/reject.log >>/var/log/mail/reject.log
|
grep -h "NOQUEUE: reject" /var/log/mail/maillog.debug* | grep -F -v -f /var/log/mail/reject.log >>/var/log/mail/reject.log
|
||||||
cat <<- mail | sendmail reject@${MYVEMAIL_DOMAIN}
|
cat <<- mail | sendmail reject@${MYVEMAIL_DOMAIN}
|
||||||
From: reject@${MYVEMAIL_DOMAIN}
|
From: reject@${MYVEMAIL_DOMAIN}
|
||||||
To: reject@${MYVEMAIL_DOMAIN}
|
To: reject@${MYVEMAIL_DOMAIN}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue