]> git.pld-linux.org Git - packages/cyrus-imapd.git/commitdiff
- more cyrus stuff
authorArtur Frysiak <artur@frysiak.net>
Thu, 9 Mar 2000 00:20:36 +0000 (00:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cyrus-deliver-wrapper.c -> 1.1
    cyrus-user-procmailrc.template -> 1.1

cyrus-deliver-wrapper.c [new file with mode: 0644]
cyrus-user-procmailrc.template [new file with mode: 0644]

diff --git a/cyrus-deliver-wrapper.c b/cyrus-deliver-wrapper.c
new file mode 100644 (file)
index 0000000..1328433
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Wrapper for cyrus 'deliver' to allow anyone to run it -
+ * I hope this is secure!  Should be setgid mail.
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+#include <sysexits.h>
+
+#ifndef LIBEXECDIR
+#define LIBEXECDIR "/usr/libexec/cyrus"
+#endif
+
+int main(int argc, char *argv[])
+{
+    char *const envp[] = { NULL };
+    struct passwd *ent = getpwuid(getuid());
+    const char *uname = (ent && ent->pw_name && ent->pw_name[0])
+                              ? ent->pw_name : "anonymous";
+    
+    if (argc != 2) {
+        fprintf(stderr, "Usage: %s mailbox\n", argv[0]);
+        return EX_USAGE; 
+    }
+    
+    execle(LIBEXECDIR"/deliver", "deliver", "-e",
+           "-a", uname, "-m", argv[1],
+           NULL, envp);
+
+    perror("exec "LIBEXECDIR"/deliver");           
+    return EX_OSERR; 
+}
diff --git a/cyrus-user-procmailrc.template b/cyrus-user-procmailrc.template
new file mode 100644 (file)
index 0000000..8a018a1
--- /dev/null
@@ -0,0 +1,58 @@
+##############################
+# Begin procmailrc.joe file
+#
+# This is Joe's specific set of procmail
+# recipes.  It assumes that Joe has a
+# number of specific folders created
+# to which these recipes refer.  Otherwise
+# the mail cannot be sorted properly.
+#
+# First, let's define some high-level
+# folder macros to save typing later on.
+# The ALERTSBOX points to the
+# folder where we'll sort out various
+# incoming news alerts.
+# The LISTSBOX will point to a
+# folder where we'll sort out various
+# list services to which we're subscribed.
+#
+# Both ALERTSBOX and LISTSBOX
+# are subfolders of a generic folder called,
+# duh, Folders, which is right off the
+# user's INBOX.
+#
+# So if a Linux-kernel message comes in
+# it gets deposited in the folder
+# Folders/Lists/Linux_Kernel which is
+# represented in Cyrus IMAP terms as
+# user.Joe.Folders.Lists.Linux_kernel
+#
+
+############################
+# Put anchordesk alerts in news alerts folder
+
+:0:$LOGNAME.lock
+* ^From:.*anchordesk
+| $DELIVERTO $ALERTSBOX.News-Alerts
+
+# Put NC World alerts in their own folder
+
+:0:$LOGNAME.lock
+* ^From:.*NCWorld@FDDS.com
+| $DELIVERTO $ALERTSBOX.NCWorld-Alerts
+
+#############################
+# List processing & Misc Alerts
+
+:0:$LOGNAME.lock
+* (^Cc:|^CC:|^To:|^Sender:).*linux-kernel@vger.rutgers.edu
+| $DELIVERTO $LISTSBOX.Linux_Kernel
+
+:0:$LOGNAME.lock
+* (^Cc:|^CC:|^To:|^Sender:).*linux-net@vger.rutgers.edu
+| $DELIVERTO $LISTSBOX.Linux_Net
+
+#
+# End of procmailrc.joe file
+##############################
+
This page took 0.097527 seconds and 4 git commands to generate.