1832085 Members
3027 Online
110037 Solutions
New Discussion

Re: Mail history

 
SOLVED
Go to solution
peterchu
Super Advisor

Mail history

We use the RH and send the mail through the sendmail service , I want to check the mail log , where can I find the send mail log to check the mail history ? thx.
9 REPLIES 9
Alexander Chuzhoy
Honored Contributor
Solution

Re: Mail history

it's /var/log/maillog

while by default each user gets mail
to /var/mail/username
peterchu
Super Advisor

Re: Mail history

thx alex , is there other files because I check it already ? thx.
Alexander Chuzhoy
Honored Contributor

Re: Mail history

What exactly do you want to check/audit ?
Steven E. Protter
Exalted Contributor

Re: Mail history

Unless you've changed logging all mail activity should go through /var/log/maillog

service sendmail status

Is it running?

When I monitor mail traffic I use this command.

tail -f /var/log/maillog , gives you the real time look.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
peterchu
Super Advisor

Re: Mail history

yes , it /var/log/maillog is ok , i found my mail , but the history i want to check is long time ago so I didn't find it at this log , so I ask whether any other log in the system ? thx.
Mark Grant
Honored Contributor

Re: Mail history

This will depend on the distribution. For example, On re-boot my mail log is moved to "maillog.X" with X being a number. A new maillog starts being written to.

If you don't have any other maillog type files in /var/log then I'm afraid you're going to have to restore them from backup. You DO have a backup don't you?
Never preceed any demonstration with anything more predictive than "watch this"
Paul Cross_1
Respected Contributor

Re: Mail history

look at your /etc/syslog.conf file. Redhat defaults to /var/log/maillog, but of course you can change it and put it anywhere you like.

from the /etc/syslog.conf file on redhat 7.3:

# Log all the mail messages in one place.
mail.* /var/log/maillog

Vernon Brown_4
Trusted Contributor

Re: Mail history

The default log-rotate saves about 4 weeks of maillog files. They will be maillog.1, maillog.2 maillog.3, and maillog.4.

All in /var/log/

Vern
Vitaly Karasik_1
Honored Contributor

Re: Mail history

well, with RHL out-of-the-box you will see logs for the last month.

you can save logs for months/years if you have enough disk space, just edit

/etc/logrotate.conf

and/or

/etc/logrotate.d/service_name