Mail from email@example.com thru relay=localhost.localdomain[22.214.171.124]
I am having a hard time understanding these lines in my maillog file and I'm hoping someone can help me.
Jan 31 07:37:49 srv1 postfix/qmgr: 783BFDA125: from=<firstname.lastname@example.org>, size=10851, nrcpt=1 (queue active)
Jan 31 07:37:49 srv1 postfix/smtp: 783BFDA125: to=<email@example.com>, relay=localhost.localdomain[126.96.36.199]:25, delay=12932, delays=12932/0.03/0.15/0, dsn=4.4.2, status=deferred (lost connection with localhost.localdomain[188.8.131.52] while receiving the initial server greeting)
At first glance, a root process on my system is trying to email root on my system, but relaying the email through 184.108.40.206.
These lines appears about every 20 minutes in my log file.
Here are my questions...
1) Is this mail originating on my system, or is this a spammer trying to send mail from my system and claiming to be "firstname.lastname@example.org" at the SMTP interface?
2) If it is from my system, how do I determine which process is sending email as root (and why)?
3) What does the "localhost.localdomain[220.127.116.11]" mean? Is root a process on my system trying to email root on 18.104.22.168? Why would this occur?
I'm new to Linux as an administrator, and I setup my mail server about a week ago using HOWTO documents I found on line.
My setup is...
Fedora10, Postfix, Dovecot, Squirrelmail, ClamAV, Amavisd-new, Spamassassin
If you need more info, please let me know and I'll post it.
That's rather strange.
The first thing I would look at is if you have any cron jobs running. As root, you can run
You can also check under /var/spool/cron (might be slightly different across different distributions) to see the cron information for all users.
Next, check your DNS settings. Do you have any odd entries in /etc/hosts ? Does /etc/resolve.conf look correct?
Hope that helps.
I think this problem is solved.
Thanks for the suggestions Joe. I didn't have any cron jobs, but the problem was in my /etc/hosts file.
Here are the details in case it helps someone looking at the same problem...
The problem was that the LogWatch application was periodically sending an email message to "root "(without any @domain) and my /etc/hosts files was incorrect. This was causing my server to send the LogWatch report out over the internet as an email to "email@example.com". My ISP relay (the mysterious 22.214.171.124 IP address) does not like receiving messages to "firstname.lastname@example.org" so it deferred the email.
These LogWatch emails were piling up in my "deferred" queue and postfix (SMTP server) would retry them occasionally -- and they would be deferred again. I could not see the IP 126.96.36.199 in my /var/log/message file because I do not log IP packets with state=established/related. The response from 188.8.131.52 was always state=established because my machine originated the transaction.
Here are some suggestions for others looking at a similar problem...
1) Check the mail queues. I use postfix for my SMTP server and the command "qshape deferred" will show you the number of email in the deferred queue (or any other queue).
2) I used "vim" to examine the emails that were in the deferred queue. The deferred email files were in the directories under "/var/spool/postfix/deferred". That's how I discovered that they were LogWatch reports. There is probably a better way to examine the contents of these emails in the deferred queue, but I don't know what it is.
3) When I examined the LogWatch config file, I saw that it was sending to "root", so I manually sent a report using the command "logwatch --mailto root" and I could see the error occur in the logs. If I typed "logwatch --mailto email@example.com", then the error did not occur.
4) I poked around on the net under /etc/hosts and discovered that my file was incorrect. More specifically, I had my host machine names on the 127.0.0.1 line instead of on a subsquent line with the correct LAN IP addres.
5) I used the command "postsuper -d ALL deferred" to delete all the emailed in the deferred queue.
I still have a question...
How does LogWatch periodically send reports? I could not find a cron job for it and it doesn't appear to be a service. (I had not even heard of the LogWatch application until I discovered it in the deferred email.)
|All times are GMT -5. The time now is 04:22 AM.|