Am 28.07.2017 um 23:09 schrieb Rejaine Monteiro:
I am testing with these values that you passed and now there are some
errors running:
:# ./pop-before-smtp --config=/var/qmail/bin/pop-before-smtp-conf.pl
Use of uninitialized value $_[0] in split at
/usr/lib/perl5/vendor_perl/5.18.2/Net/Netmask.pm line 246.
I also use qmail, but do not have that script.
I guess there need to be some round parenthesis in the RegEx to mark the
spots where e.g. an IP address is located.
So change $pat to:
mailserver1 perdition\.imaps\[\d+\]: Auth:
(\d+\.\d+\.\d+\.\d+):\d+\-\>\d+\.\d+\.\d+\.\d+:\d+ client-secure=plaintext
authorisation_id=NONE authentication_id=\"\S+\" server=\"\S+\"
protocol=\S+ server-secure=plaintext status=\"ok\"
or even shorter:
mailserver1 perdition\.imaps\[\d+\]: Auth:
(\d+\.\d+\.\d+\.\d+):.*status=\"ok\"
(of course adding the LOGTIME thing, removed that for testing locally)
HTH
Matthias