My server sends out emails via sendmail
or SMTP
, depending on the situation. I am trying to find logs for SMTP. Sources indicate that I should look at
/var/log/maillog
(https://serverfault.com/questions/59602/where-to-check-log-of-sendmail,
https://www.centos.org/forums/viewtopic.php?t=8700)
That does indeed contain logs of everything sent over sendmail
, but the SMTP messages are conspicuously absent.
When sendmail is used, it is done in a php
script which just drops to shell and pipes message content to sendmail
. Unfortunately, the SMTP
is handled using a php
class wrapper, which might account for the discrepency in logging.
Might they be being logged somewhere else? How can I determine that? Might logging for SMTP be turned off? How can I determine that, and if so turn logging on?
Using Centos 6.6 Final
/var/log/maillog
. SMTP logs were never expected to store the actual contents of each email sent out ; is that what you're trying to get?sendmail
logs just shows the addressees, and a timestamp of when it was sent. I am using it to determine if the system sent something.SMTP
messages I know have been sent do not show up there at all.SMTP
messages, as distinct tosendmail
messages? You mean messages that some process directly sends out using a connection to another SMTP server on the network? Then that application should log this, your system doesn't log all outgoing network connections including layer 7 data...