Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Some syslog implementations on linux (sysklogd, rsyslog) include the following line in their default configuration:

mail.*    -/var/log/maillog

As far as I know the dash sign means that it is not required to do sync() after a log message is written to this logfile.

Why is that and why should we handle maillog differently?

share|improve this question

1 Answer 1

One possible reason: /var/log/maillog is usually so huge. Put a minus sign before this entry to avoid slow down the system (when syncing the file after every logging).

share|improve this answer
    
Well, probably, but I have log files that are way larger than maillog. I suspect a more historical reason in this case but I wasn't able to find it with google. –  Zizzencs Aug 6 '12 at 9:26
    
If losing some logs didn't hurt, prefix with a minus sign to gain some performance. I don't think there is a historical reason here. –  quanta Aug 6 '12 at 9:37
    
@Downvoter: please leave a comment to let me know why. –  quanta Aug 6 '12 at 10:22
    
@Zizzencs a maillog should neither carry critical information nor be security-related so it typically should be safe to buffer writes for it. –  the-wabbit Aug 6 '12 at 11:52

Your Answer

 
discard

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.