Menu

#12 Using poprelayd with stunnel ( attached file )

open
nobody
None
5
2004-04-02
2004-04-02
Anonymous
No

Inside the attach file:

#!/bin/bash
#
# Then poprelaud only uses the imap and pop3 services,
this is an path to the
# servers then uses secure stunnel conection also. My
poprelayd was modifyed
# only putting the line "system("./stunneld");" inside
the last loop. Its work.
# T.Felipe Kunz
tfelipe@interbras.net
#
MESSAGES=/var/log/messages
MAILLOG=/var/log/maillog
POPRELAY=/etc/mail/poprelayd
for i in `tail -500 $MESSAGES | grep stunnel | grep
connected | egrep pop3\|map | sed s/\ \ /\ 0/g | grep
"\`date +%h\ %d\ %H:%M\`" | cut -d\ -f5,9 | sed s/\ /:/g | tr -d "stunel\]\[" | cut -d: -f1,3`
do
ID=`echo $i|cut -d: -f1`
IP=`echo $i|cut -d: -f2`
ID=`expr $ID + 1`
if [ "`tail -500 $MAILLOG | grep $ID | egrep
Session\|Logout\|Auth`" ]; then
if [ "_$1" = "_-v" ]; then
echo $IP
else
$POPRELAY -a $IP
fi
fi
done

Discussion


Log in to post a comment.