While setting up a new server (moving from debian to get a smaller footprint) i found after some hours of searching that logrotate needs mailx so it can call '/bin/mail -s' (which is not supported by the default exim installed as /bin/mail) to mail the logfiles while rotating. Emerging the system from scratch i saw no use of emerging mailx (because there won't be any local users on a pure SMTP/POP3 box) so i ran into this. Should logrotate not have an dependency on mailx so that emerge will not leave a broken system for cases like that? Reproducible: Always Steps to Reproduce: 1. install minimal base system including exim as MTA (which is default) 2. 'emerge logrotate' 3. Setup logrotate to send rotated logs by mail 4. 'logrotate -f' or trigger via cron 5. Logs rotate but not mailed, error message send to postmaster, logfile lost 6. SOLUTION: emerge mailx fixes the problem Actual Results: Mail to Postmaster stating: Subject: Cron <root@netgate> test -x /usr/sbin/run-crons && /usr/sbin/run-crons exim abandoned: unknown, malformed, or incomplete option -s Failed to mail /var/log/exim/exim_main.log.8.gz to [xxx]! exim abandoned: unknown, malformed, or incomplete option -s Failed to mail /var/log/exim/exim_reject.log.8.gz to [xxx]! ... and the coresponding logs got lost because they were deleted by logrotate (as requested they should be mailed first!). *: [xxx] edited the email adress away Expected Results: logrotate should depend on mailx so the solution to this problem will automatically emerge ;-) Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.4.25-gentoo-r2) ================================================================= System uname: 2.4.25-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://gd.tuwien.ac.at/opsys/linux/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="apache2 apm arts avi berkdb chroot crypt cups curl encode exiscan-acl flash foomaticdb gd gif gtk2 imlib innodb jpeg libg++ libwww mad maildir mcal memlimit mikmod mysql ncurses nls oss pdflib perl png python readline sdl slang spell ssl threads tiff tls truetype x86 xml2 xv zlib"
not everybody wants to be emailed by their logrotate, so we shouldn't require them to install mailx. if you read the logrotate postinst message, it tells you to emerge mailx if you want that functionality, and the same thing is discussed in the ChangeLog.