Thanks for you feedbacks dude. I'm sorry to say that i'm unable to fit the code into the script. I'm novice to perl. Here's the full script:
I've another dovecot log file which also logs login info. If the script extract rip from this log that's also fine:
2011-05-15 16:10:10 pop3-login: Info: Login: user=<test@example.com>,
+method=PLAIN, rip=180.234.57.184, lip=166.165.52.15
2011-05-15 16:10:11 POP3(test@example.com): Info: Disconnected: Logged
+ out top=0/0, retr=0/0, del=0/0, size=0
2011-05-15 16:10:14 pop3-login: Info: Login: user=<test@example.com>,
+method=PLAIN, rip=180.234.57.184, lip=166.165.52.15
2011-05-15 16:10:15 POP3(test@example.com): Info: Disconnected: Logged
+ out top=0/0, retr=0/0, del=0/0, size=0
2011-05-15 16:10:17 pop3-login: Info: Login: user=<test@example.com>,
+method=PLAIN, rip=180.234.57.184, lip=166.165.52.15
2011-05-15 16:10:18 POP3(test@example.com): Info: Disconnected: Logged
+ out top=0/0, retr=0/0, del=0/0, size=0
|