1dnssectools(3) User Contributed Perl Documentation dnssectools(3)
2
3
4
6 Net::DNS::SEC::Tools::dnssectools - General routines for the
7 DNSSEC-Tools package.
8
10 use Net::DNS::SEC::Tools::dnssectools;
11
12 dt_adminmail($subject,$msgbody,$recipient);
13
14 $zspath = dt_cmdpath('zonesigner');
15
16 $ftype = dt_findtype($path);
17
18 $seconds = dt_parse_duration("0w3d1h10m20s")
19
20 $rrset = dt_parse_zonefile(file => 'example.com');
21
23 The dnssectools module provides a general set of methods for use with
24 DNSSEC-Tools utilities.
25
27 The interfaces to the dnssectools module are given below.
28
29 dt_adminmail(subject,msgbody,recipient)
30 This routine emails a message to the administrative user listed in
31 the DNSSEC-Tools configuration file.
32
33 dt_adminmail() requires two parameters, both scalars. The subject
34 parameter is the subject for the mail message. The msgbody
35 parameter is the body of the mail message.
36
37 A third parameter, recipient, may be given to specify the message's
38 recipient. If this is not given, then the recipient will be taken
39 from the admin-email record of the DNSSEC-Tools configuration file.
40 If recipient is "nomail", then no message will be sent and success
41 will be returned.
42
43 Return values:
44
45 1 - the message was created and sent.
46 0 - an invalid recipient was specified.
47
48 It relies on the the following dnssec-tools.conf configuration
49 parameters:
50
51 admin-email
52 The email address that the mail should come from.
53
54 mailer-type
55 Should be one of: sendmail, smtp, qmail. This option is not
56 required and will default to trying sendmail and qmail to deliver
57 the mail. If mailer-server is set to a defined value but mailer-
58 type is not, then mailer-type will default to
59
60 mailer-server
61 The server, if admin-mail is set to smtp, that the mail should be
62 delivered to.
63
64 dt_cmdpath(command)
65 This routine returns the path to a specified DNSSEC-Tools command.
66 command should be the name only, without any leading directories.
67 The command name is checked to ensure that it is a valid DNSEC-
68 Tools command,
69
70 Return values:
71
72 The absolute path to the command is returned if the command
73 is valid.
74 Null is returned if the command is not valid.
75
76 dt_filetype(path)
77 This routine returns the type of the file named in path. The
78 rollrec and keyrec records contained therein are counted and a type
79 determination is made.
80
81 Return values:
82
83 "keyrec" - At least one keyrec record was found and no
84 rollrec records were found.
85
86 "rollrec" - At least one rollrec record was found and
87 no keyrec records were found.
88
89 "mixed" - At least one rollrec record and at least one
90 keyrec record were found.
91 This is most likely an erroneous file.
92
93 "unknown" - No rollrec records nor keyrec records
94 were found.
95
96 "nofile" - The specified file does not exist.
97
98 dt_parse_duration(string)
99 This routine translates a duration given in "1w2d3h4m5s" format and
100 returns the equivalent number of seconds, or undef if the duration
101 has an invalid format.
102
103 dt_parse_zonefile(options)
104 This routine parses a given zone file using the configured zone
105 file parser and returns an array reference containing the RRs.
106
107 The zone parser to be used depends on the setting of the zonefile-
108 parser configuration value. If this is not set, then the
109 Net::DNS::ZoneFile zone parser will be used (obsolete option: this
110 is the only currently supported parser).
111
113 Copyright 2006-2014 SPARTA, Inc. All rights reserved. See the COPYING
114 file included with the DNSSEC-Tools package for details.
115
117 Wayne Morrison, tewok@tislabs.com
118
120 Mail::Send.pm(3), Net::DNS::SEC::Tools::conf.pm(3)
121
122
123
124perl v5.30.0 2019-07-24 dnssectools(3)