insert a :.*: between the [ and the (
colon-period-asterisk-colon (no spaces)
should fix that up somewhat.
ip=\[:.*:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\]
forgive me, my grep doesnt support \d to mean digit [0-9] means the same
thing.
this will give you the ipv4 ip address and strip off the ipv6 stuff at the
front.
maybe it helps,
blake
----- Original Message -----
From: "jason" <jas...@brainpuppy.com>
To: <cour...@lists.sourceforge.net>
Sent: Friday, January 18, 2002 1:36 PM
Subject: [courier-users] pop-before-smtp regex trouble
Hi Everyone,
I'm using Bennet Todd's pop-before-smtp with postfix and I think theres
a problem with the regex expression thats used to grab ip address and
time for courier..but I'm not sure. I'm using courier as the pop3
server. Is anyone out there using courier with pop-before-smtp that
could help me out? Sorry about posting this question here..but the
pop-before-smtp mailing list seems to be down. Thanks.
example for maillog...
Jan 18 12:49:44 Server1 pop3d: LOGIN, user=us...@somedomain.com,
ip=[::ffff:99.999.999.999]
line from pop-before-smtp..
my $pat = '^(... .. ..:..:..) \S+ pop3d: ' .
'LOGIN, user=\S+, ip=\[(\d+\.\d+\.\d+\.\d+)\]$';