dmail.c | dmail.c | |||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
* | * | |||
* Author: Mark Crispin | * Author: Mark Crispin | |||
* Networks and Distributed Computing | * Networks and Distributed Computing | |||
* Computing & Communications | * Computing & Communications | |||
* University of Washington | * University of Washington | |||
* Administration Building, AG-44 | * Administration Building, AG-44 | |||
* Seattle, WA 98195 | * Seattle, WA 98195 | |||
* Internet: MRC@CAC.Washington.EDU | * Internet: MRC@CAC.Washington.EDU | |||
* | * | |||
* Date: 5 April 1993 | * Date: 5 April 1993 | |||
* Last Edited: 10 September 2007 | * Last Edited: 30 October 2008 | |||
*/ | */ | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <pwd.h> | #include <pwd.h> | |||
#include <errno.h> | #include <errno.h> | |||
extern int errno; /* just in case */ | extern int errno; /* just in case */ | |||
#include <sysexits.h> | #include <sysexits.h> | |||
#include <sys/file.h> | #include <sys/file.h> | |||
#include <sys/stat.h> | #include <sys/stat.h> | |||
#include "c-client.h" | #include "c-client.h" | |||
#include "dquota.h" | #include "dquota.h" | |||
/* Globals */ | /* Globals */ | |||
char *version = "17"; /* dmail edit version */ | char *version = "18"; /* dmail edit version */ | |||
int debug = NIL; /* debugging (don't fork) */ | int debug = NIL; /* debugging (don't fork) */ | |||
int flagseen = NIL; /* flag message as seen */ | int flagseen = NIL; /* flag message as seen */ | |||
int trycreate = NIL; /* flag saying gotta create before appending */ | int trycreate = NIL; /* flag saying gotta create before appending */ | |||
int critical = NIL; /* flag saying in critical code */ | int critical = NIL; /* flag saying in critical code */ | |||
char *sender = NIL; /* message origin */ | char *sender = NIL; /* message origin */ | |||
char *keywords = NIL; /* keyword list */ | char *keywords = NIL; /* keyword list */ | |||
long precedence = 0; /* delivery precedence - used by quota hook */ | long precedence = 0; /* delivery precedence - used by quota hook */ | |||
/* Function prototypes */ | /* Function prototypes */ | |||
skipping to change at line 220 | skipping to change at line 220 | |||
int deliver (FILE *f,unsigned long msglen,char *user) | int deliver (FILE *f,unsigned long msglen,char *user) | |||
{ | { | |||
MAILSTREAM *ds = NIL; | MAILSTREAM *ds = NIL; | |||
char *s,*mailbox,tmp[MAILTMPLEN],path[MAILTMPLEN]; | char *s,*mailbox,tmp[MAILTMPLEN],path[MAILTMPLEN]; | |||
STRING st; | STRING st; | |||
struct stat sbuf; | struct stat sbuf; | |||
/* have a mailbox specifier? */ | /* have a mailbox specifier? */ | |||
if (mailbox = strchr (user,'+')) { | if (mailbox = strchr (user,'+')) { | |||
*mailbox++ = '\0'; /* yes, tie off user name */ | *mailbox++ = '\0'; /* yes, tie off user name */ | |||
if (!*mailbox || !strcmp ("INBOX",ucase (strcpy (tmp,mailbox)))) | if (!*mailbox || !compare_cstring ((unsigned char *) mailbox,"INBOX")) | |||
mailbox = NIL; /* user+ and user+INBOX same as user */ | mailbox = NIL; /* user+ and user+INBOX same as user */ | |||
} | } | |||
if (!*user) user = myusername (); | if (!*user) user = myusername (); | |||
else if (strcmp (user,myusername ())) | else if (strcmp (user,myusername ())) | |||
return fail ("can't deliver to other user",EX_CANTCREAT); | return fail ("can't deliver to other user",EX_CANTCREAT); | |||
sprintf (tmp,"delivering to %.80s+%.80s",user,mailbox ? mailbox : "INBOX" ); | sprintf (tmp,"delivering to %.80s+%.80s",user,mailbox ? mailbox : "INBOX" ); | |||
mm_dlog (tmp); | mm_dlog (tmp); | |||
/* prepare stringstruct */ | /* prepare stringstruct */ | |||
INIT (&st,file_string,(void *) f,msglen); | INIT (&st,file_string,(void *) f,msglen); | |||
if (mailbox) { /* non-INBOX name */ | if (mailbox) { /* non-INBOX name */ | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |