Discussion:
[PERDITION-USERS] help with perdition - pbs
Rejaine Monteiro
2017-07-28 21:09:18 UTC
Permalink
Hi, thank you for replying quickly!

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.
Use of uninitialized value $ipaddr in concatenation (.) or string at
./pop-before-smtp line 435.
Use of uninitialized value $ipaddr in exists at ./pop-before-smtp line 436.
Use of uninitialized value $ipaddr in hash element at ./pop-before-smtp
line 456.
Use of uninitialized value $ipaddr in concatenation (.) or string at
./pop-before-smtp line 457.
Use of uninitialized value $ip in hash element at ./pop-before-smtp line
561.
Use of uninitialized value $ipaddr in concatenation (.) or string at
./pop-before-smtp line 467.
Use of uninitialized value $ipaddr in hash element at ./pop-before-smtp
line 474.

etc...

However, the log file is now showing some new information that did not
appear before

Jul 28 18:01:10 starting up (v1.42)
Jul 28 18:01:10 Using 3 values for pre-authorized networks:
`127.0.0.0/8', `10.10.24.0/23', `10.10.32.0/22'
Jul 28 18:01:10 startup log-scan complete
Jul 28 18:01:10 found ip= (0)
Jul 28 18:01:10 setting expiration time for ip= to 1501198200
Jul 28 18:01:10 added to DB
Jul 28 18:01:10 removed from DB
Jul 28 18:01:10 found ip= (0)
Jul 28 18:01:10 setting expiration time for ip= to 1501198200
Jul 28 18:01:10 added to DB
Jul 28 18:01:10 removed from DB
Jul 28 18:01:10 found ip= (0)
Jul 28 18:01:10 setting expiration time for ip= to 1501198200
Jul 28 18:01:10 added to DB
Jul 28 18:01:10 removed from DB
Jul 28 18:01:10 found ip= (0)
Jul 28 18:01:10 setting expiration time for ip= to 1501198200
Jul 28 18:01:10 added to DB
Jul 28 18:01:10 removed from DB
Jul 28 18:01:10 found ip= (0)
Jul 28 18:01:10 setting expiration time for ip= to 1501198200
Jul 28 18:01:10 added to DB

I'm not using any other function... only write to cdb file:
$dbfile = '/var/qmail/tcpcontrol/pop-before-smtp';

But the file does not appear to be populated after a successful login.

# cat /var/qmail//tcpcontrol/pop-before-smtp.db
$&w�эh^mailserver1:/var/log #
$logtime_pat = '(\w\w\w\w-\d\-\dT+d:\d+\:\d+\.\d\.\w\w\w\w\w\w\-d\:\d)';
I'm not sure I understand all components, but the RegEx for logtime has
several flaws.
(\d+-\d+-\d+T\d+:\d+\:\d+\.\d+-\d+\:\d+)
\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\"
Hope this helps
Matthias
______________________________________________
Perdition-users mailing list
https://lists.vergenet.net/listinfo/perdition-users
--
Rejaine da Silveira Monteiro
Suporte - Tecnologia Digital
Tel: (31) 2102-8854
Jamef Encomendas Urgentes - Matriz - Belo Horizonte/MG
www.jamef.com.br
Matthias Hunstock
2017-07-28 21:18:46 UTC
Permalink
Post by Rejaine Monteiro
I am testing with these values that you passed and now there are some
:# ./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
Rejaine Monteiro
2017-07-31 14:13:47 UTC
Permalink
t seems it worked now after some regex adjustments.

Now I have to see how I will do with what qmail works with this file
(any tips)?

In fact, this is not an ideal solution (I previously used the
qmail-smtp-auth patch, but I could not make the patch work on newer o.s
64bit) that qmail gateway is an older installation that I'm having to
do a forced upgrade, since old hardware is having problems - but I will
not bother to study or implement other solution as we will migrate to a
cloud service solution (google apps, office 365 or something like that),
so this server is only temporary A survival of some 5 to 6 months only)
Post by Matthias Hunstock
Post by Rejaine Monteiro
I am testing with these values that you passed and now there are some
:# ./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.
(\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\"
(\d+\.\d+\.\d+\.\d+):.*status=\"ok\"
(of course adding the LOGTIME thing, removed that for testing locally)
HTH
Matthias
______________________________________________
Perdition-users mailing list
https://lists.vergenet.net/listinfo/perdition-users
--
Rejaine da Silveira Monteiro
Suporte - Tecnologia Digital
Tel: (31) 2102-8854
Jamef Encomendas Urgentes - Matriz - Belo Horizonte/MG
www.jamef.com.br
Alexander Dalloz
2017-07-28 21:14:33 UTC
Permalink
Hi,
I'm trying to configure the perdition-pbs (pop before smtp) to use with
Seriously? pop-before-smtp is some workaround from nearly 30 years ago.
Submission by ESMTP exits for such a long time. Don't live in the past
and force your users to use such a crappy solution.

Alexander

Loading...