[prev in list] [next in list] [prev in thread] [next in thread] 

List:       popbsmtp-users
Subject:    Re: POP before SMTP with Qpopper with TLSv1/SSLv3 enabled regexp
From:       Wayne Davison <wayned () users ! sourceforge ! net>
Date:       2005-11-20 17:08:21
Message-ID: 20051120170821.GA1303 () dot ! blorf ! net
[Download RAW message or body]

On Sat, Nov 19, 2005 at 02:58:36PM -0600, Juha Vehnia wrote:
> $pat = '^(... .. ..:..:..) \S+.popper\[\d+\]:.\([^)]*\) TLSv1/SSLv3
> handshake with client at [a-zA-Z0-9-.]+ \((\d+.\d+.\d+.\d+)\); new
> session-id;';

Does that log line indicate a successful login?  The wording make me
think that it might be returned for anyone who starts a TLS/SSL
connection.  You can test this by using a wrong password with your
email client and seeing what messages get logged.  If the IP info is
output on a separate line from the login confirmation, I can help you
use the multi-line matching support to handle that if you send some
log lines that show what needs to be matched.

You also appear to have used '.' to match a space in two places in the
pattern.  If so, I would change them to be literal spaces:

$pat = '^(... .. ..:..:..) \S+ popper\[\d+\]: \([^)]*\) TLSv1/SSLv3 [...]

> I bit more documentation how backreferences are handled would have
> been nice.

Yeah, a comment mentioning that the first parenthetical value needs to
return the date+time and the second needs to return the IP address would
probably be a good addition.

..wayne..


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
popbsmtp-users mailing list
popbsmtp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/popbsmtp-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic