Suggested patches for Next NicTool Version

Started by LogicX, December 16, 2004, 01:43:12 AM

Previous topic - Next topic

LogicX

I'd like to begin compiling all relevant patches, document fixes, etc. here for matt to review and approve for the next version of NicTool.

If you'd like this handled differently Matt, please let me know.  I want to make this as organized and uncomplicated as possible.

NicTool Client

NicTool Server

NicTool Contrib

Rob Lensen's install.pl patch to fix simple things to make it execute: http://inferno.fuzz.nl/install.pl.patch" target="_blank">here
and to make the loguser specified be effective: http://inferno.fuzz.nl/log-run.patch" target="_blank">here

--- May this post be indexed by spiders, and archived for all to see as my internet epitaph.
http://fpux.com" target="_blank">http://fpux.com

matt

This is as good a place as any.

On the install.pl thing, Rob's patch is OK but I wouldn't bother adding it to CVS.  What I'd rather see instead is updating install.pl so that you run it with no arguments and it prompts you through the values necessary, offering defaults along the way.  This can very easily be done by dropping in my get_answer sub from Mail::Toaster::Utility.

Also know that I've added a nictool sub to Mail::Toaster::Setup. It's very rudimentary right now but it'll slowly mature as each time I install NicTool I add a few more features to it.

Matt

etherealnet

spf patch for NicToolServer/Zone/Record/Sanity.pm. Allows for creation of spf records. Will check for colons in the address as well and replace with octal value.

--- Sanity.pm.dist      2005-03-24 17:07:23.750131888 -0500
+++ Sanity.pm   2005-03-25 11:49:33.906392304 -0500
@@ -114,7 +114,7 @@
            push(@{ $self->{'error_messages'} }, "absolute host names are NOT allowed. Remove the dot and the host will automatically livewithin the current zone.");
        }
    }
-    if ($data->{'address'}!~/in-addr\.arpa\.$/i and $data->{'address'} =~ /\//){
+    if ($data->{'address'}!~/in-addr\.arpa\.$/i and $data->{'address'}!~/^v=spf1/i and $data->{'address'} =~ /\//){
        $self->{'errors'}->{'address'} = 1;
        push(@{ $self->{'error_messages'} }, "invalid character in record address '/'.  Not allowed in non-reverse-lookup addresses");

@@ -125,6 +125,11 @@
               push(@{ $self->{'error_messages'} }, "invalid character in record address -- $1");
        };
    }
+
+#colons break things, replace them with their octal value
+    if($data->{'address'} =~ /:/) {
+       $data->{'address'} =~ s/:/\\072/g;
+       }

    if($data->{'type'}){
        $data->{'type'} =~ tr/a-z/A-Z/; # make form input upper case, so following checks catch

matt

The SPF patch is added as of NicToolServer 2.03.  Did I check here first to see your patch?  No, I re-invented the wheel. Shame on Matt.  Anyway, SFP records are officially supported