testing and verification. */
case cond_errormsg:
- yield = message_id[0] != 0 &&
- (sender_address == NULL || sender_address[0] == 0);
+ yield = message_id[0] && (!sender_address || !*sender_address);
break;
/* Only FALSE if a message is actually being processed; TRUE for address
and filter testing and verification. */
case cond_firsttime:
- yield = filter_test != FTEST_NONE || message_id[0] == 0 || f.deliver_firsttime;
+ yield = filter_test != FTEST_NONE || !message_id[0] || f.deliver_firsttime;
break;
/* Only TRUE if a message is actually being processed; FALSE for address
testing and verification. */
case cond_manualthaw:
- yield = message_id[0] != 0 && f.deliver_manual_thaw;
+ yield = message_id[0] && f.deliver_manual_thaw;
break;
/* The foranyaddress condition loops through a list of addresses */
sender_address,
sender_fullhost ? "H=" : "", sender_fullhost ? sender_fullhost : US"",
sender_ident ? "U=" : "", sender_ident ? sender_ident : US"");
- message_id[0] = 0; /* Indicate no message accepted */
smtp_reply = US"550 Too many \"Received\" headers - suspected mail loop";
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
received_header_gen();
add_acl_headers(ACL_WHERE_RCPT, US"MAIL or RCPT");
case END_EOF:
if (smtp_input)
{
- Uunlink(spool_name); /* Lose data file when closed */
+ Uunlink(spool_name); /* Lose data file when closed */
cancel_cutthrough_connection(TRUE, US"sender closed connection");
- message_id[0] = 0; /* Indicate no message accepted */
+ message_id[0] = 0; /* Indicate no message_accepted */
smtp_reply = handle_lost_connection(US"");
smtp_yield = FALSE;
- goto TIDYUP; /* Skip to end of function */
+ goto TIDYUP; /* Skip to end of function */
}
break;
if (smtp_input)
{
smtp_reply = US"552 Message size exceeds maximum permitted";
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
else
{
Uunlink(spool_name); /* Lose the data file when closed */
cancel_cutthrough_connection(TRUE, US"sender protocol error");
smtp_reply = US""; /* Response already sent */
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
}
smtp_reply = US"451 Error while writing spool file";
receive_swallow_smtp();
}
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
else
if (smtp_handle_acl_fail(ACL_WHERE_DKIM, rc, user_msg, log_msg) != 0)
smtp_yield = FALSE; /* No more messages after dropped connection */
smtp_reply = US""; /* Indicate reply already sent */
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
}
else
? US"accepted"
: US"accepted for some recipients");
if (recipients_count == 0)
- {
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP;
- }
+ goto NOT_ACCEPTED;
}
else
prdr_requested = FALSE;
if (smtp_handle_acl_fail(ACL_WHERE_DATA, rc, user_msg, log_msg) != 0)
smtp_yield = FALSE; /* No more messages after dropped connection */
smtp_reply = US""; /* Indicate reply already sent */
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
}
}
if (!smtp_batched_input)
{
smtp_respond(smtp_code, 3, TRUE, errmsg);
- message_id[0] = 0; /* Indicate no message accepted */
smtp_reply = US""; /* Indicate reply already sent */
- goto TIDYUP; /* Skip to end of function */
+ goto NOT_ACCEPTED; /* Skip to end of function */
}
else
moan_smtp_batch(NULL, "%s %s", smtp_code, errmsg);
if (smtp_input)
{
smtp_reply = US"451 Error in writing spool file";
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP;
+ goto NOT_ACCEPTED;
}
else
{
if (smtp_input)
{
smtp_reply = US"451 Error in writing spool file";
- message_id[0] = 0; /* Indicate no message accepted */
- goto TIDYUP;
+ goto NOT_ACCEPTED;
}
else
{
then we can think about properly declaring the message not-received. */
+goto TIDYUP;
+
+NOT_ACCEPTED:
+message_id[0] = 0; /* Indicate no message accepted */
+
TIDYUP:
process_info[process_info_len] = 0; /* Remove message id */
if (spool_data_file && cutthrough_done == NOT_TRIED)