

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
17 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Working on patch to a...| From | Sent On | Attachments |
|---|---|---|
| Rob Hutton | Aug 22, 2003 1:51 pm | |
| Andreas Stollar | Aug 22, 2003 4:06 pm | |
| Sam Varshavchik | Aug 22, 2003 7:46 pm | |
| Martin List-Petersen | Aug 23, 2003 6:17 am | |
| Rob Hutton | Aug 23, 2003 8:26 am | |
| Rob Hutton | Aug 23, 2003 9:57 am | |
| Sam Varshavchik | Aug 23, 2003 5:36 pm | |
| Rob Hutton | Aug 23, 2003 8:17 pm | |
| Rob Hutton | Aug 24, 2003 12:27 pm | |
| Sam Varshavchik | Aug 24, 2003 1:40 pm | |
| Rob Hutton | Aug 24, 2003 2:30 pm | |
| Rob Hutton | Aug 24, 2003 6:44 pm | |
| Rob Hutton | Aug 25, 2003 6:42 pm | |
| Matthias Andree | Aug 25, 2003 8:04 pm | |
| Sam Varshavchik | Aug 26, 2003 6:10 am | |
| Peter Mann | Aug 26, 2003 7:18 am | |
| Matthias Andree | Aug 26, 2003 5:31 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [maildropl] Working on patch to autocreate maildirs/off topic | Actions... |
|---|---|---|
| From: | Andreas Stollar (andr...@speakeasy.net) | |
| Date: | Aug 22, 2003 4:06:41 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
I am not a C++ programmer either, and I am much lazier. I set up my global /etc/maildroprc file to autocreate Maildirs with this simple sh script:
# Global maildrop filter file
# Uncomment this line to make maildrop default to ~/Maildir for # delivery- this is where courier-imap (amongst others) will look. DEFAULT="$HOME/Maildir/" `until test -d $HOME/Maildir; do /usr/local/bin/maildirmake $HOME/Maildir; done`
it has been working for months in my production system, an 20 node cluster with 100,000 accounts.
Andreas
On Fri, 22 Aug 2003, Rob Hutton wrote:
Date: Fri, 22 Aug 2003 14:54:40 -0400 From: Rob Hutton <rob....@comcast.net> To: "cour...@lists.sourceforge.net" <cour...@lists.sourceforge.net> Subject: [maildropl] Working on patch to autocreate maildirs/off topic
********DISCLAIMER******************* I AM NOT A C/C++ PROGRAMER!!!!!!!!!!! *************************************
I am working on a patch to autocreate maildirs. When I run maildrop, the maildirs are created, but I get a signal 0x0B. I am told that this means that there is an invalid pointer being referenced. How do I figure out what is causing it?
Thanks, Rob
diff -u maildrop/maildrop.h ../maildrop-1.5.3/maildrop/maildrop.h --- maildrop/maildrop.h 2003-08-02 19:49:55.000000000 -0400 +++ ../maildrop-1.5.3/maildrop/maildrop.h 1999-09-09 22:10:05.000000000 -0400 @@ -40,7 +40,6 @@ Buffer init_shell; // Initial SHELL Buffer init_default; // Initial DEFAULT Buffer init_quota; // Initial MAILDIRQUOTA - int auto_create_maildir; // Create the Maildir if it does not exist
Mio logfile; // Log file. GlobalTimer global_timer; // Watchdog timeout. diff -u maildrop/main.C ../maildrop-1.5.3/maildrop/main.C --- maildrop/main.C 2003-08-13 03:44:51.000000000 -0400 +++ ../maildrop-1.5.3/maildrop/main.C 2003-04-09 20:21:57.000000000 -0400 @@ -2,13 +2,7 @@ ** Copyright 1998 - 2003 Double Precision, Inc. ** See COPYING for distribution information. */ -#include <ctype.h> -#include <errno.h>
-#include "../maildir/maildirmisc.h" -#include "../maildir/maildirquota.h" - -#include "log.h" #include "lexer.h" #include "recipe.h" #include "varlist.h" @@ -50,13 +44,6 @@ #include "mdmysql.h" #endif
-#if HAVE_FCNTL_H -#include <fcntl.h> -#endif -#if HAVE_UNISTD_H -#include <unistd.h> -#endif - static const char rcsid[]="$Id: main.C,v 1.42 2003/04/10 00:21:57 mrsam Exp $"; #if HAS_GETHOSTNAME #else @@ -170,7 +157,7 @@
static void copyright() { -static const char msg[]="maildrop " VERSION "-new Copyright 1998-2003 Double Precision, Inc." +static const char msg[]="maildrop " VERSION " Copyright 1998-2003 Double Precision, Inc."
#if CRLF_TERM "\r\n" @@ -430,8 +417,6 @@
static int run(int argc, char **argv) { -int perm=0770; -int subdirperm=0770; int argn; const char *deliverymode=0; char *embedded_filter=0; @@ -461,9 +446,6 @@ ++argn; switch (optc) {
- case 'c': - maildrop.auto_create_maildir=1; - break; #if HAVE_COURIER #if RESTRICT_TRUSTED case 'D': @@ -768,79 +750,21 @@ if (deliverymode) { struct stat buf; - Buffer b, m; - + Buffer b;
b=maildrop.init_home; b += '\0'; - m=maildrop.init_default; - m += '\0';
- const char *h=b; - const char *md=m; - const char *fullpath=strcat(strdup(h),strdup(md)); + const char *h=b;
if (VerboseLevel() > 1) merr << "maildrop: Changing to " << h << "\n";
if (chdir(h) < 0) { - merr << "maildrop: Unable to change to home directory."; errexit=EX_TEMPFAIL; throw "Unable to change to home directory."; } - - if (VerboseLevel() > 1) - merr << "maildrop: Changing to " << fullpath << "\n"; - - if ((chdir(fullpath) < 0) && (maildrop.auto_create_maildir)) - { - - umask(0); - if (VerboseLevel() > 1) - merr << "maildrop: Fullpath " << fullpath << "\n"; - if (mkdir(fullpath, perm) < 0) - { - merr << "maildrop: Unable to autocreate maildir directory.\n"; - errexit=EX_TEMPFAIL; - throw "maildrop: Unable to autocreate maildir directory.\n"; - } - if (chdir(fullpath) < 0) - { - merr << "maildrop: Unable to access newly created maildir directory. Permissions?\n"; - errexit=EX_TEMPFAIL; - throw "maildrop: Unable to access newly created maildir directory. Permissions\n"; - } - if (mkdir("tmp", subdirperm) < 0 || chmod("tmp", subdirperm) < 0) - { - merr << "maildrop: Unable to autocreate maildir tmp directory.\n"; - errexit=EX_TEMPFAIL; - throw "maildrop: Unable to autocreate maildir tmp directory.\n"; - } - if (mkdir("new", subdirperm) < 0 || chmod("new", subdirperm) < 0) - { - merr << "maildrop: Unable to autocreate maildir new directory.\n"; - errexit=EX_TEMPFAIL; - throw "maildrop: Unable to autocreate maildir new directory.\n"; - } - if (mkdir("cur", subdirperm) < 0 || chmod("cur", subdirperm) < 0 ) - { - merr << "maildrop: Unable to autocreate maildir cur directory."; - errexit=EX_TEMPFAIL; - throw "maildrop: Unable to autocreate maildir cur directory."; - } - if ((const char*) maildrop.init_quota != "") - { - if (VerboseLevel() > 1) - merr << "maildrop: Setting Maildir quota to: " << maildrop.init_quota << "\n"; - maildir_quota_set(fullpath, (const char*) maildrop.init_quota); - } - chdir(h); - } - - if (VerboseLevel() > 1) - merr << "maildrop: Finished with home directory and maildir check\n"; - recipe=".mailfilter";
if ( stat(".", &buf) < 0 || @@ -855,12 +779,8 @@ // Quietly terminate if the sticky bit is set on the homedir
if ( buf.st_mode & S_ISVTX) - { - errexit=EX_TEMPFAIL; - throw "Sticky bit set on home directory."; -// return (EX_TEMPFAIL); - } - + return (EX_TEMPFAIL); + if (embedded_filter) { i=stat(".mailfilters", &buf);
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________ Courier-maildrop mailing list Cour...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/courier-maildrop







