diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 28 |
1 files changed, 8 insertions, 20 deletions
@@ -40,6 +40,7 @@ #include <mailutils/argp.h> #include "mailfromd.h" +#include <version-etc.h> /* Configurable options */ @@ -1299,7 +1300,6 @@ parse_opt (int key, char *arg, struct argp_state *state) static const char *capa[] = { "auth", - "license", "logging", "mailer", NULL @@ -1433,24 +1433,6 @@ switch_to_privs(uid_t uid, gid_t gid) return rc; } -static char *license = - " This is mailfromd filter.\n" - " Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff\n" - "\n" - " ls is free software; you can redistribute it and/or modify\n" - " it under the terms of the GNU General Public License as published by\n" - " the Free Software Foundation; either version 2 of the License, or\n" - " (at your option) any later version.\n" - "\n" - " This program is distributed in the hope that it will be useful,\n" - " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - " GNU General Public License for more details.\n" - "\n" - " You should have received a copy of the GNU General Public License along\n" - " with this program; if not, write to the Free Software Foundation,\n" - " Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\n"; - void priv_setup() { @@ -1718,16 +1700,22 @@ stderr_closed_p() return fd <= 2; } +static void +version(FILE *stream, struct argp_state *state) +{ + mailfromd_version("mailfromd", stream, state); +} + int main(int argc, char **argv) { int index; - mu_license_text = license; MU_AUTH_REGISTER_ALL_MODULES(); mu_register_all_mailer_formats(); if (!program_invocation_short_name) program_invocation_short_name = argv[0]; + argp_program_version_hook = version; /* Set default logging */ log_facility = DEFAULT_LOG_FACILITY; |