git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee25093
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 21 Oct 2017 20:52:54 +0000
(21:52 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 21 Oct 2017 20:52:54 +0000
(21:52 +0100)
src/src/dmarc.c
patch
|
blob
|
history
src/src/exim.c
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/readconf.c
patch
|
blob
|
history
src/src/transports/appendfile.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
diff --git
a/src/src/dmarc.c
b/src/src/dmarc.c
index 704b0c88d582939967275c3cfb6c82c76144b444..6cb5b19fe38617c8491f21024b4ec2cdd19433dd 100644
(file)
--- a/
src/src/dmarc.c
+++ b/
src/src/dmarc.c
@@
-79,12
+79,12
@@
return eblock;
messages on the same SMTP connection (that come from the
same host with the same HELO string) */
messages on the same SMTP connection (that come from the
same host with the same HELO string) */
-int dmarc_init()
+int
+dmarc_init()
{
int *netmask = NULL; /* Ignored */
int is_ipv6 = 0;
{
int *netmask = NULL; /* Ignored */
int is_ipv6 = 0;
-char *tld_file = (dmarc_tld_file == NULL) ?
- DMARC_TLD_FILE : CS dmarc_tld_file;
+char *tld_file = dmarc_tld_file ? CS dmarc_tld_file : DMARC_TLD_FILE;
/* Set some sane defaults. Also clears previous results when
* multiple messages in one connection. */
/* Set some sane defaults. Also clears previous results when
* multiple messages in one connection. */
@@
-505,11
+505,11
@@
if (!dmarc_history_file)
history_file_fd = log_create(dmarc_history_file);
if (history_file_fd < 0)
history_file_fd = log_create(dmarc_history_file);
if (history_file_fd < 0)
-{
+
{
log_write(0, LOG_MAIN|LOG_PANIC, "failure to create DMARC history file: %s",
dmarc_history_file);
return DMARC_HIST_FILE_ERR;
log_write(0, LOG_MAIN|LOG_PANIC, "failure to create DMARC history file: %s",
dmarc_history_file);
return DMARC_HIST_FILE_ERR;
-}
+
}
/* Generate the contents of the history file */
history_buffer = string_sprintf(
/* Generate the contents of the history file */
history_buffer = string_sprintf(
@@
-575,31
+575,24
@@
else
return DMARC_HIST_OK;
}
return DMARC_HIST_OK;
}
+
uschar *
dmarc_exim_expand_query(int what)
{
if (dmarc_disable_verify || !dmarc_pctx)
return dmarc_exim_expand_defaults(what);
uschar *
dmarc_exim_expand_query(int what)
{
if (dmarc_disable_verify || !dmarc_pctx)
return dmarc_exim_expand_defaults(what);
-switch(what)
- {
- case DMARC_VERIFY_STATUS:
- return(dmarc_status);
- default:
- return US"";
- }
+if (what == DMARC_VERIFY_STATUS)
+ return dmarc_status;
+return US"";
}
uschar *
dmarc_exim_expand_defaults(int what)
{
}
uschar *
dmarc_exim_expand_defaults(int what)
{
-switch(what)
- {
- case DMARC_VERIFY_STATUS:
- return dmarc_disable_verify ? US"off" : US"none";
- default:
- return US"";
- }
+if (what == DMARC_VERIFY_STATUS)
+ return dmarc_disable_verify ? US"off" : US"none";
+return US"";
}
uschar *
}
uschar *
diff --git
a/src/src/exim.c
b/src/src/exim.c
index e15864839f1b3586bbdbd185235cac5e94557ea5..d22c9b1250522a9153cfb825b338950791b3c86a 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-3196,10
+3196,10
@@
for (i = 1; i < argc; i++)
which sets the host protocol and host name */
if (*argrest == 0)
which sets the host protocol and host name */
if (*argrest == 0)
- {
- if (i+1 < argc) argrest = argv[++i]; else
+ if (i+1 < argc)
+ argrest = argv[++i];
+ else
{ badarg = TRUE; break; }
{ badarg = TRUE; break; }
- }
if (*argrest != 0)
{
if (*argrest != 0)
{
@@
-3213,9
+3213,7
@@
for (i = 1; i < argc; i++)
hn = Ustrchr(argrest, ':');
if (hn == NULL)
hn = Ustrchr(argrest, ':');
if (hn == NULL)
- {
received_protocol = argrest;
received_protocol = argrest;
- }
else
{
int old_pool = store_pool;
else
{
int old_pool = store_pool;
diff --git
a/src/src/expand.c
b/src/src/expand.c
index b146db2649f0e30634479d1c81d9495e6578659d..bae3114a661cb3ac9655d75d29ccdd4f70103c94 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-6771,11
+6771,12
@@
while (*s != 0)
while (isspace(*sub)) sub++;
if (*sub == '>')
if (*outsep = *++sub) ++sub;
while (isspace(*sub)) sub++;
if (*sub == '>')
if (*outsep = *++sub) ++sub;
- else {
+ else
+ {
expand_string_message = string_sprintf("output separator "
"missing in expanding ${addresses:%s}", --sub);
goto EXPAND_FAILED;
expand_string_message = string_sprintf("output separator "
"missing in expanding ${addresses:%s}", --sub);
goto EXPAND_FAILED;
- }
+
}
parse_allow_group = TRUE;
for (;;)
parse_allow_group = TRUE;
for (;;)
diff --git
a/src/src/readconf.c
b/src/src/readconf.c
index 1cbbd83ef868383f64770614e5ff3d529bdbeb91..70ce78f1f3a5c6b766445959a96f3c2886627308 100644
(file)
--- a/
src/src/readconf.c
+++ b/
src/src/readconf.c
@@
-3271,9
+3271,8
@@
if (trusted_config && Ustrcmp(filename, US"/dev/null"))
letter. If we see something starting with an upper case letter, it is taken as
a macro definition. */
letter. If we see something starting with an upper case letter, it is taken as
a macro definition. */
-while ((s = get_config_line())
!= NULL
)
+while ((s = get_config_line()))
{
{
-
if (config_lineno == 1 && Ustrstr(s, "\xef\xbb\xbf") == s)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"found unexpected BOM (Byte Order Mark)");
if (config_lineno == 1 && Ustrstr(s, "\xef\xbb\xbf") == s)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"found unexpected BOM (Byte Order Mark)");
@@
-3441,7
+3440,7
@@
if (*log_file_path != 0)
openlog(). Default is LOG_MAIL set in globals.c. Allow the user to omit the
leading "log_". */
openlog(). Default is LOG_MAIL set in globals.c. Allow the user to omit the
leading "log_". */
-if (syslog_facility_str
!= NULL
)
+if (syslog_facility_str)
{
int i;
uschar *s = syslog_facility_str;
{
int i;
uschar *s = syslog_facility_str;
@@
-3451,27
+3450,22
@@
if (syslog_facility_str != NULL)
s += 4;
for (i = 0; i < syslog_list_size; i++)
s += 4;
for (i = 0; i < syslog_list_size; i++)
- {
if (strcmpic(s, syslog_list[i].name) == 0)
{
syslog_facility = syslog_list[i].value;
break;
}
if (strcmpic(s, syslog_list[i].name) == 0)
{
syslog_facility = syslog_list[i].value;
break;
}
- }
if (i >= syslog_list_size)
if (i >= syslog_list_size)
- {
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"failed to interpret syslog_facility \"%s\"", syslog_facility_str);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"failed to interpret syslog_facility \"%s\"", syslog_facility_str);
- }
}
/* Expand pid_file_path */
if (*pid_file_path != 0)
{
}
/* Expand pid_file_path */
if (*pid_file_path != 0)
{
- s = expand_string(pid_file_path);
- if (s == NULL)
+ if (!(s = expand_string(pid_file_path)))
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to expand pid_file_path "
"\"%s\": %s", pid_file_path, expand_string_message);
pid_file_path = s;
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to expand pid_file_path "
"\"%s\": %s", pid_file_path, expand_string_message);
pid_file_path = s;
@@
-3479,7
+3473,7
@@
if (*pid_file_path != 0)
/* Set default value of process_log_path */
/* Set default value of process_log_path */
-if (
process_log_path == NULL
|| *process_log_path =='\0')
+if (
!process_log_path
|| *process_log_path =='\0')
process_log_path = string_sprintf("%s/exim-process.info", spool_directory);
/* Compile the regex for matching a UUCP-style "From_" line in an incoming
process_log_path = string_sprintf("%s/exim-process.info", spool_directory);
/* Compile the regex for matching a UUCP-style "From_" line in an incoming
@@
-3489,23
+3483,19
@@
regex_From = regex_must_compile(uucp_from_pattern, FALSE, TRUE);
/* Unpick the SMTP rate limiting options, if set */
/* Unpick the SMTP rate limiting options, if set */
-if (smtp_ratelimit_mail != NULL)
- {
+if (smtp_ratelimit_mail)
unpick_ratelimit(smtp_ratelimit_mail, &smtp_rlm_threshold,
&smtp_rlm_base, &smtp_rlm_factor, &smtp_rlm_limit);
unpick_ratelimit(smtp_ratelimit_mail, &smtp_rlm_threshold,
&smtp_rlm_base, &smtp_rlm_factor, &smtp_rlm_limit);
- }
-if (smtp_ratelimit_rcpt != NULL)
- {
+if (smtp_ratelimit_rcpt)
unpick_ratelimit(smtp_ratelimit_rcpt, &smtp_rlr_threshold,
&smtp_rlr_base, &smtp_rlr_factor, &smtp_rlr_limit);
unpick_ratelimit(smtp_ratelimit_rcpt, &smtp_rlr_threshold,
&smtp_rlr_base, &smtp_rlr_factor, &smtp_rlr_limit);
- }
/* The qualify domains default to the primary host name */
/* The qualify domains default to the primary host name */
-if (
qualify_domain_sender == NULL
)
+if (
!qualify_domain_sender
)
qualify_domain_sender = primary_hostname;
qualify_domain_sender = primary_hostname;
-if (
qualify_domain_recipient == NULL
)
+if (
!qualify_domain_recipient
)
qualify_domain_recipient = qualify_domain_sender;
/* Setting system_filter_user in the configuration sets the gid as well if a
qualify_domain_recipient = qualify_domain_sender;
/* Setting system_filter_user in the configuration sets the gid as well if a
@@
-3514,7
+3504,7
@@
name is given, but a numerical value does not. */
if (system_filter_uid_set && !system_filter_gid_set)
{
struct passwd *pw = getpwuid(system_filter_uid);
if (system_filter_uid_set && !system_filter_gid_set)
{
struct passwd *pw = getpwuid(system_filter_uid);
- if (
pw == NULL
)
+ if (
!pw
)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Failed to look up uid %ld",
(long int)system_filter_uid);
system_filter_gid = pw->pw_gid;
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Failed to look up uid %ld",
(long int)system_filter_uid);
system_filter_gid = pw->pw_gid;
@@
-3524,14
+3514,14
@@
if (system_filter_uid_set && !system_filter_gid_set)
/* If the errors_reply_to field is set, check that it is syntactically valid
and ensure it contains a domain. */
/* If the errors_reply_to field is set, check that it is syntactically valid
and ensure it contains a domain. */
-if (errors_reply_to
!= NULL
)
+if (errors_reply_to)
{
uschar *errmess;
int start, end, domain;
uschar *recipient = parse_extract_address(errors_reply_to, &errmess,
&start, &end, &domain, FALSE);
{
uschar *errmess;
int start, end, domain;
uschar *recipient = parse_extract_address(errors_reply_to, &errmess,
&start, &end, &domain, FALSE);
- if (
recipient == NULL
)
+ if (
!recipient
)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"error in errors_reply_to (%s): %s", errors_reply_to, errmess);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"error in errors_reply_to (%s): %s", errors_reply_to, errmess);
@@
-3553,12
+3543,13
@@
if (smtp_accept_max == 0 &&
so that it can be computed from the host name, for example. We do this last
so as to ensure that everything else is set up before the expansion. */
so that it can be computed from the host name, for example. We do this last
so as to ensure that everything else is set up before the expansion. */
-if (host_number_string
!= NULL
)
+if (host_number_string)
{
long int n;
uschar *end;
uschar *s = expand_string(host_number_string);
{
long int n;
uschar *end;
uschar *s = expand_string(host_number_string);
- if (s == NULL)
+
+ if (!s)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"failed to expand localhost_number \"%s\": %s",
host_number_string, expand_string_message);
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"failed to expand localhost_number \"%s\": %s",
host_number_string, expand_string_message);
@@
-3577,11
+3568,10
@@
if (host_number_string != NULL)
#ifdef SUPPORT_TLS
/* If tls_verify_hosts is set, tls_verify_certificates must also be set */
#ifdef SUPPORT_TLS
/* If tls_verify_hosts is set, tls_verify_certificates must also be set */
-if ((tls_verify_hosts != NULL || tls_try_verify_hosts != NULL) &&
- tls_verify_certificates == NULL)
+if ((tls_verify_hosts || tls_try_verify_hosts) && !tls_verify_certificates)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"tls_%sverify_hosts is set, but tls_verify_certificates is not set",
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"tls_%sverify_hosts is set, but tls_verify_certificates is not set",
-
(tls_verify_hosts != NULL)
? "" : "try_");
+
tls_verify_hosts
? "" : "try_");
/* This also checks that the library linkage is working and we can call
routines in it, so call even if tls_require_ciphers is unset */
/* This also checks that the library linkage is working and we can call
routines in it, so call even if tls_require_ciphers is unset */
diff --git
a/src/src/transports/appendfile.c
b/src/src/transports/appendfile.c
index dc693585cca21c233be624524f1d91a7917cfa6d..f1bc27dd8d6c859e338c5d4bcffa4338fee2aab2 100644
(file)
--- a/
src/src/transports/appendfile.c
+++ b/
src/src/transports/appendfile.c
@@
-306,11
+306,11
@@
for (i = 0; i < 5; i++)
uschar *rest;
uschar *s = expand_string(q);
uschar *rest;
uschar *s = expand_string(q);
- if (
s == NULL
)
+ if (
!s
)
{
*errmsg = string_sprintf("Expansion of \"%s\" in %s transport failed: "
"%s", q, tblock->name, expand_string_message);
{
*errmsg = string_sprintf("Expansion of \"%s\" in %s transport failed: "
"%s", q, tblock->name, expand_string_message);
- return search_find_defer? DEFER : FAIL;
+ return search_find_defer
? DEFER : FAIL;
}
d = Ustrtod(s, &rest);
}
d = Ustrtod(s, &rest);
@@
-324,7
+324,8
@@
for (i = 0; i < 5; i++)
else if (tolower(*rest) == 'g') { d *= 1024.0*1024.0*1024.0; rest++; }
else if (*rest == '%' && i == 2)
{
else if (tolower(*rest) == 'g') { d *= 1024.0*1024.0*1024.0; rest++; }
else if (*rest == '%' && i == 2)
{
- if (ob->quota_value <= 0 && !ob->maildir_use_size_file) d = 0;
+ if (ob->quota_value <= 0 && !ob->maildir_use_size_file)
+ d = 0;
else if ((int)d < 0 || (int)d > 100)
{
*errmsg = string_sprintf("Invalid quota_warn_threshold percentage (%d)"
else if ((int)d < 0 || (int)d > 100)
{
*errmsg = string_sprintf("Invalid quota_warn_threshold percentage (%d)"
@@
-340,8
+341,8
@@
for (i = 0; i < 5; i++)
appended. Currently only "no_check", so we can be lazy parsing it */
if (i < 2 && Ustrstr(rest, "/no_check") == rest)
{
appended. Currently only "no_check", so we can be lazy parsing it */
if (i < 2 && Ustrstr(rest, "/no_check") == rest)
{
-
no_check = 1;
-
rest += sizeof("/no_check") - 1;
+ no_check = 1;
+ rest += sizeof("/no_check") - 1;
}
while (isspace(*rest)) rest++;
}
while (isspace(*rest)) rest++;
@@
-359,41
+360,44
@@
for (i = 0; i < 5; i++)
switch (i)
{
case 0:
switch (i)
{
case 0:
- if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4) which = US"quota";
- ob->quota_value = (off_t)d;
- ob->quota_no_check = no_check;
- q = ob->quota_filecount;
- break;
+ if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
+ which = US"quota";
+ ob->quota_value = (off_t)d;
+ ob->quota_no_check = no_check;
+ q = ob->quota_filecount;
+ break;
case 1:
case 1:
- if (d >= 2.0*1024.0*1024.0*1024.0) which = US"quota_filecount";
- ob->quota_filecount_value = (int)d;
- ob->quota_filecount_no_check = no_check;
- q = ob->quota_warn_threshold;
- break;
+ if (d >= 2.0*1024.0*1024.0*1024.0)
+ which = US"quota_filecount";
+ ob->quota_filecount_value = (int)d;
+ ob->quota_filecount_no_check = no_check;
+ q = ob->quota_warn_threshold;
+ break;
case 2:
if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
case 2:
if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
- which = US"quota_warn_threshold";
- ob->quota_warn_threshold_value = (off_t)d;
- q = ob->mailbox_size_string;
- default_value = -1.0;
- break;
+
which = US"quota_warn_threshold";
+
ob->quota_warn_threshold_value = (off_t)d;
+
q = ob->mailbox_size_string;
+
default_value = -1.0;
+
break;
case 3:
case 3:
- if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
- which = US"mailbox_size";;
- ob->mailbox_size_value = (off_t)d;
- q = ob->mailbox_filecount_string;
- break;
+
if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
+
which = US"mailbox_size";;
+
ob->mailbox_size_value = (off_t)d;
+
q = ob->mailbox_filecount_string;
+
break;
case 4:
case 4:
- if (d >= 2.0*1024.0*1024.0*1024.0) which = US"mailbox_filecount";
- ob->mailbox_filecount_value = (int)d;
- break;
+ if (d >= 2.0*1024.0*1024.0*1024.0)
+ which = US"mailbox_filecount";
+ ob->mailbox_filecount_value = (int)d;
+ break;
}
}
- if (which
!= NULL
)
+ if (which)
{
*errmsg = string_sprintf("%s value %.10g is too large (overflow) in "
"%s transport", which, d, tblock->name);
{
*errmsg = string_sprintf("%s value %.10g is too large (overflow) in "
"%s transport", which, d, tblock->name);
@@
-575,12
+579,12
@@
else if (ob->dirname == NULL && !ob->maildir_format && !ob->mailstore_format)
driver options. Only one of body_only and headers_only can be set. */
ob->options |=
driver options. Only one of body_only and headers_only can be set. */
ob->options |=
- (tblock->body_only? topt_no_headers : 0) |
- (tblock->headers_only? topt_no_body : 0) |
- (tblock->return_path_add? topt_add_return_path : 0) |
- (tblock->delivery_date_add? topt_add_delivery_date : 0) |
- (tblock->envelope_to_add? topt_add_envelope_to : 0) |
- ((ob->use_crlf || ob->mbx_format)? topt_use_crlf : 0);
+ (tblock->body_only
? topt_no_headers : 0) |
+ (tblock->headers_only
? topt_no_body : 0) |
+ (tblock->return_path_add
? topt_add_return_path : 0) |
+ (tblock->delivery_date_add
? topt_add_delivery_date : 0) |
+ (tblock->envelope_to_add
? topt_add_envelope_to : 0) |
+ ((ob->use_crlf || ob->mbx_format)
? topt_use_crlf : 0);
}
}
@@
-892,7
+896,7
@@
if (dofcntl)
#ifndef NO_FLOCK
if (doflock && (yield >= 0))
{
#ifndef NO_FLOCK
if (doflock && (yield >= 0))
{
- int flocktype = (fcntltype == F_WRLCK)? LOCK_EX : LOCK_SH;
+ int flocktype = (fcntltype == F_WRLCK)
? LOCK_EX : LOCK_SH;
if (flocktime > 0)
{
alarm(flocktime);
if (flocktime > 0)
{
alarm(flocktime);
@@
-1271,7
+1275,7
@@
BOOL wait_for_tick = FALSE;
uid_t uid = geteuid(); /* See note above */
gid_t gid = getegid();
int mbformat;
uid_t uid = geteuid(); /* See note above */
gid_t gid = getegid();
int mbformat;
-int mode = (addr->mode > 0)? addr->mode : ob->mode;
+int mode = (addr->mode > 0)
? addr->mode : ob->mode;
off_t saved_size = -1;
off_t mailbox_size = ob->mailbox_size_value;
int mailbox_filecount = ob->mailbox_filecount_value;
off_t saved_size = -1;
off_t mailbox_size = ob->mailbox_size_value;
int mailbox_filecount = ob->mailbox_filecount_value;
@@
-1349,7
+1353,7
@@
if ((ob->maildir_format || ob->mailstore_format) && !isdirectory)
addr->transport_return = PANIC;
addr->message = string_sprintf("mail%s_format requires \"directory\" "
"to be specified for the %s transport",
addr->transport_return = PANIC;
addr->message = string_sprintf("mail%s_format requires \"directory\" "
"to be specified for the %s transport",
- ob->maildir_format? "dir" : "store", tblock->name);
+ ob->maildir_format
? "dir" : "store", tblock->name);
return FALSE;
}
return FALSE;
}
@@
-1389,10
+1393,10
@@
if (isdirectory)
{
mbformat =
#ifdef SUPPORT_MAILDIR
{
mbformat =
#ifdef SUPPORT_MAILDIR
- (ob->maildir_format)? mbf_maildir :
+ (ob->maildir_format)
? mbf_maildir :
#endif
#ifdef SUPPORT_MAILSTORE
#endif
#ifdef SUPPORT_MAILSTORE
- (ob->mailstore_format)? mbf_mailstore :
+ (ob->mailstore_format)
? mbf_mailstore :
#endif
mbf_smail;
}
#endif
mbf_smail;
}
@@
-1400,7
+1404,7
@@
else
{
mbformat =
#ifdef SUPPORT_MBX
{
mbformat =
#ifdef SUPPORT_MBX
- (ob->mbx_format)? mbf_mbx :
+ (ob->mbx_format)
? mbf_mbx :
#endif
mbf_unix;
}
#endif
mbf_unix;
}
@@
-1413,22
+1417,22
@@
DEBUG(D_transport)
" %s=%s format=%s\n message_prefix=%s\n message_suffix=%s\n "
"maildir_use_size_file=%s\n",
mode, ob->notify_comsat, ob->quota_value,
" %s=%s format=%s\n message_prefix=%s\n message_suffix=%s\n "
"maildir_use_size_file=%s\n",
mode, ob->notify_comsat, ob->quota_value,
- ob->quota_no_check? " (no_check)" : "",
- ob->quota_filecount_no_check? " (no_check_filecount)" : "",
+ ob->quota_no_check
? " (no_check)" : "",
+ ob->quota_filecount_no_check
? " (no_check_filecount)" : "",
ob->quota_warn_threshold_value,
ob->quota_warn_threshold_value,
- ob->quota_warn_threshold_is_percent? "%" : "",
- isdirectory? "directory" : "file",
+ ob->quota_warn_threshold_is_percent
? "%" : "",
+ isdirectory
? "directory" : "file",
path, mailbox_formats[mbformat],
path, mailbox_formats[mbformat],
- (ob->message_prefix == NULL)? US"null" : string_printing(ob->message_prefix),
- (ob->message_suffix == NULL)? US"null" : string_printing(ob->message_suffix),
- (ob->maildir_use_size_file)? "yes" : "no");
+ (ob->message_prefix == NULL)
? US"null" : string_printing(ob->message_prefix),
+ (ob->message_suffix == NULL)
? US"null" : string_printing(ob->message_suffix),
+ (ob->maildir_use_size_file)
? "yes" : "no");
if (!isdirectory) debug_printf(" locking by %s%s%s%s%s\n",
if (!isdirectory) debug_printf(" locking by %s%s%s%s%s\n",
- ob->use_lockfile? "lockfile " : "",
- ob->use_mbx_lock? "mbx locking (" : "",
- ob->use_fcntl? "fcntl " : "",
- ob->use_flock? "flock" : "",
- ob->use_mbx_lock? ")" : "");
+ ob->use_lockfile
? "lockfile " : "",
+ ob->use_mbx_lock
? "mbx locking (" : "",
+ ob->use_fcntl
? "fcntl " : "",
+ ob->use_flock
? "flock" : "",
+ ob->use_mbx_lock
? ")" : "");
}
/* If the -N option is set, can't do any more. */
}
/* If the -N option is set, can't do any more. */
@@
-1740,7
+1744,7
@@
if (!isdirectory)
int sleep_before_retry = TRUE;
file_opened = FALSE;
int sleep_before_retry = TRUE;
file_opened = FALSE;
- if((use_lstat? Ulstat(filename, &statbuf) : Ustat(filename, &statbuf)) != 0)
+ if((use_lstat
? Ulstat(filename, &statbuf) : Ustat(filename, &statbuf)) != 0)
{
/* Let's hope that failure to stat (other than non-existence) is a
rare event. */
{
/* Let's hope that failure to stat (other than non-existence) is a
rare event. */
@@
-1787,7
+1791,7
@@
if (!isdirectory)
get a shared lock. */
fd = Uopen(filename, O_RDWR | O_APPEND | O_CREAT |
get a shared lock. */
fd = Uopen(filename, O_RDWR | O_APPEND | O_CREAT |
- (use_lstat? O_EXCL : 0), mode);
+ (use_lstat
? O_EXCL : 0), mode);
if (fd < 0)
{
if (errno == EEXIST) continue;
if (fd < 0)
{
if (errno == EEXIST) continue;
@@
-1836,7
+1840,7
@@
if (!isdirectory)
addr->basic_errno = ERRNO_BADUGID;
addr->message = string_sprintf("mailbox %s%s has wrong uid "
"(%ld != %ld)", filename,
addr->basic_errno = ERRNO_BADUGID;
addr->message = string_sprintf("mailbox %s%s has wrong uid "
"(%ld != %ld)", filename,
- islink? " (symlink)" : "",
+ islink
? " (symlink)" : "",
(long int)(statbuf.st_uid), (long int)uid);
goto RETURN;
}
(long int)(statbuf.st_uid), (long int)uid);
goto RETURN;
}
@@
-1847,7
+1851,7
@@
if (!isdirectory)
{
addr->basic_errno = ERRNO_BADUGID;
addr->message = string_sprintf("mailbox %s%s has wrong gid (%d != %d)",
{
addr->basic_errno = ERRNO_BADUGID;
addr->message = string_sprintf("mailbox %s%s has wrong gid (%d != %d)",
- filename, islink? " (symlink)" : "", statbuf.st_gid, gid);
+ filename, islink
? " (symlink)" : "", statbuf.st_gid, gid);
goto RETURN;
}
goto RETURN;
}
@@
-1858,7
+1862,7
@@
if (!isdirectory)
{
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message = string_sprintf("mailbox %s%s has too many links (%d)",
{
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message = string_sprintf("mailbox %s%s has too many links (%d)",
- filename, islink? " (symlink)" : "", statbuf.st_nlink);
+ filename, islink
? " (symlink)" : "", statbuf.st_nlink);
goto RETURN;
}
goto RETURN;
}
@@
-1884,7
+1888,7
@@
if (!isdirectory)
{
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message = string_sprintf("mailbox %s is not a regular file%s",
{
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message = string_sprintf("mailbox %s is not a regular file%s",
- filename, ob->allow_fifo? " or named pipe" : "");
+ filename, ob->allow_fifo
? " or named pipe" : "");
goto RETURN;
}
goto RETURN;
}
@@
-1933,7
+1937,7
@@
if (!isdirectory)
a FIFO is opened WRONLY + NDELAY so that it fails if there is no process
reading the pipe. */
a FIFO is opened WRONLY + NDELAY so that it fails if there is no process
reading the pipe. */
- fd = Uopen(filename, isfifo? (O_WRONLY|O_NDELAY) : (O_RDWR|O_APPEND),
+ fd = Uopen(filename, isfifo
? (O_WRONLY|O_NDELAY) : (O_RDWR|O_APPEND),
mode);
if (fd < 0)
{
mode);
if (fd < 0)
{
@@
-1994,7
+1998,7
@@
if (!isdirectory)
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message =
string_sprintf("opened mailbox %s is no longer a %s", filename,
addr->basic_errno = ERRNO_NOTREGULAR;
addr->message =
string_sprintf("opened mailbox %s is no longer a %s", filename,
- isfifo? "named pipe" : "regular file");
+ isfifo
? "named pipe" : "regular file");
addr->special_action = SPECIAL_FREEZE;
goto RETURN;
}
addr->special_action = SPECIAL_FREEZE;
goto RETURN;
}
@@
-2432,7
+2436,7
@@
else
{
uschar *s = path + check_path_len;
while (*s == '/') s++;
{
uschar *s = path + check_path_len;
while (*s == '/') s++;
- s = (*s == 0)? US "new" : string_sprintf("%s/new", s);
+ s = (*s == 0)
? US "new" : string_sprintf("%s/new", s);
if (pcre_exec(dir_regex, NULL, CS s, Ustrlen(s), 0, 0, NULL, 0) < 0)
{
disable_quota = TRUE;
if (pcre_exec(dir_regex, NULL, CS s, Ustrlen(s), 0, 0, NULL, 0) < 0)
{
disable_quota = TRUE;
@@
-2592,7
+2596,7
@@
else
if (i >= ob->maildir_retries)
{
addr->message = string_sprintf ("failed to open %s (%d tr%s)",
if (i >= ob->maildir_retries)
{
addr->message = string_sprintf ("failed to open %s (%d tr%s)",
- filename, i, (i == 1)? "y" : "ies");
+ filename, i, (i == 1)
? "y" : "ies");
addr->basic_errno = errno;
if (errno == errno_quota || errno == ENOSPC)
addr->user_message = US"mailbox is full";
addr->basic_errno = errno;
if (errno == errno_quota || errno == ENOSPC)
addr->user_message = US"mailbox is full";
@@
-2801,12
+2805,12
@@
if (!disable_quota && ob->quota_value > 0)
debug_printf("Exim quota = " OFF_T_FMT " old size = " OFF_T_FMT
" this message = %d (%sincluded)\n",
ob->quota_value, mailbox_size, message_size,
debug_printf("Exim quota = " OFF_T_FMT " old size = " OFF_T_FMT
" this message = %d (%sincluded)\n",
ob->quota_value, mailbox_size, message_size,
- ob->quota_is_inclusive? "" : "not ");
+ ob->quota_is_inclusive
? "" : "not ");
debug_printf(" file count quota = %d count = %d\n",
ob->quota_filecount_value, mailbox_filecount);
}
debug_printf(" file count quota = %d count = %d\n",
ob->quota_filecount_value, mailbox_filecount);
}
- if (mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value)
+ if (mailbox_size + (ob->quota_is_inclusive
? message_size:0) > ob->quota_value)
{
if (!ob->quota_no_check)
{
if (!ob->quota_no_check)
@@
-2898,7
+2902,7
@@
if (yield == OK && ob->use_bsmtp)
transport_newlines++;
for (a = addr; a != NULL; a = a->next)
{
transport_newlines++;
for (a = addr; a != NULL; a = a->next)
{
- address_item *b = testflag(a, af_pfr)? a->parent: a;
+ address_item *b = testflag(a, af_pfr)
? a->parent: a;
if (!transport_write_string(fd, "RCPT TO:<%s>%s\n",
transport_rcpt_address(b, tblock->rcpt_include_affixes), cr))
{ yield = DEFER; break; }
if (!transport_write_string(fd, "RCPT TO:<%s>%s\n",
transport_rcpt_address(b, tblock->rcpt_include_affixes), cr))
{ yield = DEFER; break; }
@@
-3078,7
+3082,7
@@
if (yield != OK)
}
else /* Want a repeatable time when in test harness */
{
}
else /* Want a repeatable time when in test harness */
{
- addr->more_errno = running_in_test_harness? 10 :
+ addr->more_errno = running_in_test_harness
? 10 :
(int)time(NULL) - statbuf.st_mtime;
}
DEBUG(D_transport)
(int)time(NULL) - statbuf.st_mtime;
}
DEBUG(D_transport)
@@
-3103,8
+3107,8
@@
if (yield != OK)
addr->user_message = US"mailbox is full";
DEBUG(D_transport) debug_printf("System quota exceeded for %s%s%s\n",
dataname,
addr->user_message = US"mailbox is full";
DEBUG(D_transport) debug_printf("System quota exceeded for %s%s%s\n",
dataname,
- isdirectory? US"" : US": time since file read = ",
- isdirectory? US"" : readconf_printtime(addr->more_errno));
+ isdirectory
? US"" : US": time since file read = ",
+ isdirectory
? US"" : readconf_printtime(addr->more_errno));
}
/* Handle Exim's own quota-imposition */
}
/* Handle Exim's own quota-imposition */
@@
-3117,8
+3121,8
@@
if (yield != OK)
addr->user_message = US"mailbox is full";
DEBUG(D_transport) debug_printf("Exim%s quota exceeded for %s%s%s\n",
filecount_msg, dataname,
addr->user_message = US"mailbox is full";
DEBUG(D_transport) debug_printf("Exim%s quota exceeded for %s%s%s\n",
filecount_msg, dataname,
- isdirectory? US"" : US": time since file read = ",
- isdirectory? US"" : readconf_printtime(addr->more_errno));
+ isdirectory
? US"" : US": time since file read = ",
+ isdirectory
? US"" : readconf_printtime(addr->more_errno));
}
/* Handle a process failure while writing via a filter; the return
}
/* Handle a process failure while writing via a filter; the return
@@
-3129,7
+3133,7
@@
if (yield != OK)
yield = PANIC;
addr->message = string_sprintf("transport filter process failed (%d) "
"while writing to %s%s", addr->more_errno, dataname,
yield = PANIC;
addr->message = string_sprintf("transport filter process failed (%d) "
"while writing to %s%s", addr->more_errno, dataname,
- (addr->more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
+ (addr->more_errno == EX_EXECFAILED)
? ": unable to execute command" : "");
}
/* Handle failure to expand header changes */
}
/* Handle failure to expand header changes */
@@
-3203,7
+3207,7
@@
else
{
addr->basic_errno = errno;
addr->message = string_sprintf("close() error for %s",
{
addr->basic_errno = errno;
addr->message = string_sprintf("close() error for %s",
- (ob->mailstore_format)? dataname : filename);
+ (ob->mailstore_format)
? dataname : filename);
yield = DEFER;
}
yield = DEFER;
}
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 5f9d4313c1515c162e3903449cabd847fc54a384..9dc632e7fc271e92ec4d5bfa89d95ae475e3ead5 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-3165,7
+3165,7
@@
else
else
sprintf(CS sx.buffer, "%.500s\n", addr->unique);
else
sprintf(CS sx.buffer, "%.500s\n", addr->unique);
- DEBUG(D_deliver) debug_printf("S:journalling %s", sx.buffer);
+ DEBUG(D_deliver) debug_printf("S:journalling %s
\n
", sx.buffer);
len = Ustrlen(CS sx.buffer);
if (write(journal_fd, sx.buffer, len) != len)
log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for "
len = Ustrlen(CS sx.buffer);
if (write(journal_fd, sx.buffer, len) != len)
log_write(0, LOG_MAIN|LOG_PANIC, "failed to write journal for "