.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "dnssectools 3" .TH dnssectools 3 2025-08-31 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Net::DNS::SEC::Tools::dnssectools \- General routines for the DNSSEC\-Tools package. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Net::DNS::SEC::Tools::dnssectools; \& \& dt_adminmail($subject,$msgbody,$recipient); \& \& $zspath = dt_cmdpath(\*(Aqzonesigner\*(Aq); \& \& $ftype = dt_findtype($path); \& \& $seconds = dt_parse_duration("0w3d1h10m20s") \& \& $rrset = dt_parse_zonefile(file => \*(Aqexample.com\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBdnssectools\fR module provides a general set of methods for use with DNSSEC\-Tools utilities. .SH INTERFACES .IX Header "INTERFACES" The interfaces to the \fBdnssectools\fR module are given below. .IP \fIdt_adminmail(subject,msgbody,recipient)\fR 4 .IX Item "dt_adminmail(subject,msgbody,recipient)" This routine emails a message to the administrative user listed in the DNSSEC\-Tools configuration file. .Sp \&\fR\f(BIdt_adminmail()\fR\fI\fR requires two parameters, both scalars. The \fIsubject\fR parameter is the subject for the mail message. The \fImsgbody\fR parameter is the body of the mail message. .Sp A third parameter, \fIrecipient\fR, may be given to specify the message\*(Aqs recipient. If this is not given, then the recipient will be taken from the \fIadmin\-email\fR record of the DNSSEC\-Tools configuration file. If \fIrecipient\fR is "nomail", then no message will be sent and success will be returned. .Sp Return values: .Sp .Vb 2 \& 1 \- the message was created and sent. \& 0 \- an invalid recipient was specified. .Ve .PP It relies on the the following dnssec\-tools.conf configuration parameters: .IP \fIadmin\-email\fR 4 .IX Item "admin-email" The email address that the mail should come from. .IP \fImailer\-type\fR 4 .IX Item "mailer-type" Should be one of: \fIsendmail, smtp, qmail\fR. This option is not required and will default to trying sendmail and qmail to deliver the mail. If \fImailer\-server\fR is set to a defined value but \fImailer\-type\fR is not, then \fImailer\-type\fR will default to .IP \fImailer\-server\fR 4 .IX Item "mailer-server" The server, if \fIadmin\-mail\fR is set to \fIsmtp\fR, that the mail should be delivered to. .IP \fIdt_cmdpath(command)\fR 4 .IX Item "dt_cmdpath(command)" This routine returns the path to a specified DNSSEC\-Tools command. \&\fIcommand\fR should be the name only, without any leading directories. The command name is checked to ensure that it is a valid DNSEC\-Tools command, .Sp Return values: .Sp .Vb 3 \& The absolute path to the command is returned if the command \& is valid. \& Null is returned if the command is not valid. .Ve .IP \fIdt_filetype(path)\fR 4 .IX Item "dt_filetype(path)" This routine returns the type of the file named in \fIpath\fR. The rollrec and keyrec records contained therein are counted and a type determination is made. .Sp Return values: .Sp .Vb 2 \& "keyrec" \- At least one keyrec record was found and no \& rollrec records were found. \& \& "rollrec" \- At least one rollrec record was found and \& no keyrec records were found. \& \& "mixed" \- At least one rollrec record and at least one \& keyrec record were found. \& This is most likely an erroneous file. \& \& "unknown" \- No rollrec records nor keyrec records \& were found. \& \& "nofile" \- The specified file does not exist. .Ve .IP \fIdt_parse_duration(string)\fR 4 .IX Item "dt_parse_duration(string)" This routine translates a duration given in "1w2d3h4m5s" format and returns the equivalent number of seconds, or undef if the duration has an invalid format. .IP \fIdt_parse_zonefile(options)\fR 4 .IX Item "dt_parse_zonefile(options)" This routine parses a given zone file using the configured zone file parser and returns an array reference containing the RRs. .Sp The zone parser to be used depends on the setting of the \&\fIzonefile\-parser\fR configuration value. If this is not set, then the \&\fBNet::DNS::ZoneFile\fR zone parser will be used (obsolete option: this is the only currently supported parser). .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2006\-2014 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC\-Tools package for details. .SH AUTHOR .IX Header "AUTHOR" Wayne Morrison, tewok@tislabs.com .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBMail::Send.pm\|(3)\fR, \&\fBNet::DNS::SEC::Tools::conf.pm\|(3)\fR