@@ -126,14 +126,14 @@ describe('syslog lines', function () {
126126 context ( 'asObject' , function ( ) {
127127 syslogLines . forEach ( function ( test ) {
128128 it ( test . name , function ( ) {
129- var res = re . asObject ( test . line )
129+ const res = re . asObject ( test . line )
130130 assert . deepEqual ( res , test . obj , util . inspect ( res , { depth : null } ) )
131131 } )
132132 } )
133133 } )
134134} )
135135
136- var postfixLines = [
136+ const postfixLines = [
137137 {
138138 line : '3mPVKl0Mhjz7sXv: to=<susan.bck@example.org>, relay=mpafm.example.org[24.100.200.21]:25, conn_use=2, delay=1.2, delays=0.76/0.01/0.09/0.34, dsn=2.0.0, status=sent (250 2.0.0 t5UI2nBt018923-t5UI2nBw018923 Message accepted for delivery)' ,
139139 type : 'postfix/smtp' ,
@@ -658,6 +658,42 @@ var postfixLines = [
658658 msg : 'released from hold' ,
659659 } ,
660660 } ,
661+ {
662+ line : "Jan 6 08:39:06 mail postfix/smtpd[339505]: 93C8388C38: client=unknown[192.168.1.0]" ,
663+ type : 'syslog' ,
664+ desc : 'postfix/smtpd' ,
665+ obj : {
666+ "date" : "Jan 6 08:39:06" ,
667+ "host" : "mail" ,
668+ "msg" : "93C8388C38: client=unknown[192.168.1.0]" ,
669+ "pid" : "339505" ,
670+ "prog" : "postfix/smtpd" ,
671+ } ,
672+ } ,
673+ {
674+ line : "Jan 6 08:39:06 mail postfix/smtpd[339505]: disconnect from unknown[192.168.1.0] ehlo=1 mail=1 rcpt=1 data=1 quit=1" ,
675+ type : 'syslog' ,
676+ desc : 'postfix/smtpd disconnect' ,
677+ obj : {
678+ "date" : "Jan 6 08:39:06" ,
679+ "host" : "mail" ,
680+ "msg" : "disconnect from unknown[192.168.1.0] ehlo=1 mail=1 rcpt=1 data=1 quit=1" ,
681+ "pid" : "339505" ,
682+ "prog" : "postfix/smtpd" ,
683+ } ,
684+ } ,
685+ {
686+ line : "Jan 6 08:39:49 mail postfix/smtpd[339505]: connect from localhost[127.0.0.1]" ,
687+ type : 'syslog' ,
688+ desc : 'postfix/smtpd connect' ,
689+ obj : {
690+ "date" : "Jan 6 08:39:49" ,
691+ "host" : "mail" ,
692+ "msg" : "connect from localhost[127.0.0.1]" ,
693+ "pid" : "339505" ,
694+ "prog" : "postfix/smtpd" ,
695+ } ,
696+ } ,
661697]
662698
663699describe ( 'postfix lines' , function ( ) {
0 commit comments