Results 1 to 1 of 1
Hi,
I've installed pop-before-smtp perl script in my mail server. I need help to configure the $pat to read the pattern of my Dovecot file. Dovecote log file is like ...
- 05-14-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 3
regex for perl
Hi,
I've installed pop-before-smtp perl script in my mail server. I need help to configure the $pat to read the pattern of my Dovecot file. Dovecote log file is like attached image, i'm not allowed to post email link here as it's my first post:
The perl script by default offer this pattern for Dovecot. But it's not working for me
Thanks for you help in advance.Code:# For Dovecot POP3/IMAP when using syslog. $pat = '^[LOGTIME] \S+ (?:dovecot: )?(?:imap|pop3)-login: ' . 'Login: .*? (?:\[|rip=)[:f]*(\d+\.\d+\.\d+\.\d+)[],]'; $out_pat = '^[LOGTIME] \S+ (?:dovecot: )?(?:imap|pop3)-login: ' . 'Disconnected.*? (?:\[|rip=)[:f]*(\d+\.\d+\.\d+\.\d+)[],]'; # For Dovecot POP3/IMAP when it does its own logging. $logtime_pat = '(\d\d\d\d-\d+-\d+ \d+:\d+:\d+)'; $pat = '^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: ' . 'Login: .+? rip=[:f]*(\d+\.\d+\.\d+\.\d+),'; $out_pat = '^dovecot: [LOGTIME] Info: (?:imap|pop3)-login: ' . 'Disconnected.*? rip=[:f]*(\d+\.\d+\.\d+\.\d+),'; # For older Dovecot POP3/IMAP when it does its own logging. $pat = '^(?:imap|pop3)-login: [LOGTIME] Info: ' . 'Login: \S+ \[[:f]*(\d+\.\d+\.\d+\.\d+)\]'; $out_pat = '^(?:imap|pop3)-login: [LOGTIME] Info: ' . 'Disconnected.*? \[[:f]*(\d+\.\d+\.\d+\.\d+)\]';


Reply With Quote