Summary: | app-admin/logrotate - when configured to mail logfiles before deleting them, an error is mailed instead | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | R. Welz <r_welz> |
Component: | Current packages | Assignee: | Daniel Gryniewicz (RETIRED) <dang> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | martin.holzer, r_welz |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Other | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
R. Welz
2006-08-22 18:19:29 UTC
Ok, I am solving this on my own, but this will take some time, because I am a busy man ;) First of all: Exchanging mailx with nail makes this work. It has 2 drawbacks: nail discards mail, when the smtp server is unreachable (e.g. network down). And the From: header seems to be uncostumizable: From: cron <cron@Nausciaa.fit.de> but I need From: cron@Nausciaa <bla,bla> since mail clients tend to show the first part only. Okay, so this is a mailx specific issue? That certainly helps, because I was completely unable to see why the code wouldn't work. It looks like it should be fine. I can add support for customizing the from name, I think. Hi. Yes, its mailx specific. I have a workaround: nail works and you get a customizable "From" header if you put for example: from="cron-Merkur <cron-Merkur@Merkur.fixe-post.de>" in /etc/crontab. logrotate inherits automagically. But that works only if nail writes to a local postfix queue. With smtp to a remote server, nail doesn't use the "from" environment variable. So you end up having postfix running on every computer. Can we have something with mailx and costumizale from header? Its hard to read all the rotated logs when you have a dozend machines. Robert Okay, I finally got a chance to try this, with that exact config (except my email address, and /var/log/messages), and it emailed the result to me correctly. I looked, and mailx has no way to specify the full name, and it appears to incorrectly pass sendmail parameters through to ssmpt, so that doesn't work either. Can you send email via mailx on the command line? Is this still relevent at all? Please get back to me. |