puppetlabs/puppet — pull request #634 by stschulte (2012-04-05 21:59:29+00:00)
Title: #13645 Dont open a smtp connection if we will not sent any mail

If tagmail finds out that there are no messages that have to be sent to
anyone puppet will still open a smtp connection (if smtpserver is set)
and then closes the connection without sending any data. This can lead
to a lot of syslogmessages on your smtp server like

sendmail: puppet.example.com did not issue MAIL/EXPN/VRFY/ETRN
during connection to MTA

The fix now does not even enter the send method if there are no reports
to be sent. This does also prevent unnecessary forking if there are no
reports.