[Bug 195184] New: sysutils/logrotate [patch] logrotate can't send email

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Nov 19 21:05:56 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195184

            Bug ID: 195184
           Summary: sysutils/logrotate [patch] logrotate can't send email
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: Normal
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: rand at meridian-enviro.com

The patch to config.h of logrotate specifies "/usr/bin/mailx -s"
    as the mail command, but since logrotate does an exec of that 
    it fails. The code actually adds -s to the argument list, so the 
    correct definition is:
      #define DEFAULT_MAIL_COMMAND "/usr/bin/mailx"
    I've included an updated patch-config.h file for the port.

How-To-Repeat:
Try to enable the "mail" option to logrotate.

Fix:
diff --git a/config.h b/config.h
index ae7f308..7c0a2b3 100644
--- a/config.h
+++ b/config.h
@@ -16,6 +16,13 @@
 #define STATEFILE "/var/log/logrotate.status"
 #endif

+#ifdef __FreeBSD__
+    #define DEFAULT_MAIL_COMMAND "/usr/bin/mailx"
+    #define COMPRESS_COMMAND "/usr/bin/gzip"
+    #define UNCOMPRESS_COMMAND "/usr/bin/gunzip"
+    #define STATEFILE "/var/run/logrotate.status"
+#endif
+
 /*
  * Default settings for Linux - leave these last.
  */

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list