diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-15 09:44:15 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-15 09:44:15 +0000 |
commit | 2cdb96d7d77e417f0db62c203cd823fe001a8133 (patch) | |
tree | 32c3b06aeb814a60522cfd5db30510e88f121e24 | |
parent | 40a095cf408bda50c87ed17d1a4e836b2d274e05 (diff) | |
download | mailfromd-2cdb96d7d77e417f0db62c203cd823fe001a8133.tar.gz mailfromd-2cdb96d7d77e417f0db62c203cd823fe001a8133.tar.bz2 |
* src/dns.c (check_pref): Secondary ordering by MX name
* src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi, NEWS:
Short options -l, -L are deprecated.
git-svn-id: file:///svnroot/mailfromd/branches/release_3_1_patches@1288 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 16 | ||||
-rw-r--r-- | doc/mailfromd.texi | 8 | ||||
-rw-r--r-- | src/dns.c | 2 | ||||
-rw-r--r-- | src/main.c | 23 | ||||
-rw-r--r-- | testsuite/lib/mailfromd.exp | 8 |
6 files changed, 50 insertions, 13 deletions
@@ -1,3 +1,9 @@ +2007-03-15 Sergey Poznyakoff <gray@gnu.org.ua> + + * src/dns.c (check_pref): Secondary ordering by MX name + * src/main.c, testsuite/lib/mailfromd.exp, doc/mailfromd.texi, NEWS: + Short options -l, -L are deprecated. + 2007-03-12 Sergey Poznyakoff <gray@gnu.org.ua> * doc/mailfromd.texi (Data Types): Fix description of numeric @@ -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. @@ -8,9 +8,21 @@ Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua> Version 3.1.4 (SVN) +* Short options -l and -L + +These options will have different meaning in version 3.2, therefore +starting from this release we begin a transitional period, during +which their usage is allowed but produces a warning message. You are +encouraged to use the corresponding long forms: + + --lint or --syntax-check instead of -l + --log-tag instead of -L + +Please update your scripts accordingly. + Bugfixes: -* 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/mailfromd.texi b/doc/mailfromd.texi index 6b7322b6..cda32c6b 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi @@ -2156,7 +2156,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 @@ -2310,7 +2310,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 @@ -6995,6 +6995,8 @@ user}). Default user is @samp{@value{DEFAULT-USER}}. @opindex config-file -- Reserved for future use @opindex compile +@opindex load +@opindex load-dir @end ignore @end table @@ -7062,7 +7064,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}). @@ -7075,7 +7076,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} @@ -43,7 +43,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 @@ -865,6 +865,8 @@ enum mailfromd_option { OPTION_EXPIRE, OPTION_FOREGROUND, OPTION_IGNORE_FAILED_READS, + OPTION_LINT, + OPTION_LOG_TAG, OPTION_LIST, OPTION_LOCK_RETRY_COUNT, OPTION_LOCK_RETRY_TIMEOUT, @@ -895,7 +897,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, @@ -906,6 +908,14 @@ 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|OPTION_ARG_OPTIONAL, /* FIXME: The opt flag will + be removed when the option + is working */ + 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 @@ -1010,7 +1020,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 }, @@ -1107,10 +1117,19 @@ parse_opt (int key, char *arg, struct argp_state *state) break; case 'L': + mu_error("warning: The option `-L' is deprecated, please use --log-tag instead"); + case OPTION_LOG_TAG: syslog_tag = arg; break; case 'l': + if (!arg) + mu_error("warning: The option `-l' is deprecated, please use --lint or --syntax-check instead"); + else + argp_error(state, "The option `-%c' is not yet implemented", + key); + + case OPTION_LINT: script_check = 1; break; diff --git a/testsuite/lib/mailfromd.exp b/testsuite/lib/mailfromd.exp index bfe44b86..84d86891 100644 --- a/testsuite/lib/mailfromd.exp +++ b/testsuite/lib/mailfromd.exp @@ -39,7 +39,7 @@ proc start_daemon {args} { --transcript\ --trace\ --debug=100\ - -Ltesting-mailfromd\ + --log-tag=testing-mailfromd\ -I$MAILFROMD_TESTDIR/etc\ --log-facility=mail\ $script" @@ -51,7 +51,7 @@ proc start_daemon {args} { "--trace"\ "--debug=100"\ "-I$MAILFROMD_TESTDIR/etc"\ - "-Ltesting-mailfromd"\ + "--log-tag=testing-mailfromd"\ "--log-facility=mail"\ $script} diag] { fail "Cannot start mailfromd: $diag" @@ -64,7 +64,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]" @@ -195,7 +195,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" |