#
# slow: do slow checks, like spamassassin
#
# for non-interactive, dont print unless something went
# wrong
#
# slow: do slow checks, like spamassassin
#
# for non-interactive, dont print unless something went
# wrong
getspamdpid() {
if [[ ! $spamdpid || ! -d /proc/$spamdpid ]]; then
# try twice in case we are restarting, it happens.
getspamdpid() {
if [[ ! $spamdpid || ! -d /proc/$spamdpid ]]; then
# try twice in case we are restarting, it happens.
# TODO, get je to deliver the local mailbox: /m/md/INBOX
# dovecot appears to setup, i can t be sure.
# TODO, get je to deliver the local mailbox: /m/md/INBOX
# dovecot appears to setup, i can t be sure.
- froms=(testignore@je.b8.nz testignore@expertpathologyreview.com testignore@amnimal.ninja ian@iankelling.org z@zroe.org)
+ # save some cpu cycles
+ froms=(testignore@je.b8.nz ian@iankelling.org)
+ if (( maini % 10 == 0 )); then
+ froms=(testignore@je.b8.nz testignore@expertpathologyreview.com testignore@amnimal.ninja ian@iankelling.org z@zroe.org)
+ fi
if ! $int; then
### begin rsyncing fencepost email ###
# We dont want to exit if rsync fails, that will get caught by
if ! $int; then
### begin rsyncing fencepost email ###
# We dont want to exit if rsync fails, that will get caught by
# example line that sed is parsing:
# (-0.1 / 5.0 requ) DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,SPF_HELO_PASS=-0.001,SPF_PASS=-0.001,TVD_SPACE_RATIO=0.001 autolearn=_AUTOLEARN
resultfile=$(mktemp)
# example line that sed is parsing:
# (-0.1 / 5.0 requ) DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,SPF_HELO_PASS=-0.001,SPF_PASS=-0.001,TVD_SPACE_RATIO=0.001 autolearn=_AUTOLEARN
resultfile=$(mktemp)
# note: on some mail, its 1 line after the send-test-forward, on others its 2 with a blank inbetween.
# I use the sed -n to filter this.
raw_results="$(tail $resultfile | grep -A2 -Fx /usr/local/bin/send-test-forward | tail -n+2 | sed -nr 's/^\([^)]*\) *//;s/=[^, ]*([, ]|$)/ /gp')"
for r in $raw_results; do
case $r in
# note: on some mail, its 1 line after the send-test-forward, on others its 2 with a blank inbetween.
# I use the sed -n to filter this.
raw_results="$(tail $resultfile | grep -A2 -Fx /usr/local/bin/send-test-forward | tail -n+2 | sed -nr 's/^\([^)]*\) *//;s/=[^, ]*([, ]|$)/ /gp')"
for r in $raw_results; do
case $r in
# got this in an update 2022-01. dun care
T_SCC_BODY_TEXT_LINE|SCC_BODY_SINGLE_WORD) : ;;
# we have a new domain, ignore this.
# got this in an update 2022-01. dun care
T_SCC_BODY_TEXT_LINE|SCC_BODY_SINGLE_WORD) : ;;
# we have a new domain, ignore this.
if $doprom && [[ -e $dir ]]; then
for l in "${p_unexpected_spamd_results[@]}"; do
printf "%s\n" "$l" >>$path
if $doprom && [[ -e $dir ]]; then
for l in "${p_unexpected_spamd_results[@]}"; do
printf "%s\n" "$l" >>$path