Mercurial > dovecot > original-hg > dovecot-1.2
diff src/deliver/deliver.c @ 4725:af8caaba0f67 HEAD
Don't crash with -f "". Changed the default from envelope to be
MAILER-DAEMON.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 02 Nov 2006 21:52:55 +0200 |
parents | 190a66df2f82 |
children | 4710a0429914 |
line wrap: on
line diff
--- a/src/deliver/deliver.c Thu Nov 02 20:18:25 2006 +0200 +++ b/src/deliver/deliver.c Thu Nov 02 21:52:55 2006 +0200 @@ -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 {