diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-15 09:49:56 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-15 09:49:56 +0000 |
commit | f0c33e12d40f8776e8bdfa246438390fc2ed3ff0 (patch) | |
tree | c3b0fae9bc7701ef184864fbe14da9d10060008b | |
parent | 501704dbbdc2dc676ba95fac83562bf01dfc037d (diff) | |
download | mailfromd-f0c33e12d40f8776e8bdfa246438390fc2ed3ff0.tar.gz mailfromd-f0c33e12d40f8776e8bdfa246438390fc2ed3ff0.tar.bz2 |
* src/dnsbase.c (comp_pref): Secondary ordering by MX name
* src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi:
Discontinue support for the old semantics of options -c, -l and -L.
* doc/Makefile.am (check-exceptions): Fix the rule
* NEWS: Update
git-svn-id: file:///svnroot/mailfromd/trunk@1289 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/mailfromd.texi | 6 | ||||
-rw-r--r-- | src/dnsbase.c | 2 | ||||
-rw-r--r-- | src/main.c | 27 | ||||
-rw-r--r-- | testsuite/lib/mailfromd.exp | 8 |
7 files changed, 35 insertions, 21 deletions
@@ -1,5 +1,12 @@ 2007-03-15 Sergey Poznyakoff <gray@gnu.org.ua> + * src/dnsbase.c (comp_pref): Secondary ordering by MX name + * src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi: + Discontinue support for the old semantics of options -c, -l and -L. + * doc/Makefile.am (check-exceptions): Fix the rule + * NEWS: Update + + * src/engine.c, src/gram.y, src/dnsbase.c, src/mtasim.c: Minor stylistic and bug fixes. @@ -1,4 +1,4 @@ -Mailfromd NEWS -- history of user-visible changes. 2007-03-12 +Mailfromd NEWS -- history of user-visible changes. 2007-03-15 Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff See the end of file for copying conditions. @@ -99,7 +99,7 @@ makes function `sa_wrapper' limited for use in `prog eom' only. (from 3.1.3) -** If, during the sender verification, the remote server resplies with +** If, during sender verification, the remote server replies with 4xx to MAIL FROM command, do not try next sender address, but tempfail immediately. diff --git a/doc/Makefile.am b/doc/Makefile.am index 2b450c7b..3ff44f15 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -70,7 +70,7 @@ check-exceptions: @check-docs.sh exceptions \ '/typedef enum mf_status_code {/,/^};/s/[ \t]*mf_\(.*\),.*/\1/p' \ 's/@cindex \([^,][^,]*\), exception type/\1/p' \ - $(top_srcdir)/src/mailfrom.h -- \ + $(top_srcdir)/src/mailfromd.h -- \ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ $(info_TEXINFOS) diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi index ac977e2a..ce7045e4 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi @@ -2226,7 +2226,7 @@ to use it. There are several ways to do so. @xopindex{lint, introduced} @xopindex{syntax-check, introduced} To test the syntax of your filter script, use the @option{--lint} -(@option{-l}) option. It will cause @command{mailfromd} to exit +option. It will cause @command{mailfromd} to exit immediately after attempting to compile the script file. If the compilation succeeds, the program will exit with code 0. Otherwise, it will exit with error code 78 (@samp{configuration error}). In the @@ -2403,7 +2403,7 @@ defaults @command{mailutils} has been compiled with. @xopindex{log-tag, introduced} Another syslog-related parameter that can be configured is the @dfn{tag} used to identify @command{mailfromd} messages. By default the -program name is used. The @option{--log-tag} (@option{-L}) option can +program name is used. The @option{--log-tag} option can be used to change it. As all UNIX utilities, @command{mailfromd} is very quiet unless it @@ -7368,7 +7368,6 @@ Print a cross-reference of variables used in the filter script. @opsummary{lint} @item --lint -@itemx -l Check script file syntax and exit. If the file is OK, return 0 to the shell, otherwise print appropriate messages to stderr and exit with code 78 (@samp{configuration error}). @@ -7381,7 +7380,6 @@ Output logs to syslog @var{facility}. @opsummary{log-tag} @item --log-tag=@var{string} -@itemx -L @var{string} Tag syslog entries with the given @var{string}, instead of the program name. @opsummary{stderr} diff --git a/src/dnsbase.c b/src/dnsbase.c index 9651da02..68255d5f 100644 --- a/src/dnsbase.c +++ b/src/dnsbase.c @@ -42,7 +42,7 @@ comp_pref(const void *a, const void *b) return 1; else if (ma->pref < mb->pref) return -1; - return 0; + return strcmp(ma->name, mb->name); } /* Obtain MX records for domain name HOST. Return them in mxbuf, sorted by @@ -897,6 +897,8 @@ enum mailfromd_option { OPTION_FOREGROUND, OPTION_DEBUG_GACOPYZ, OPTION_IGNORE_FAILED_READS, + OPTION_LINT, + OPTION_LOG_TAG, OPTION_LIST, OPTION_LOCK_RETRY_COUNT, OPTION_LOCK_RETRY_TIMEOUT, @@ -927,7 +929,7 @@ static struct argp_option options[] = { N_("Compact the database"), GRP+1 }, { "test", 't', N_("state"), OPTION_ARG_OPTIONAL, N_("Run in test mode"), GRP+1 }, - { "lint", 'l', NULL, 0, + { "lint", OPTION_LINT, NULL, 0, N_("Check syntax and exit"), GRP+1 }, { "syntax-check", 0, NULL, OPTION_ALIAS, NULL, GRP+1 }, { "show-defaults", OPTION_SHOW_DEFAULTS, NULL, 0, @@ -938,6 +940,11 @@ static struct argp_option options[] = { /* Reserved for future use: */ { "compile", 'c', NULL, OPTION_HIDDEN, N_("Compile files"), GRP+1 }, + { "load", 'l', N_("FILE"), OPTION_HIDDEN, + N_("Load library"), GRP+1 }, + { "load-dir", 'L', N_("DIR"), OPTION_HIDDEN, + N_("Add DIR to the load path"), GRP+1 }, + #undef GRP #define GRP 15 @@ -1040,7 +1047,7 @@ static struct argp_option options[] = { N_("Log to stderr"), GRP+1 }, { "syslog", OPTION_SYSLOG, NULL, 0, N_("Log to syslog (default)"), GRP+1 }, - { "log-tag", 'L', N_("STRING"), 0, + { "log-tag", OPTION_LOG_TAG, N_("STRING"), 0, N_("Set the identifier used in syslog messages to STRING"), GRP+1 }, { "source-info", OPTION_SOURCE_INFO, NULL, 0, N_("Debug messages include source information"), GRP+1 }, @@ -1081,11 +1088,6 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) { switch (key) { - case 'c': - argp_error(state, - "-c is obsolete; give filter script as an argument"); - break; - case 'D': set_option("ehlo", arg, 1); break; @@ -1142,12 +1144,19 @@ parse_opt (int key, char *arg, struct argp_state *state) case OPTION_TIME_FORMAT: time_format_string = arg; break; - + + case 'c': + case 'l': case 'L': + argp_error(state, "The option `-%c' is not yet implemented", + key); + break; + + case OPTION_LOG_TAG: syslog_tag = arg; break; - case 'l': + case OPTION_LINT: script_check = 1; break; diff --git a/testsuite/lib/mailfromd.exp b/testsuite/lib/mailfromd.exp index e298da4d..30a5c3b8 100644 --- a/testsuite/lib/mailfromd.exp +++ b/testsuite/lib/mailfromd.exp @@ -40,7 +40,7 @@ proc start_daemon {args} { --transcript\ --trace\ --debug=100\ - -Ltesting-mailfromd\ + --log-tag=testing-mailfromd\ -I$MAILFROMD_TESTDIR/etc\ -I$MAILFROMD_TOP_SRCDIR/src\ --log-facility=mail\ @@ -54,7 +54,7 @@ proc start_daemon {args} { "--debug=100"\ "-I$MAILFROMD_TESTDIR/etc"\ "-I$MAILFROMD_TOP_SRCDIR/src"\ - "-Ltesting-mailfromd"\ + "--log-tag=testing-mailfromd"\ "--log-facility=mail"\ $script} diag] { fail "Cannot start mailfromd: $diag" @@ -67,7 +67,7 @@ proc start_daemon {args} { # --transcript\ # --trace\ # --debug=100\ -# -Ltesting-mailfromd\ +# --log-tag=testing-mailfromd\ # -I$MAILFROMD_TESTDIR/etc\ # --log-facility=mail\ # $MAILFROMD_ETC_DIR/[lindex $args 0]" @@ -198,7 +198,7 @@ proc default_mailfromd_start {args} { verbose "Config file $MAILFROMD_CONFIG_FILE does not exist!!!" } - set sw "-L testing -bs -C $MAILFROMD_TESTDIR/etc/sendmail.cf" + set sw "-Ltesting -bs -C $MAILFROMD_TESTDIR/etc/sendmail.cf" # FIXME: set SENDMAIL_TOOL "sendmail" |