2

We have sendmail servers behind an F5 load balancer. The load balancer is constantly opening/closing a connection to each mail server to see if it is answering. This means our syslog files are overflowing with lines like:

Sep 19 11:13:29 mailserver-X sm-mta[12643]: w8JGDTmi012643: lb5a [10.11.12.13] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

Sep 19 11:13:29 mailserver-X sm-mta[12819]: w8JGDSLk0012819: lb5b [10.11.12.14] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

Is there a way to make sendmail just quietly ignore these?

Currently running sendmail-8.14.5 but would update if needed to fix this issue.

1

Load balancers usually have fairly minimal scripted protocol tests, just enough to confirm probable correct operation, but frequently omit protocol niceties, or don't perform any useful operation, which is what sendmail is complaining about. The SMTP default is to just send HELO then QUIT (checking the response codes for each).

This is a LogLevel > 5 message, the default is LogLevel 9, so you could either recreate your .cf after adding to the .mc:

define(`confLOG_level',`5')

or temporarily override it by adding -O LogLevel=5 on the sendmail command line. The downside being many other (~140) messages over levels 6-9 will also be suppressed.

There is only one documented scenario where that specific message is suppressed — when a connection is going to be rejected anyway via configuration (access map or TCP wrappers). However every scenario I can think of involves logging a rejection error instead... (and worse, some may return an error to the HELO greeting which would cause the F5 to mark the service down).

There is no configurable item in the standard SMTP_monitor, but as a workaround you could set up an alternate SMTP monitor script, this example on F5's devcentral (registration required to view source) shows how it's done using Expect:

https://devcentral.f5.com/codeshare/smtp-scripted-monitor

That example sends an email on each probe which you almost certainly don't want ;-) Instead try something like this:

expect "220"                 ;# must wait for SMTP banner 
send "HELO mydomain.com\r\n" ;# EHLO is better
expect "250"
send "VRFY postmaster\r\n"   ;# some non-NOP command
expect "250"
send "QUIT\r\n"              ;# clean exit
expect "221"

and adjust as required. If your sendmail is fussy (PrivacyOptions might block VRFY/EXPN/ETRN) then either amend the expected code, or use MAIL then RSET:

 ....
 send "MAIL from:<postmaster@domain.com>\r\n"  
 expect "250"
 send "RSET\r\n"
 expect "250"
 send "QUIT\r\n"
 expect "221"
  • Thanks I will see if I can get the network people to install a better script. – John Hascall Oct 23 '18 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.