Florian Hinzmann
2009-Aug-21 10:03 UTC
[Logcheck-devel] Bug#542781: MAILARGS -a breaks mailing with mailx or mutt
Package: logcheck Version: 1.3.3 Severity: important Hello! The latest version of logchecks no longer sent mails for me, gave an error instead:> Auto-Submitted: auto-generated: No such file or directoryThis is due to> MAILARGS="-a 'Auto-Submitted: auto-generated'"in /usr/sbin/logcheck. Option -a wants to attach a file to the mail with at least the MUAs mutt and mailx from package heirloom-mailx. Hotfix: I have added the following to logcheck.conf:> # Override buggy MAILARGS in /usr/sbin/logcheck > MAILARGS=""A real fix might be to use the sendmail binary to send mails. The following works:> echo -e "Subject: sub\nX-Test: myheader\n\nmail body\n" | sendmail butchI always use sendmail to send emails from scripts or cron jobs. Giving mail headers on STDIN works for ../bin/sendmail provided by Sendmail and Exim packages at least. You'd might have to check for other MTAs, but that should be less work than checking all MUAs. And in my opinion MTAs try to be command line compatible to sendmail - at least more than user tools. Regards Florian -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core) Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages logcheck depends on: ii adduser 3.110 add and remove users and groups ii bsd-mailx [mailx] 8.1.2-0.20081101cvs-2 A simple mail user agent ii cron 3.0pl1-106 process scheduling daemon ii exim4 4.69-11 metapackage to ease Exim MTA (v4) ii exim4-daemon-heavy 4.69-11+b1 Exim MTA (v4) daemon with extended ii heirloom-mailx [ma 12.4-1.1+b1 feature-rich BSD mail(1) ii lockfile-progs 0.1.13 Programs for locking and unlocking ii logtail 1.3.3 Print log file lines that have not ii mailx 1:20081101-2 Transitional package for mailx ren ii sysklogd [system-l 1.5-5 System Logging Daemon Versions of packages logcheck recommends: ii logcheck-database 1.3.3 database of system log rules for t Versions of packages logcheck suggests: ii syslog-summary 1.13-1 summarize the contents of a syslog -- debconf information excluded -- Florian Hinzmann private: f.hinzmann at hamburg.de Debian: fh at debian.org PGP Key / ID: 1024D/B4071A65 Fingerprint : F9AB 00C1 3E3A 8125 DD3F DF1C DF79 A374 B407 1A65
Frédéric Brière
2009-Aug-24 02:05 UTC
[Logcheck-devel] Bug#542781: MAILARGS -a breaks mailing with mailx or mutt
On Fri, Aug 21, 2009 at 12:03:20PM +0200, Florian Hinzmann wrote:> This is due to > > MAILARGS="-a 'Auto-Submitted: auto-generated'" > in /usr/sbin/logcheck.Damned if you do, damned it you don't, right Martin? :)> Option -a wants to attach a file to the mail with at least the > MUAs mutt and mailx from package heirloom-mailx.mutt doesn't provide /usr/bin/mail, so it's irrelevant. But yeah, heirloom-mailx is a bother. (You would've thought that all mailxes would have the same command-line interface, no?)> A real fix might be to use the sendmail binary to send mails. The > following works: > > echo -e "Subject: sub\nX-Test: myheader\n\nmail body\n" | sendmail butchNote to self: echo -e is a bashism, so you might want to use /bin/echo instead. Another option would be to strictly depend on, say, bsd-mailx. It's a crappy solution, but it is an easy one. -- /* * Please skip to the bottom of this file if you ate lunch recently * -- Alan */ -- from Linux kernel pre-2.1.91-1
Debian Bug Tracking System
2010-Jan-27 10:09 UTC
[Logcheck-devel] Bug#542781: marked as done (MAILARGS -a breaks mailing with mailx or mutt)
Your message dated Wed, 27 Jan 2010 10:07:21 +0000 with message-id <E1Na4nx-0007vF-9L at ries.debian.org> and subject line Bug#542781: fixed in logcheck 1.3.6 has caused the Debian Bug report #542781, regarding MAILARGS -a breaks mailing with mailx or mutt to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 542781: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542781 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Florian Hinzmann <fh at debian.org> Subject: MAILARGS -a breaks mailing with mailx or mutt Date: Fri, 21 Aug 2009 12:03:20 +0200 Size: 4500 URL: <http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20100127/508ef1ed/attachment-0002.eml> -------------- next part -------------- An embedded message was scrubbed... From: Hannes von Haugwitz <hannes at vonhaugwitz.com> Subject: Bug#542781: fixed in logcheck 1.3.6 Date: Wed, 27 Jan 2010 10:07:21 +0000 Size: 6689 URL: <http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20100127/508ef1ed/attachment-0003.eml>