Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Gert on September 13, 2007, 09:25:36 AM
-
Hi
Is there a way i can see if the server received an email from a specific email address on a specific date. (24 May 2007)
there use to be a contrib for that but it only worked in sme6.x. Is there a log file or something i can search through?
-
Hi
Is there a way i can see if the server received an email from a specific email address on a specific date. (24 May 2007)
there use to be a contrib for that but it only worked in sme6.x. Is there a log file or something i can search through?
You can normally log in the /var/log/qpsmtpd/current log or /var/log/qmail/current log but because these get rotated I doubt it will have the date you requested, only other option is if you enabled BCC copying feature which archives the emails then you could look there. BCC is not enabled but default BCC is disabled.
-
Thanx for the reply. I did enable bcc in the beginning of this month. I suppose there is no other way. Thanx.
-
You can normally log in the /var/log/qpsmtpd/current log or /var/log/qmail/current log but because these get rotated I doubt it will have the date you requested, only other option is if you enabled BCC copying feature which archives the emails then you could look there. BCC is not enabled but default BCC is disabled.
Although it rotates it should keep some history, I have a lot of older log files still available on my server.
How about this from the SME Server shell: grep -i 'to email address' /var/log/qpsmtpd/\@* /var/log/qpsmtpd/current
Once you located the proper logfile you can do the following:
grep -ih 'to email address' /path/to/logfile | tai64nlocal | grep 'yyyy-mm-dd'
(Replace the y, m and d values for the proper date values.)
Edit: removed duplicate pipe symbol in last command
-
I suppose there is no other way. Thanx.
Depending on size of your logs you may find it could go back to May, I've had a look at mine and mine go back to end of July and my mail server is a busy mail server, so if your server is less busy then you may be in luck by checking via server-manager and looking at the qmail section of the logs to see how far your's go back.
-
Is this correct?
grep -ih 'to email address' /path/to/logfile | tai64nlocal | | grep 'yyyy-mm-dd'
I found the log file. but how can i see the date? the log files does not seem to have dates in.
-
Is this correct?
grep -ih 'to email address' /path/to/logfile | tai64nlocal | | grep 'yyyy-mm-dd'
I found the log file. but how can i see the date? the log files does not seem to have dates in.
I copy pasted something and made a slight error I just saw, it should read like this:
grep -ih 'to email address' /path/to/logfile | tai64nlocal | grep 'yyyy-mm-dd'
If you leave out the command after tai64nlocal you will see the lines with the date in local time format:
grep -ih 'to email address' /path/to/logfile | tai64nlocal
-
thank you for the reply. Unfortunately for my the log files does not go that far back. At least i learned what tai64nlocal does. :-P It is very helpfull.