aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-01-03 12:40:52 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-01-03 12:40:52 +0200
commitc70f5d055d37bba1b26beafec8bfee902dc1b758 (patch)
tree7f7c140369fbab7c9d37765eec814e2fb81cf7fc
parent33f88906896d016ebd4e387ddc7a29c9f6c0dbc7 (diff)
downloadmailfromd-c70f5d055d37bba1b26beafec8bfee902dc1b758.tar.gz
mailfromd-c70f5d055d37bba1b26beafec8bfee902dc1b758.tar.bz2
Version 8.7release_8_7
* NEWS: Update. * configure.ac: Raise minor version. * doc/functions.texi: Document new functions Include the implementation of the NS resolving MFL functions, as proposed by Jan Rafaj * lib/dns.c (ns_lookup): New function. * lib/dns.h (ns_lookup): New proto. * mflib/dns.mf4 (hasns): New function. * src/builtin/dns.bi (primitive_hasns, getns): New functions.
-rw-r--r--NEWS23
-rw-r--r--configure.ac4
-rw-r--r--doc/functions.texi100
-rw-r--r--lib/dns.c30
-rw-r--r--lib/dns.h2
-rw-r--r--mflib/dns.mf413
-rw-r--r--src/builtin/dns.bi84
7 files changed, 216 insertions, 40 deletions
diff --git a/NEWS b/NEWS
index bc239bd3..86f6c7a9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,9 @@
1Mailfromd NEWS -- history of user-visible changes. 2018-11-12 1Mailfromd NEWS -- history of user-visible changes. 2019-01-03
2See the end of file for copying conditions. 2See the end of file for copying conditions.
3 3
4Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua> 4Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua>
5 5
6Version 8.6.90 (Git) 6Version 8.7, 2019-01-03
7 7
8* The --callout-socket option 8* The --callout-socket option
9 9
@@ -15,6 +15,25 @@ overrides.
15This option is used by mtasim to avoid clobbering the existing callout 15This option is used by mtasim to avoid clobbering the existing callout
16sockets when starting new mailfromd instance. 16sockets when starting new mailfromd instance.
17 17
18* NS lookup NFL functions
19
20This release implements the following new MFL functions:
21
22number primitive_hasns (string DOM)
23 Returns 1 if the domain DOM has at least one NS record and 0
24 otherwise. Throws an error if DNS lookup fails.
25
26require 'dns'
27number hasns (string DOM)
28 Same as above, but returns 0 on DNS lookup failures.
29
30string getns (string DOM ; number RESOLVE, number SORT)
31
32 Returns a whitespace-separated list of all the NS records for
33 the domain DOM. If optional parameter RESOLVE is 1, the returned list
34 contains IP addresses. Optional SORT controls whether the entries are
35 sorted.
36
18* Bugfixes 37* Bugfixes
19** Callout functions return true on checking the null return address (<>) 38** Callout functions return true on checking the null return address (<>)
20** Arguments in transaction between mailfromd and calloutd are quoted 39** Arguments in transaction between mailfromd and calloutd are quoted
diff --git a/configure.ac b/configure.ac
index 3585d967..54c9ebd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,8 +16,8 @@
16 16
17AC_PREREQ(2.63) 17AC_PREREQ(2.63)
18m4_define([MF_VERSION_MAJOR], 8) 18m4_define([MF_VERSION_MAJOR], 8)
19m4_define([MF_VERSION_MINOR], 6) 19m4_define([MF_VERSION_MINOR], 7)
20m4_define([MF_VERSION_PATCH], 90) 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],
diff --git a/doc/functions.texi b/doc/functions.texi
index 75eed904..d25911aa 100644
--- a/doc/functions.texi
+++ b/doc/functions.texi
@@ -5,7 +5,10 @@
5@c Invariant Sections, with the Front and Back-Cover texts at your option. 5@c Invariant Sections, with the Front and Back-Cover texts at your option.
6 6
7 This chapter describes library functions available in Mailfromd 7 This chapter describes library functions available in Mailfromd
8version @value{VERSION}. 8version @value{VERSION}. For the simplicity of explanation, we use
9the word @samp{boolean} to indicate variables of numeric type that are
10used as boolean values. For such variables, the term @samp{False}
11stands for the numeric 0, and @samp{True} for any non-zero value.
9 12
10@menu 13@menu
11* Macro access:: 14* Macro access::
@@ -65,7 +68,7 @@ macro names programmatically, e.g.:
65@end smallexample 68@end smallexample
66@end deftypefn 69@end deftypefn
67 70
68@deftypefn {Built-in Function} number macro_defined (string @var{name}) 71@deftypefn {Built-in Function} boolean macro_defined (string @var{name})
69Return true if Sendmail macro @var{name} is defined. 72Return true if Sendmail macro @var{name} is defined.
70@end deftypefn 73@end deftypefn
71 74
@@ -602,7 +605,7 @@ is returned otherwise. In the latter case, the global variable
602@code{ctype_mismatch} is set to the index of the first character that 605@code{ctype_mismatch} is set to the index of the first character that
603is outside of the character class (characters are indexed from 0). 606is outside of the character class (characters are indexed from 0).
604 607
605@deftypefn {Built-in Function} number isalnum (string @var{str}) 608@deftypefn {Built-in Function} boolean isalnum (string @var{str})
606Checks for alphanumeric characters: 609Checks for alphanumeric characters:
607 610
608@smallexample 611@smallexample
@@ -611,7 +614,7 @@ Checks for alphanumeric characters:
611@end smallexample 614@end smallexample
612@end deftypefn 615@end deftypefn
613 616
614@deftypefn {Built-in Function} number isalpha (string @var{str}) 617@deftypefn {Built-in Function} boolean isalpha (string @var{str})
615Checks for an alphabetic character: 618Checks for an alphabetic character:
616 619
617@smallexample 620@smallexample
@@ -620,7 +623,7 @@ Checks for an alphabetic character:
620@end smallexample 623@end smallexample
621@end deftypefn 624@end deftypefn
622 625
623@deftypefn {Built-in Function} number isascii (string @var{str}) 626@deftypefn {Built-in Function} boolean isascii (string @var{str})
624Checks whether all characters in @var{str} are 7-bit ones, that fit into 627Checks whether all characters in @var{str} are 7-bit ones, that fit into
625the @acronym{ASCII} character set. 628the @acronym{ASCII} character set.
626 629
@@ -630,47 +633,47 @@ the @acronym{ASCII} character set.
630@end smallexample 633@end smallexample
631@end deftypefn 634@end deftypefn
632 635
633@deftypefn {Built-in Function} number isblank (string @var{str}) 636@deftypefn {Built-in Function} boolean isblank (string @var{str})
634Checks if @var{str} contains only blank characters; that is, spaces or 637Checks if @var{str} contains only blank characters; that is, spaces or
635tabs. 638tabs.
636@end deftypefn 639@end deftypefn
637 640
638@deftypefn {Built-in Function} number iscntrl (string @var{str}) 641@deftypefn {Built-in Function} boolean iscntrl (string @var{str})
639Checks for control characters. 642Checks for control characters.
640@end deftypefn 643@end deftypefn
641 644
642@deftypefn {Built-in Function} number isdigit (string @var{str}) 645@deftypefn {Built-in Function} boolean isdigit (string @var{str})
643Checks for digits (0 through 9). 646Checks for digits (0 through 9).
644@end deftypefn 647@end deftypefn
645 648
646@deftypefn {Built-in Function} number isgraph (string @var{str}) 649@deftypefn {Built-in Function} boolean isgraph (string @var{str})
647Checks for any printable characters except spaces. 650Checks for any printable characters except spaces.
648@end deftypefn 651@end deftypefn
649 652
650@deftypefn {Built-in Function} number islower (string @var{str}) 653@deftypefn {Built-in Function} boolean islower (string @var{str})
651Checks for lower-case characters. 654Checks for lower-case characters.
652@end deftypefn 655@end deftypefn
653 656
654@deftypefn {Built-in Function} number isprint (string @var{str}) 657@deftypefn {Built-in Function} boolean isprint (string @var{str})
655Checks for printable characters including space. 658Checks for printable characters including space.
656@end deftypefn 659@end deftypefn
657 660
658@deftypefn {Built-in Function} number ispunct (string @var{str}) 661@deftypefn {Built-in Function} boolean ispunct (string @var{str})
659Checks for any printable characters which are not a spaces or 662Checks for any printable characters which are not a spaces or
660alphanumeric characters. 663alphanumeric characters.
661@end deftypefn 664@end deftypefn
662 665
663@deftypefn {Built-in Function} number isspace (string @var{str}) 666@deftypefn {Built-in Function} boolean isspace (string @var{str})
664Checks for white-space characters, i.e.: space, form-feed (@samp{\f}), 667Checks for white-space characters, i.e.: space, form-feed (@samp{\f}),
665newline (@samp{\n}), carriage return (@samp{\r}), horizontal tab 668newline (@samp{\n}), carriage return (@samp{\r}), horizontal tab
666(@samp{\t}), and vertical tab (@samp{\v}). 669(@samp{\t}), and vertical tab (@samp{\v}).
667@end deftypefn 670@end deftypefn
668 671
669@deftypefn {Built-in Function} number isupper (string @var{str}) 672@deftypefn {Built-in Function} boolean isupper (string @var{str})
670Checks for uppercase letters. 673Checks for uppercase letters.
671@end deftypefn 674@end deftypefn
672 675
673@deftypefn {Built-in Function} number isxdigit (string @var{str}) 676@deftypefn {Built-in Function} boolean isxdigit (string @var{str})
674Checks for hexadecimal digits, i.e. one of @samp{0}, @samp{1}, 677Checks for hexadecimal digits, i.e. one of @samp{0}, @samp{1},
675@samp{2}, @samp{3}, @samp{4}, @samp{5}, @samp{6}, @samp{7}, @samp{8}, 678@samp{2}, @samp{3}, @samp{4}, @samp{5}, @samp{6}, @samp{7}, @samp{8},
676@samp{9}, @samp{a}, @samp{b}, @samp{c}, @samp{d}, @samp{e}, @samp{f}, 679@samp{9}, @samp{a}, @samp{b}, @samp{c}, @samp{d}, @samp{e}, @samp{f},
@@ -717,7 +720,7 @@ email address.
717@end deftypefn 720@end deftypefn
718 721
719@deftypefn {Library Function} boolean email_valid (string @var{email}) 722@deftypefn {Library Function} boolean email_valid (string @var{email})
720 Returns @var{True} if @var{email} is a valid email address, 723 Returns @samp{True} (1) if @var{email} is a valid email address,
721consisting of local and domain parts only. E.g.: 724consisting of local and domain parts only. E.g.:
722 725
723@smallexample 726@smallexample
@@ -1704,7 +1707,7 @@ compativbility.
1704 These functions are defined in the module @file{poll.mf}, which you 1707 These functions are defined in the module @file{poll.mf}, which you
1705must require prior to using any of them. 1708must require prior to using any of them.
1706 1709
1707@deftypefn {Library Function} number _pollhost @ 1710@deftypefn {Library Function} boolean _pollhost @
1708 (string @var{ip}, string @var{email}, string @var{domain}, @