説明†postfixでなぜか何故か半年前とかの古いキューメールが残る場合があります。 シェルスクリプト†#!/bin/bash export LANG=c DATE01=`date +%b '--date=1 months ago'` LIST01=`mailq | grep ${DATE01} | awk '{print $1}' | sed "s/\!//g"` if [ -n "${LIST01}" ];then echo "not null" for inlist in ${LIST01} do postsuper -d ${inlist} done else echo "null" exit; fi |