Email logs and where to find them?

I am trying to track down any logs of emails being sent using the php mail() function from the website.

I've checked the srv/log folder but there are no mail logs as suggested by looking at other forum posts.

I'm set up on Ubunto 16.10 is there anywhere else or a different location I should be seeing these? Or other log files I can access that would show script activity to show a mail was sent?

Many thanks

5 Replies

No. No mail logs under /var/log/mail.log and no mail folders either. I don't think there are any. This is why I am looking for other logs that would show system activity in the hope of recovering any mail information that may have been logged elsewhere. i.e. where the code has instigated sendmail or something.

Do you have a Mail Transfer Agent installed? If not, you need one. You haven't told us what web application you are using - investigate to see if it logs details about failed mail attempts.

Thanks for the response Vance

Unlikely that a MTA was set up as there is no documentation in the getting started resources after setting up a website that seems to walk you through it. I was trying to use php mail via a cms to send out the mails. So I'm now assume unless an MTA is set up nothing will happen or get logged?

Might be an idea if Linode added some documentation regarding sending mail from a website as most sites these days will require this functionality. So a guide with the options available and what needs to be installed would be good.

So as there is no MTA set up I am not likely to be able to recover any logs regarding php failing to send via the mail function?

Web applications almost always depend on the system's MTA to send mail. In my experience, they do not log the content of a failed attempt to send mail but might log a brief error message. However, this depends on the specific web application you are using.

Unfortunately Linode does not have a guide for a send-only mailserver configuration. I generally recommend Postfix; see this detailed walkthrough if you need more guidance setting things up.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct