|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mail server logs, where are they?
Hello,
My business partner and I have developed a successful email program that allows us to send html or text emails (like newsletters) to our clients and then track the results. When a client of ours asked us if we had an email program for them we happily installed the one we had been using. Well, unfortunately, they sent their first email to 85 of the vendors they do business with and one vendor came back fuming because he received the email many, many times. So, two things: 1. Is there any reason why one recipient would get the email multiple times and the other recipients did not? Could their incoming mail server receive or our outgoing mail server send this email multiple times? 2. Could someone tell me how I can take a look at the email logs? We are on a Redhat server. Thanks in advance, Piet
__________________
![]() - Please help us build our Hewlett Packard community - Check us out, or tell someone who might find us useful |
|
#2
|
|||
|
|||
|
Assuming you are using the default RH9 config; the MTA is SendMail, and the default log location is /var/log/maillog
As the logs are rotated, they will append .1 .2 .3, etc.. Again this assumes default behavior |
|
#3
|
|||
|
|||
|
cbchev68,
Thanks for the quick reply. Can I just view these in the vi editor? Is there an easier program to view the logs in? And, is there a way to view logs just for a specific domain? Thanks again, Piet |
|
#4
|
|||
|
|||
|
It is just a raw text log.. You can use any text editor you like.
Generally when I need to parse a log like that, I use grep, and pipe the output to a new file.. grep {pattern} {file} >newfile Lets say I was looking for log entries related to sending to test.com, I would do something like grep test.com /var/log/maillog >results then you can look at the file that was created called 'results', it will have all the lines that matched test.com |
|
#5
|
|||
|
|||
|
cbchev68,
You have been a good help. If you have a chance I have a couple more questions: 1. Is there anyway a mailserver can keep on sending the same email? Our program shows that our emails are done being sent but some of the recipeints are still getting multiple copies, can you think of any reason for this? 2. I tried to do a grep as you suggested but it was not specific enough. What if I want to get any emails sent from a specific domain between this date and that date, like from somone@test.com between June 3 to June 7. 3. Finally, how do I know which maillog file to look in? I did my grep statement to maillog.1 but it started looking at emails dated back to the beginning of May and it took a very long time to parse through those. Anymore info would be great. Piet |
|
#6
|
|||
|
|||
|
I'll try to help as best I can (just remember I am no expert)
1. Is it possible that this could happen, yes; although unlikely.. There is always the possibility of there being some programming glitch... However I am running the same setup as you, on 3 different servers. One of which sends out approx 3500 emails a day. Never seen this happen.. I would also think you would also see duplicates in the maillog.. 2. The logs are chronological, you could just go to the area that has the date and time that you are looking for, and go to the respective area.. Or you could pipe it through grep a few times to get more specific results. i.e. grep test1.com | grep test2.com | grep date This will return lines that match test1.com AND test2.com AND date... Just remember that you have to use the format the parameters as they would appear in the maillog There may be other ways to do it, this is just how I do it. 3. Which file to look in; each file will have a time/date stamp of when it was last written to; run the commnad below to see them. ls -l /var/log Hope this helps... |
![]() |
| Viewing: Dev Shed Forums > System Administration > Mail Server Help > Mail server logs, where are they? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|