I have setup a new log and want to mail the log file daily at the end of the day. Logrotate has a mail and mailfirst option available, but it sends the content of the log file in mail but does not send the logfile as an attachment. Does logrotate behave like this or is there any other option which attaches the actual logfile?
[QUOTE] [FONT=monospace][COLOR=#000000] [/COLOR][COLOR=#000000]-m, --mail [/COLOR][COLOR=#000000] [/COLOR]
Tells [COLOR=#000000]logrotate [/COLOR][COLOR=#000000]which command to use when mailing logs. This command should accept two arguments: 1) the subject of the message, and 2) the recipient. The command must then read a message on standard input and mail it to the recipient. The default [/COLOR]
mail command is [COLOR=#000000]/bin/mail -s[/COLOR][COLOR=#000000].[/QUOTE][/COLOR]
Used the full path for the mail option but still it does not send the attachment.[/QUOTE]
the key may be the following part of the man page: “[FONT=monospace][COLOR=#000000]The command must then read a message on standard input and mail it to the recipient.” As the mail command puts everything from stdin into the body of the message, nothing es is to be expected.