diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-10-23 13:02:08 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-10-23 13:02:08 +0000 |
commit | 9e569139583178c7e1c35147cef3fd17493a11da (patch) | |
tree | 36defb2a0547176e1ad91b8fc653f5dc687c9da9 | |
parent | 80c8065d88f8c0621d6b690976dc675092db6509 (diff) | |
download | mailfromd-9e569139583178c7e1c35147cef3fd17493a11da.tar.gz mailfromd-9e569139583178c7e1c35147cef3fd17493a11da.tar.bz2 |
Reimplement syslog-async. Thanks Simon Kelley for relicensing it under GPLv3.
git-svn-id: file:///svnroot/mailfromd/trunk@1520 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 24 | ||||
-rw-r--r-- | configure.ac | 25 | ||||
-rw-r--r-- | doc/mailfromd.texi | 83 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/main.c | 69 | ||||
-rw-r--r-- | src/syslog_async.c | 413 | ||||
-rw-r--r-- | src/syslog_async.h | 126 |
8 files changed, 719 insertions, 32 deletions
@@ -1,3 +1,10 @@ | |||
1 | 2007-10-23 Sergey Poznyakoff <gray@gnu.org.ua> | ||
2 | |||
3 | * configure.ac, src/syslog_async.c, src/syslog_async.h, | ||
4 | src/main.c, src/Makefile.am: Reimplement syslog-async. Thanks | ||
5 | Simon Kelley for relicensing it under GPLv3. | ||
6 | * doc/mailfromd.texi, NEWS: Update | ||
7 | |||
1 | 2007-10-21 Sergey Poznyakoff <gray@gnu.org.ua> | 8 | 2007-10-21 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 9 | ||
3 | * src/dnsbase.c (cname_loop_body): Return TXT only if explicitly | 10 | * src/dnsbase.c (cname_loop_body): Return TXT only if explicitly |
@@ -1,17 +1,18 @@ | |||
1 | Mailfromd NEWS -- history of user-visible changes. 2007-09-11 | 1 | Mailfromd NEWS -- history of user-visible changes. 2007-10-23 |
2 | Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff | 2 | Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
5 | Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua> | 5 | Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua> |
6 | 6 | ||
7 | 7 | ||
8 | Version 4.1.1 (SVN) | 8 | Version 4.2 (SVN) |
9 | 9 | ||
10 | * Licensed under the GPLv3 | 10 | * Licensed under the GPLv3 |
11 | 11 | ||
12 | * Syslog-async code has been withdrawn, due to its incompatibility with | 12 | * New command line options --syslog-async and --no-syslog-async |
13 | the new license. The similar functionality will probably be introduced | 13 | |
14 | again when I write it. | 14 | These options allow to select the implementation of syslog to use |
15 | at run time. | ||
15 | 16 | ||
16 | * RFC 2821 compatibility | 17 | * RFC 2821 compatibility |
17 | 18 | ||
@@ -24,7 +25,7 @@ release. | |||
24 | * Sample threshold for `rate' function. | 25 | * Sample threshold for `rate' function. |
25 | 26 | ||
26 | The `rate' function takes an optional third argument allowing to | 27 | The `rate' function takes an optional third argument allowing to |
27 | specify the minimum number of received mails needed to obtain | 28 | specify the minimum number of received mails needed to obtain the |
28 | sending rate value. The default is 2, which is probably too | 29 | sending rate value. The default is 2, which is probably too |
29 | conservative. The following example raises it to 10: | 30 | conservative. The following example raises it to 10: |
30 | 31 | ||
@@ -32,6 +33,17 @@ conservative. The following example raises it to 10: | |||
32 | ... | 33 | ... |
33 | fi | 34 | fi |
34 | 35 | ||
36 | * mtasim is improved | ||
37 | |||
38 | In particular, it accepts MAIL FROM: and RCPT TO: without extra space | ||
39 | after the colon, as required by RFC. The milter interface is also | ||
40 | improved. | ||
41 | |||
42 | * The `resolve' function ignores TXT records. | ||
43 | |||
44 | In other words, resolve and primitive_resolve are guaranteed to return | ||
45 | either an A or a PTR record. | ||
46 | |||
35 | 47 | ||
36 | Version 4.1, 2007-06-11 | 48 | Version 4.1, 2007-06-11 |
37 | 49 | ||
diff --git a/configure.ac b/configure.ac index 885a804c..e49a654a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -16,8 +16,8 @@ | |||
16 | 16 | ||
17 | AC_PREREQ(2.59) | 17 | AC_PREREQ(2.59) |
18 | m4_define([MF_VERSION_MAJOR], 4) | 18 | m4_define([MF_VERSION_MAJOR], 4) |
19 | m4_define([MF_VERSION_MINOR], 1) | 19 | m4_define([MF_VERSION_MINOR], 2) |
20 | m4_define([MF_VERSION_PATCH], 1) | 20 | dnl m4_define([MF_VERSION_PATCH], 0) |
21 | AC_INIT([mailfromd], | 21 | AC_INIT([mailfromd], |
22 | MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), | 22 | MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH), |
23 | [bug-mailfromd@gnu.org.ua]) | 23 | [bug-mailfromd@gnu.org.ua]) |
@@ -124,9 +124,22 @@ AC_SUBST(lisp_LISP) | |||
124 | AM_GNU_GETTEXT([external], [need-formatstring-macros]) | 124 | AM_GNU_GETTEXT([external], [need-formatstring-macros]) |
125 | AM_GNU_GETTEXT_VERSION([0.16]) | 125 | AM_GNU_GETTEXT_VERSION([0.16]) |
126 | 126 | ||
127 | # Syslog -- removed due to version incompatibility | 127 | # Syslog |
128 | if test "${enable_syslog_async+set}" = set; then | 128 | AC_ARG_ENABLE([syslog-async], |
129 | AC_MSG_WARN([The option --enable-syslog-async is no longer supported.]) | 129 | AC_HELP_STRING([--enable-syslog-async], |
130 | [use non-blocking version of syslog by default]), | ||
131 | [case "${enableval}" in | ||
132 | yes) syslog_async=yes ;; | ||
133 | no) syslog_async=no ;; | ||
134 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-syslog-async]) ;; | ||
135 | esac],[syslog_async=no]) | ||
136 | |||
137 | AH_TEMPLATE([DEFAULT_SYSLOG_ASYNC], | ||
138 | [Define to 1 if syslog-async is being used by default]) | ||
139 | if test $syslog_async = "yes"; then | ||
140 | AC_DEFINE([DEFAULT_SYSLOG_ASYNC], [1]) | ||
141 | else | ||
142 | AC_DEFINE([DEFAULT_SYSLOG_ASYNC], [0]) | ||
130 | fi | 143 | fi |
131 | 144 | ||
132 | # Check for DBM flavor | 145 | # Check for DBM flavor |
@@ -560,7 +573,7 @@ Socket.................................... $socket | |||
560 | Expiration interval....................... $expire | 573 | Expiration interval....................... $expire |
561 | Negative DNS answer expiration interval... $negative_dns_expire | 574 | Negative DNS answer expiration interval... $negative_dns_expire |
562 | Rates expire interval..................... $rates_expire | 575 | Rates expire interval..................... $rates_expire |
563 | Syslog implementation..................... $syslog_flavor | 576 | Default syslog implementation............. $syslog_flavor |
564 | Readline (for mtasim)..................... $usereadline | 577 | Readline (for mtasim)..................... $usereadline |
565 | Documentation rendition type.............. $rendition | 578 | Documentation rendition type.............. $rendition |
566 | ******************************************************************* | 579 | ******************************************************************* |
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi index 078f722a..6aa44c6b 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi | |||
@@ -131,6 +131,7 @@ Sender Address Verification. | |||
131 | 131 | ||
132 | Building the Package | 132 | Building the Package |
133 | 133 | ||
134 | * 410-420:: Upgrading from 4.1 to 4.2 | ||
134 | * 400-410:: Upgrading from 4.0 to 4.1 | 135 | * 400-410:: Upgrading from 4.0 to 4.1 |
135 | * 31x-400:: Upgrading from 3.1.x to 4.0 | 136 | * 31x-400:: Upgrading from 3.1.x to 4.0 |
136 | * 30x-31x:: Upgrading from 3.0.x to 3.1 | 137 | * 30x-31x:: Upgrading from 3.0.x to 3.1 |
@@ -885,7 +886,7 @@ Expiration settings can be changed at run time using | |||
885 | 886 | ||
886 | @cindex enable-syslog-async, @option{--enable-syslog-async}, @command{configure} option | 887 | @cindex enable-syslog-async, @option{--enable-syslog-async}, @command{configure} option |
887 | @cindex syslog, non-blocking | 888 | @cindex syslog, non-blocking |
888 | @item Select @command{syslog} implementation to use. | 889 | @item Select a @command{syslog} implementation to use. |
889 | 890 | ||
890 | @anchor{syslog-async} | 891 | @anchor{syslog-async} |
891 | @command{Mailfromd} uses @code{syslog} for diagnostics output. The | 892 | @command{Mailfromd} uses @code{syslog} for diagnostics output. The |
@@ -896,7 +897,7 @@ result, when an application calls @code{syslog()}, and | |||
896 | the application will hang. | 897 | the application will hang. |
897 | 898 | ||
898 | @cindex Simon Kelley | 899 | @cindex Simon Kelley |
899 | In the case of a daemon as @command{mailfromd}, it is more important | 900 | For @command{mailfromd}, as for any daemon, it is more important |
900 | that it continue to run, than that it continue to log. For this | 901 | that it continue to run, than that it continue to log. For this |
901 | purpose, @command{mailfromd} is shipped with a non-blocking | 902 | purpose, @command{mailfromd} is shipped with a non-blocking |
902 | @code{syslog} implementation by Simon Kelley. This implementation, | 903 | @code{syslog} implementation by Simon Kelley. This implementation, |
@@ -908,8 +909,12 @@ lines are lost, this fact is logged with a message of the form: | |||
908 | async_syslog overflow: 5 log entries lost | 909 | async_syslog overflow: 5 log entries lost |
909 | @end smallexample | 910 | @end smallexample |
910 | 911 | ||
911 | To enable non-blocking @command{syslog}, use the | 912 | You can select which implementation to run when starting |
912 | @option{--enable-syslog-async} command line option: | 913 | @command{mailfromd}, by using @option{--syslog-async} or |
914 | @option{--no-syslog-async} command line options | ||
915 | (@pxref{Logging and Debugging}). When configuring, you can set | ||
916 | the asynchronous syslog as the @emph{default} syslog implementation, | ||
917 | using the @option{--enable-syslog-async} command line option: | ||
913 | 918 | ||
914 | @smallexample | 919 | @smallexample |
915 | ./configure --enable-syslog-async | 920 | ./configure --enable-syslog-async |
@@ -945,7 +950,7 @@ Socket.................................... mailfrom | |||
945 | Expiration interval....................... 86400 | 950 | Expiration interval....................... 86400 |
946 | Negative DNS answer expiration interval... 3600 | 951 | Negative DNS answer expiration interval... 3600 |
947 | Rates expire interval..................... 300 | 952 | Rates expire interval..................... 300 |
948 | Syslog implementation..................... blocking | 953 | Default syslog implementation............. blocking |
949 | Readline (for mtasim)..................... yes | 954 | Readline (for mtasim)..................... yes |
950 | Documentation rendition type.............. PROOF | 955 | Documentation rendition type.............. PROOF |
951 | ******************************************************************* | 956 | ******************************************************************* |
@@ -969,6 +974,7 @@ the corresponding section below. | |||
969 | @end enumerate | 974 | @end enumerate |
970 | 975 | ||
971 | @menu | 976 | @menu |
977 | * 410-420:: Upgrading from 4.1 to 4.2 | ||
972 | * 400-410:: Upgrading from 4.0 to 4.1 | 978 | * 400-410:: Upgrading from 4.0 to 4.1 |
973 | * 31x-400:: Upgrading from 3.1.x to 4.0 | 979 | * 31x-400:: Upgrading from 3.1.x to 4.0 |
974 | * 30x-31x:: Upgrading from 3.0.x to 3.1 | 980 | * 30x-31x:: Upgrading from 3.0.x to 3.1 |
@@ -976,6 +982,22 @@ the corresponding section below. | |||
976 | * 1x-2x:: Upgrading from 1.x to 2.x | 982 | * 1x-2x:: Upgrading from 1.x to 2.x |
977 | @end menu | 983 | @end menu |
978 | 984 | ||
985 | @node 410-420 | ||
986 | @section Upgrading from 4.1 to 4.2 | ||
987 | @cindex Upgrading from 4.1 to 4.2 | ||
988 | @UNREVISED{} | ||
989 | Upgrading to this version does not require any special efforts. You | ||
990 | can use your configuration files and filter scripts without any | ||
991 | changes. The only difference worth noticing is that starting from this | ||
992 | version @command{mailfromd} is always compiled with asynchronous | ||
993 | syslog implementation. The @option{--enable-syslog-async} |