Permalink
Browse files

Fully qualify mailaddr in BIND export

if it isn't already
  • Loading branch information...
Matt Simerson
Matt Simerson committed Apr 9, 2013
1 parent d8c3b9b commit 463807c02cafa9ba05db16abaa70cc30c7921545
Showing with 5 additions and 1 deletion.
  1. +5 −1 server/lib/NicToolServer/Export/BIND.pm
@@ -244,7 +244,11 @@ sub zr_soa {
my ($self, $z) = @_;
# empty mailaddr makes BIND angry, set a default
- $z->{mailaddr} ||= 'hostmaster.' . $z->{zone};
+ $z->{mailaddr} ||= 'hostmaster.' . $z->{zone} . '.';
+ if ( '.' ne substr( $z->{mailaddr}, -1, 1) ) { # not fully qualified
+ $z->{mailaddr} = $self->{nte}->qualify( $z->{mailaddr} ); # append domain
+ $z->{mailaddr} .= '.'; # append trailing dot
+ };
# name ttl class rr name-server email-addr (sn ref ret ex min)
return "

0 comments on commit 463807c

Please sign in to comment.