#remove unwanted mail messages in queue
cd /var/spool/mqueue
rm $(grep -l "Subject: free information" *)
rm $(grep -l "baddomain" *)
# doesn't really work
for i in $(mailq |awk '/baddomain/ {print $1}' )
do
echo $i
rm *${i}*
done
#remove old mailq files
cd /var/spool/mqueue
for i in $(ls df*)
do
echo $i
if [[ -z $(mailq | grep $(echo $i | cut -c3-)) ]]
then
echo "...removing $i"
#rm *${i}
fi
done
sendmail
mconnect host
telnet host 25
setup domainname for mailserver
use check-hostname script to see resolve method
#show aliases for username
/usr/lib/sendmail -bv -v username
#get version of sendmail and hostname resolution
echo '$=m' | /usr/lib/sendmail -bt -d0.1
#get version of sendmail and hostname resolution
/usr/lib/sendmail -bt -d0.1 < /dev/null
#watch the rulesets resolve user at node
/usr/lib/sendmail -bt
> 3,0 root@node
/usr/lib/sendmail -bi -d44.4
#watch the rulesets resolve user at node
/usr/lib/sendmail -bt 21.6
or link: http://computeranddata.com/doc/notes/sendmail.faq
> 3,0 root@node
www.studyall.co.cc
Post a Comment
Post a Comment