* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) The Exim Maintainers 2020 - 2023 */
+/* Copyright (c) The Exim Maintainers 2020 - 2024 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* SPDX-License-Identifier: GPL-2.0-or-later */
static void
term_handler(int sig)
{
-exit(1);
+exim_exit(EXIT_FAILURE);
}
static gstring *
show_db_version(gstring * g)
{
+g = string_cat(g, US"Hints DB:\n");
#ifdef DB_VERSION_STRING
DEBUG(D_any)
{
- g = string_fmt_append(g, "Library version: BDB: Compile: %s\n", DB_VERSION_STRING);
- g = string_fmt_append(g, " Runtime: %s\n",
+ g = string_fmt_append(g, " Library version: BDB: Compile: %s\n", DB_VERSION_STRING);
+ g = string_fmt_append(g, " Runtime: %s\n",
db_version(NULL, NULL, NULL));
}
else
- g = string_fmt_append(g, "Berkeley DB: %s\n", DB_VERSION_STRING);
+ g = string_fmt_append(g, " Berkeley DB: %s\n", DB_VERSION_STRING);
#elif defined(BTREEVERSION) && defined(HASHVERSION)
# ifdef USE_DB
- g = string_cat(g, US"Probably Berkeley DB version 1.8x (native mode)\n");
+ g = string_cat(g, US" Probably Berkeley DB version 1.8x (native mode)\n");
# else
- g = string_cat(g, US"Probably Berkeley DB version 1.8x (compatibility mode)\n");
+ g = string_cat(g, US" Probably Berkeley DB version 1.8x (compatibility mode)\n");
# endif
#elif defined(_DBM_RDONLY) || defined(dbm_dirfno)
-g = string_cat(g, US"Probably ndbm\n");
+g = string_cat(g, US" Probably ndbm\n");
+#elif defined(USE_SQLITE)
+g = string_cat(g, US" Using sqlite3\n");
#elif defined(USE_TDB)
-g = string_cat(g, US"Using tdb\n");
+g = string_cat(g, US" Using tdb\n");
#else
# ifdef USE_GDBM
- g = string_cat(g, US"Probably GDBM (native mode)\n");
+g = string_cat(g, US" Probably GDBM (native mode)\n");
# else
- g = string_cat(g, US"Probably GDBM (compatibility mode)\n");
+g = string_cat(g, US" Probably GDBM (compatibility mode)\n");
# endif
#endif
return g;
#ifndef DISABLE_ESMTP_LIMITS
g = string_cat(g, US" ESMTP_Limits");
#endif
+#ifndef DISABLE_WELLKNOWN
+ g = string_cat(g, US" ESMTP_Wellknown");
+#endif
#ifndef DISABLE_EVENT
g = string_cat(g, US" Event");
#endif
if ((result = malware_in_file(malware_test_file)) == FAIL)
{
printf("No malware found.\n");
- exit(EXIT_SUCCESS);
+ exim_exit(EXIT_SUCCESS);
}
if (result != OK)
{
printf("Malware lookup returned non-okay/fail: %d\n", result);
- exit(EXIT_FAILURE);
+ exim_exit(EXIT_FAILURE);
}
if (malware_name)
printf("Malware found: %s\n", malware_name);
#else
printf("Malware scanning not enabled at compile time.\n");
#endif
- exit(EXIT_FAILURE);
+ exim_exit(EXIT_FAILURE);
}
/* Handle a request to list the delivery queue */
{
set_process_info("listing the queue");
queue_list(list_queue_option, argv + recipients_arg, argc - recipients_arg);
- exit(EXIT_SUCCESS);
+ exim_exit(EXIT_SUCCESS);
}
/* Handle a request to count the delivery queue */
{
set_process_info("counting the queue");
fprintf(stdout, "%u\n", queue_count());
- exit(EXIT_SUCCESS);
+ exim_exit(EXIT_SUCCESS);
}
/* Handle actions on specific messages, except for the force delivery and
else if (!queue_action(argv[msg_action_arg], msg_action, argv, argc,
recipients_arg)) yield = EXIT_FAILURE;
- exit(yield);
+ exim_exit(yield);
}
/* We used to set up here to skip reading the ACL section, on
(void)gettimeofday(&t0, NULL);
# endif
if (!tls_dropprivs_validate_require_cipher(FALSE))
- exit(1);
+ exim_exit(EXIT_FAILURE);
# ifdef MEASURE_TIMING
report_time_since(&t0, US"validate_ciphers (delta)");
# endif