Over the last few years I've been keeping track of the courier-imap and
courier-pop3 patterns needed for both IPv4 and IPv6.
Here is the result (currently in live use for our mailservers which
receive both v4 and v6 and v4-mapped traffic)
$pat = '^[LOGTIME] (?:\[|\S+
)(?:courierpop3|courierimap|couriertcp|pop3|imap)(?:d|d-ssl|login)\]?: ' .
'LOGIN, user=\S+, ip=\[[:f]*((?:(?:\d+\.\d+\.\d+\.\d+)|[:a-f0-9]+))\]';
$out_pat = '^[LOGTIME] (?:\[|\S+
)(?:courierpop3|courierimap|couriertcp|pop3|imap)(?:d|d-ssl|login)\]?: '
. '(?:LOGOUT|DISCONNECTED), user=\S+,
ip=\[[:f]*((?:(?:\d+\.\d+\.\d+\.\d+)|[:a-f0-9]+))\]';
Note the IPv4 pattern excludes [:f]* from the brackets. This allows only
the real IPv4 portion to be stored in the hosts.db so the mailserver can
use it without needing special code to strip "::ffff:" garbage.
Also worth noting that courier-imap is now configured on Debian Squeeze
with a LOGGEROPTS="-name=imapd" option by default. This makes the nam
pattern 'imap' again. But opens the gap for people to use some really
weird names which the patterns can't provide for by default.
AYJ
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org