aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-10-23 13:02:08 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-10-23 13:02:08 +0000
commit9e569139583178c7e1c35147cef3fd17493a11da (patch)
tree36defb2a0547176e1ad91b8fc653f5dc687c9da9
parent80c8065d88f8c0621d6b690976dc675092db6509 (diff)
downloadmailfromd-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--ChangeLog7
-rw-r--r--NEWS24
-rw-r--r--configure.ac25
-rw-r--r--doc/mailfromd.texi83
-rw-r--r--src/Makefile.am4
-rw-r--r--src/main.c69
-rw-r--r--src/syslog_async.c413
-rw-r--r--src/syslog_async.h126
8 files changed, 719 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 053fa59c..c47d8ed7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12007-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
12007-10-21 Sergey Poznyakoff <gray@gnu.org.ua> 82007-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
diff --git a/NEWS b/NEWS
index fba2e9ff..578b9670 100644
--- a/NEWS
+++ b/NEWS
@@ -1,17 +1,18 @@
1Mailfromd NEWS -- history of user-visible changes. 2007-09-11 1Mailfromd NEWS -- history of user-visible changes. 2007-10-23
2Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff 2Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff
3See the end of file for copying conditions. 3See the end of file for copying conditions.
4 4
5Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua> 5Please send mailfromd bug reports to <bug-mailfromd@gnu.org.ua>
6 6
7 7
8Version 4.1.1 (SVN) 8Version 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
13the new license. The similar functionality will probably be introduced 13
14again when I write it. 14These options allow to select the implementation of syslog to use
15at 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
26The `rate' function takes an optional third argument allowing to 27The `rate' function takes an optional third argument allowing to
27specify the minimum number of received mails needed to obtain 28specify the minimum number of received mails needed to obtain the
28sending rate value. The default is 2, which is probably too 29sending rate value. The default is 2, which is probably too
29conservative. The following example raises it to 10: 30conservative. 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
38In particular, it accepts MAIL FROM: and RCPT TO: without extra space
39after the colon, as required by RFC. The milter interface is also
40improved.
41
42* The `resolve' function ignores TXT records.
43
44In other words, resolve and primitive_resolve are guaranteed to return
45either an A or a PTR record.
46
35 47
36Version 4.1, 2007-06-11 48Version 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
17AC_PREREQ(2.59) 17AC_PREREQ(2.59)
18m4_define([MF_VERSION_MAJOR], 4) 18m4_define([MF_VERSION_MAJOR], 4)
19m4_define([MF_VERSION_MINOR], 1) 19m4_define([MF_VERSION_MINOR], 2)
20m4_define([MF_VERSION_PATCH], 1) 20dnl m4_define([MF_VERSION_PATCH], 0)
21AC_INIT([mailfromd], 21AC_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)
124AM_GNU_GETTEXT([external], [need-formatstring-macros]) 124AM_GNU_GETTEXT([external], [need-formatstring-macros])
125AM_GNU_GETTEXT_VERSION([0.16]) 125AM_GNU_GETTEXT_VERSION([0.16])
126 126
127# Syslog -- removed due to version incompatibility 127# Syslog
128if test "${enable_syslog_async+set}" = set; then 128AC_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
137AH_TEMPLATE([DEFAULT_SYSLOG_ASYNC],
138 [Define to 1 if syslog-async is being used by default])
139if test $syslog_async = "yes"; then
140 AC_DEFINE([DEFAULT_SYSLOG_ASYNC], [1])
141else
142 AC_DEFINE([DEFAULT_SYSLOG_ASYNC], [0])
130fi 143fi
131 144
132# Check for DBM flavor 145# Check for DBM flavor
@@ -560,7 +573,7 @@ Socket.................................... $socket
560Expiration interval....................... $expire 573Expiration interval....................... $expire
561Negative DNS answer expiration interval... $negative_dns_expire 574Negative DNS answer expiration interval... $negative_dns_expire
562Rates expire interval..................... $rates_expire 575Rates expire interval..................... $rates_expire
563Syslog implementation..................... $syslog_flavor 576Default syslog implementation............. $syslog_flavor
564Readline (for mtasim)..................... $usereadline 577Readline (for mtasim)..................... $usereadline
565Documentation rendition type.............. $rendition 578Documentation 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
132Building the Package 132Building 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
896the application will hang. 897the 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
900that it continue to run, than that it continue to log. For this 901that it continue to run, than that it continue to log. For this
901purpose, @command{mailfromd} is shipped with a non-blocking 902purpose, @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
916the asynchronous syslog as the @emph{default} syslog implementation,
917using 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
945Expiration interval....................... 86400 950Expiration interval....................... 86400
946Negative DNS answer expiration interval... 3600 951Negative DNS answer expiration interval... 3600
947Rates expire interval..................... 300 952Rates expire interval..................... 300
948Syslog implementation..................... blocking 953Default syslog implementation............. blocking
949Readline (for mtasim)..................... yes 954Readline (for mtasim)..................... yes
950Documentation rendition type.............. PROOF 955Documentation 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
990can use your configuration files and filter scripts without any
991changes. The only difference worth noticing is that starting from this
992version @command{mailfromd} is always compiled with asynchronous
993syslog implementation. The @option{--enable-syslog-async}