SMTP Logs

Questions and answers about how to do stuff
Post Reply
fauxfrogbelly
Posts: 3
Joined: 27 Mar 2020 15:38

SMTP Logs

Post by fauxfrogbelly » 08 Aug 2020 23:13

Hi All,

I'm using EFA as an outbound relay (no inbound mail at all), and thus far in testing, it's working like a champ. Before I move to prod, however, I'd like to know how to view SMTP logs. Can this be done in the web interface (either EFA or Webmin)? Do I need to enable them in Postfix?

There was an old thread with a similar need a few years back, but I didn't know if I had missed a solution since then.

If there's nothing built in for easy view and search, have any of you implemented an alternative?

fauxfrogbelly
Posts: 3
Joined: 27 Mar 2020 15:38

Re: SMTP Logs

Post by fauxfrogbelly » 08 Aug 2020 23:35

Okay, I think I found a way using Webmin. Viewing the maillog file via System | System Logs seems to do the trick.

User avatar
pdwalker
Posts: 1320
Joined: 18 Mar 2015 09:16

Re: SMTP Logs

Post by pdwalker » 24 Aug 2020 11:08

That may be the easiest way if you don't know how to log into the shell and use the 'less' command.

elfranko
Posts: 16
Joined: 03 Sep 2018 08:03

Re: SMTP Logs

Post by elfranko » 13 Sep 2020 09:41

Download Putty, or your go to SSH tool.
Log in (If you get to the menu press 1 for shell)
the logs are in /var/log
I use

Code: Select all

tail -f -n 300/var/log/maillog | grep "email@example.com"
-f keeps the log rolling.
-n 300 also loads the last x number of lines.
And finally within the quotes is what i am looking for whether that be a host, domain, user, or part of the log i am expecting to see.

Hope this helps

Frank

Post Reply