Checking Logs on Sendmail Server

I have a RedHat Sendmail server relay internet facing then relays email to our Exchange server.  I don't have any fluency in the sendmail server, and only have access to command line.  I'm trying to troubleshoot a sender getting bounce backs 4.4.1 errors - but I don't see these messages even reaching the Exchange server, so I'm leaning towards the relay server.  I'm not sure of the configuration of it, and would like to review it see if there are any logs that show denys or drops of incoming mail - is this possible? If so, what commands do I enter to view this log? I'm not familiar with any Redhat/Linux command line, so I would need step by step.
LVL 1
fireguy1125Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fireguy1125Author Commented:
Also to add, we have 2 MX records, our Primary faces our Edge/TMG Exchange servers, and secondary is reaching the secondary MX record - this is where the bounce back is coming from - which begs the question, why the e-mail is not attempting to arrive at the primary mx record mail server.  We've added the sender domains to all whitelists and checked logs but dont see any record of the email reaching Exchange.
0
slubekCommented:
sendmail logs its activity via syslogd daemon. It was configured in /etc/syslog.conf in older Redhats, but in new CentOS configuration goes to /etc/rsyslog.conf. Find that file, open it and find line starting with "mail.*" - in that line you'll find name of log file.
Default mail log location is /var/log/maillog. Open the shell (place where you can execute commands) and if you want to see what is already in log, do (as a root):
less /var/log/maillog

Open in new window

If you want to see messages incoming to log, do:
tail -f /var/log/maillog

Open in new window

0
fireguy1125Author Commented:
Ok, thanks, how can I get the less /var/log/maillog command somehow exported to review the logs, preferably in a csv format so I can view it in excel?  I'm viewing it in vmware console.
0
slubekCommented:
less and tail are the programs which show you content of /var/log/maillog. You need to copy (and import into Excel) /var/log/maillog - you can import it as text file with fixed width columns (date, time, machine name and text). But when syslog is working, you should copy that file into other directory first:
cp /var/log/maillog ~/maillog

Open in new window

It will create file maillog in you Linux home directory.
How to copy it to Windows machine? It depends on your configuration. It can be copied via ftp, http, SMB, etc. If you don't know how to use these protocols, use WinSCP.
I don't know VMware well, but maybe you can mount some directory from host system into virtual machine.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SandyCommented:
To use in lay man language install sawmill on your windows pc and import logs in that. It is really easy to understand those logs then.

;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.