[dovecot-cvs] dovecot/src/deliver deliver.c,1.32,1.33

tss at dovecot.org tss at dovecot.org
Thu Nov 2 19:52:58 UTC 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv4651

Modified Files:
	deliver.c 
Log Message:
Don't crash with -f "". Changed the default from envelope to be
MAILER-DAEMON.



Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/deliver.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- deliver.c	17 Oct 2006 10:55:58 -0000	1.32
+++ deliver.c	2 Nov 2006 19:52:55 -0000	1.33
@@ -31,7 +31,7 @@
 #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf"
 #define DEFAULT_AUTH_SOCKET_PATH PKG_RUNDIR"/auth-master"
 #define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail"
-#define DEFAULT_ENVELOPE_SENDER "dovecot.deliver"
+#define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
 
 /* After buffer grows larger than this, create a temporary file to /tmp
    where to read the mail. */
@@ -312,7 +312,8 @@
 	pool = pool_alloconly_create("address sanitizer", 256);
 	addr = message_address_parse(pool, (const unsigned char *)address,
 				     strlen(address), 1, FALSE);
-	if (addr->mailbox == NULL || addr->domain == NULL ||
+
+	if (addr == NULL || addr->mailbox == NULL || addr->domain == NULL ||
 	    *addr->mailbox == '\0')
 		ret = DEFAULT_ENVELOPE_SENDER;
 	else if (*addr->domain == '\0')
@@ -445,7 +446,7 @@
 			i++;
 			if (i == argc) {
 				i_fatal_status(EX_USAGE,
-					       "Missing envleope argument");
+					       "Missing envelope argument");
 			}
 			envelope_sender = argv[i];
 		} else {



More information about the dovecot-cvs mailing list