Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get awstats to parse the postfix mail log, but it drops allmost all entries with messages like:

Corrupted record (date 20091204042837 lower than 20091211065829-20000): 2009-12-04 04:28:37 root root localhost SMTP - 1 17480

Few more are dropped with an invalid LogFormat:

Corrupted record line 24 (record format does not match LogFormat parameter): 2009-11-16 04: 28:22 root root localhost SMTP - 14755

My conf LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd" I believe matches the log format (and besides is the log format I've seen everywhere for awstats mail parsing). Besides, is the same entry format as all the other entries in the mail log.

Whatever is left is dropped too:

Dropped record (host localhost and not qualified by SkipHosts): 2009-12-07 04:28:36 root root localhost SMTP - 1 17152

I added SkipHosts="" to the .conf file but to no avail.

I feel like awstats really has some personal quarrel with me today.

share|improve this question

Several different issues here:

  1. awstats requires chronologically sorted input logs. If you have a single log file, sort (man sort(1)) should be enough. If you have multiple log files you can use

  2. the reported line is missing a field:

    • %time2 = 2009-11-16 04: 28:22
    • %email = root
    • %email_r = root
    • %host = localhost
    • %host_r =
    • %method = SMTP
    • %url = -
    • %code = 14755
    • %bytesd = [missing]

If the amount is not significant, I would simply delete such lines, maybe they have been corrupted in some way.

share|improve this answer

try HostAliases=" ...

in all honesty though it makes me wonder if Postfix set up wrong. gfe/oh

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.