aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-03-10 13:43:22 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-03-10 13:43:22 +0000
commit18ebe7bb829772d7bf1df49d23a2c9dd53a2afcd (patch)
tree51b017fdad8d712f2aa4f7a5d505032acc2e9185
parent9fe06f87591f813fce7f9068f19246c8d933fc6a (diff)
downloadmailfromd-18ebe7bb829772d7bf1df49d23a2c9dd53a2afcd.tar.gz
mailfromd-18ebe7bb829772d7bf1df49d23a2c9dd53a2afcd.tar.bz2
* src/mailfromd.h (enum mf_status_code): Add a comma and a count
definition, needed for make check-exceptions in docs. * src/status.mfi (m4_ifdef): Use OLD_EXCEPTION_CODES instead of COMPAT_4_3. * src/main.c: New command line options: -D (--define), and -U (--undefine). * mflib/match_dnsbl.mf (match_dnsbl): Use LAZY_MATCH_RBL instead of COMPAT_4_3. Throw e_invip if address is invalid. * mflib/match_rhsbl.mf (match_rhsbl): Use LAZY_MATCH_RBL instead of COMPAT_4_3. * doc/mailfromd.texi: Document variable shadowing and new features. * doc/Makefile.am (check-exceptions): Update the rule. * NEWS: Update. git-svn-id: file:///svnroot/mailfromd/branches/release_4_3_patches@1630 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog22
-rw-r--r--NEWS62
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/mailfromd.texi402
-rw-r--r--mflib/match_dnsbl.mf4
-rw-r--r--mflib/match_rhsbl.mf2
-rw-r--r--src/mailfromd.h4
-rw-r--r--src/main.c65
-rw-r--r--src/status.mfi2
9 files changed, 534 insertions, 31 deletions
<
diff --git a/ChangeLog b/ChangeLog
index 239eda1c..9972d196 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
12008-03-10 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * src/mailfromd.h (enum mf_status_code): Add a comma and a count
4 definition, needed for make check-exceptions in docs.
5 * src/status.mfi (m4_ifdef): Use OLD_EXCEPTION_CODES instead of
6 COMPAT_4_3.
7 * src/main.c: New command line options: -D (--define), and -U
8 (--undefine).
9 * mflib/match_dnsbl.mf (match_dnsbl): Use LAZY_MATCH_RBL instead of
10 COMPAT_4_3.
11 Throw e_invip if address is invalid.
12 * mflib/match_rhsbl.mf (match_rhsbl): Use LAZY_MATCH_RBL instead
13 of COMPAT_4_3.
14 * doc/mailfromd.texi: Document variable shadowing and new
15 features.
16 * doc/Makefile.am (check-exceptions): Update the rule.
17 * NEWS: Update.
18
12008-03-09 Sergey Poznyakoff <gray@gnu.org.ua> 192008-03-09 Sergey Poznyakoff <gray@gnu.org.ua>
2 20
3 Fix the test suite. The file status.mfh now contains m4 statements, 21 Fix the test suite. The file status.mfh now contains m4 statements,
@@ -69,6 +87,10 @@
69 tests/etc/catch01.rc: Use new exception codes. 87 tests/etc/catch01.rc: Use new exception codes.
70 88
712008-03-01 Sergey Poznyakoff <gray@gnu.org.ua> 892008-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
90
91 -= Release 4.3.1 =-
92
932008-03-01 Sergey Poznyakoff <gray@gnu.org.ua>
72 94
73 * src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd 95 * src/prog.c, src/prog.h (advance_pc): Fix type of the 2nd
74 argument. 96 argument.
diff --git a/NEWS b/NEWS
index 25ba9d4d..09dbea34 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
1Mailfromd NEWS -- history of user-visible changes. 2008-03-09 1Mailfromd NEWS -- history of user-visible changes. 2008-03-10
2Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff 2Copyright (C) 2005, 2006, 2007, 2008 Sergey Poznyakoff
3See the end of file for copying conditions. 3See the end of file for copying conditions.
4 4
@@ -7,6 +7,66 @@ Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua>
7 7
8Version 4.3.90 (SVN) 8Version 4.3.90 (SVN)
9 9
10* The --domain option is withdrawn.
11
12This option was declared as deprecated in version 4.0. Now it is
13withdrawn and its short version (-D) is reused for another purpose
14(see -D option, below).
15
16* New command line options -D and -U
17
18Both options work like their m4 counterpars: the `-D' command line
19option defines a preprocessor symbol, the `-U' option undefines it.
20
21* Constant vs. variable shadowing
22
23In previous versions of mailfromd name clashes between constants and
24variables went unnoticed, which sometimes lead to hard-to-diagnose
25errors. This bug is fixed in this version. If a constant is defined
26which has the same name as a previously defined variable (the constant
27"shadows" the variable), the compiler prints the following diagnostic
28message:
29
30<file>:<line>: Warning: Constant name `name' clashes with a variable name
31<file>:<line>: Warning: This is the location of the previous definition
32
33A similar diagnostics is issued if a variable is defined whose name
34coincides with a previously defined constant (the variable "shadows"
35the constant).
36
37In any case, the %NAME notation refers to the last defined symbol, be
38it variable or constant.
39
40If a variable shadows a constant, the scope of the shadowing depends
41on the storage class of the variable. For automatic variables and
42function parameters, it ends with the final `done' closing the
43function. For global variables, it lasts up to the end of input.
44
45* Exception names.
46
47To minimize chances of name clashes, all symbolic exception codes has
48been renamed by prefixing them with the `e_', thus, e.g. `divzero'
49became `e_divzero', etc. The `ioerr' exception code is renamed to
50`e_io'.
51
52For consistency, the following most often used codes are available without
53the `e_' previx: success, not_found, failure, temp_failure.
54
55The use of old exception codes is still possible by defining a
56preprocessor symbol OLD_EXCEPTION_CODES, for example:
57
58 mailfromd -DOLD_EXCEPTION_CODES
59
60* match_dnsbl and match_rhsbl
61
62Both functions malfunctioned in versions from 4.0 up to 4.3.1 due to a
63name clash between the exception code `range' and their third
64argument. This is fixed.
65
66Additionally, previous versions of match_dnsbl silently ignored
67invalid first argument. Now, the e_invip exception is signalled in
68this case.
69
10 70
11Version 4.3.1, 2008-03-01 71Version 4.3.1, 2008-03-01
12 72
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 2ac69c35..10cbd2b9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -76,7 +76,7 @@ check-mflib:
76 76
77check-exceptions: 77check-exceptions:
78 @check-docs.sh exceptions \ 78 @check-docs.sh exceptions \
79 '/typedef enum mf_status_code {/,/^};/s/[ \t]*mf_\(.*\),.*/\1/p' \ 79 '/typedef enum mf_exception_code {/,/^};/s/[ \t]*mfe_\(.*\),.*/e_\1/p;/typedef enum mf_status_code {/,/^};/s/[ \t]*mf_\(.*\),.*/\1/p' \
80 's/@cindex \([^,][^,]*\), exception type/\1/p' \ 80 's/@cindex \([^,][^,]*\), exception type/\1/p' \
81 $(top_srcdir)/src/mailfromd.h -- \ 81 $(top_srcdir)/src/mailfromd.h -- \
82 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ 82 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi
index 27ff4c46..9cf4871e 100644
--- a/doc/mailfromd.texi
+++ b/doc/mailfromd.texi
@@ -184,6 +184,7 @@ Mail Filtering Language
184* begin/end:: 184* begin/end::
185* Functions:: Functions. 185* Functions:: Functions.
186* Expressions:: Expressions. 186* Expressions:: Expressions.
187* Shadowing:: Variable and Constant Shadowing.
187* Statements:: 188* Statements::
188* Conditionals:: Conditional Statements. 189* Conditionals:: Conditional Statements.
189* Loops:: Loop Statements. 190* Loops:: Loop Statements.
@@ -270,6 +271,7 @@ Command Line Options.
270 271
271* Operation Modifiers:: 272* Operation Modifiers::
272* General Settings:: 273* General Settings::
274* Preprocessor Options::
273* Timeout Control:: 275* Timeout Control::
274* Logging and Debugging Options:: 276* Logging and Debugging Options::
275* Informational Options:: 277* Informational Options::
@@ -1001,7 +1003,31 @@ the corresponding section below.
1001@node 43x-440 1003@node 43x-440
1002@section Upgrading from 4.3.x to 4.4 1004@section Upgrading from 4.3.x to 4.4
1003@cindex Upgrading from 4.3.x to 4.4 1005@cindex Upgrading from 4.3.x to 4.4
1004@UNREVISED{} 1006
1007 The deprecated @option{--domain} command line option has been
1008withdrawn. The short option @option{-D} now defines a preprocessor
1009symbol (@pxref{Preprocessor Options}).
1010
1011 This version correctly handles name clashes between constants and
1012variables, which remained unnoticed in previous releases.
1013@xref{variable--constant shadowing}, for a detailed description of it.
1014
1015 To minimize chances of name clashes, all symbolic exception codes has
1016been renamed by prefixing them with the @samp{e_}, thus, e.g. @code{divzero}
1017became @code{e_divzero}, etc. The @code{ioerr} exception code is renamed to
1018@code{e_io}. @xref{status.mfh}, for a full list of the new exception codes.
1019
1020@cindex @code{OLD_EXCEPTION_CODES}, preprocessor symbol
1021 For consistency, the following most often used codes are available without
1022the @samp{e_} previx: success, not_found, failure, temp_failure. This
1023makes most existing user scripts suitable for use with version 4.4
1024without any modification. If your script refers to any exception
1025codes other than these four, you can still use it by defining a
1026preprocessor symbol @code{OLD_EXCEPTION_CODES}, for example:
1027
1028@smallexample
1029$ mailfromd -DOLD_EXCEPTION_CODES
1030@end smallexample
1005 1031
1006@node 420-43x 1032@node 420-43x
1007@section Upgrading from 4.2 to 4.3.x 1033@section Upgrading from 4.2 to 4.3.x
@@ -3322,7 +3348,7 @@ done
3322@end group 3348@end group
3323@end smallexample 3349@end smallexample
3324 3350
3325 The intent was obviously to reject any mail if it comes from an 3351 The intent was obviously to reject any mail that came from an
3326address without a proper @code{PTR} record (@pxref{hostname 3352address without a proper @code{PTR} record (@pxref{hostname
3327function}). There is a serious error, however: @code{hostname} is not 3353function}). There is a serious error, however: @code{hostname} is not
3328a built-in function as it used to be in previous releases@footnote{Up to 3354a built-in function as it used to be in previous releases@footnote{Up to
@@ -3396,6 +3422,54 @@ echo sprintf ('Mail from %s', $f)
3396This does not limit the functionality, since there is no need to fall 3422This does not limit the functionality, since there is no need to fall
3397back to variable interpretation in format strings. 3423back to variable interpretation in format strings.
3398 3424
3425@anchor{variable--constant clashes}
3426Yet another dangerous feature of the language is the way to refer to
3427variable and constant names within literal strings. To expand a
3428variable or a constant the same notation is used: %@var{name}
3429(@xref{Variables}, and @pxref{Constants}). Now, lets consider the
3430following code:
3431
3432@smallexample