postfix delete email by subject

postfix delete email by subject

postfix
postfix

To list From, To and Subject from all safematix.com emails

mailq | awk '/ Sep .*safematix.com/{ print $1 }' | tr -d \* | while read id; do postcat -q "$id" | egrep '^(Subject|From|To):'; echo; done

To delete all emails from safematix.com, with subject tbd

mailq | awk '/ Sep .*safematix.com/{ print $1 }' | tr -d \* | while read id; do postcat -q "$id" | grep "^Subject: tbd" > /dev/null && echo $id; done | postsuper -d - 

ntpd and OpenNTPD status

ntpd and OpenNTPD status

ntpd

ntpq -p
ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ts1.safematix.com 192.168.0.1    2 u   19   64  377    0.572   -0.064   0.173
+ts2.safematix.com 192.168.0.2    3 u   28   64  377    0.406    0.021   0.298

OpenNTPD

Since OpenBSD 5.5, you have the tool ntpctl

ntpctl -s all
ntpctl -s all
4/4 peers valid, clock unsynced

peer
   wt tl st  next  poll          offset       delay      jitter
82.197.188.130 from pool ch.pool.ntp.org 
    1 10  2   29s   32s         0.268ms     8.530ms     1.015ms
212.51.144.44 from pool ch.pool.ntp.org 
    1 10  1   31s   33s         0.075ms     9.118ms     0.575ms
91.235.212.22 from pool ch.pool.ntp.org 
    1 10  2    1s   32s        -0.835ms     9.015ms     0.791ms
91.240.0.5 from pool ch.pool.ntp.org 
    1 10  3    5s   32s         0.459ms     9.860ms     1.492ms

rsync not older

rsync not older

Copy all data are not older than 23 days.

Version 01 – from file path

find /var/log/nginx -mtime -23 -printf %P\\0 | rsync -av --files-from=- --from0 /var/log/nginx/ safematix@172.23.0.23:/srv/safematix/

Version 02 – full path

find /var/log/nginx -mtime -23 -print0 | rsync -av --files-from=- --from0 / safematix@172.23.0.23:/srv/safematix/