Sponsored Content
Top Forums Shell Programming and Scripting Want to automate some DNS checks Post 302972877 by pica on Wednesday 11th of May 2016 10:53:12 AM
Old 05-11-2016
Thanks for the response!!
Here's what I have so far. I don't yet know the syntax so I'm just trying to write something that seems reasonable.
Code:
#!/bin/bash

echo Please, enter a domain name.
read DOMAIN

dig $DOMAIN NS
dig $DOMAIN TXT

dig k1._domainkey.$DOMAIN TXT
dig _domainkey.$DOMAIN TXT

---------- Post updated at 07:46 AM ---------- Previous update was at 07:38 AM ----------

Any suggestions on what I should do next? I realize I have to learn Bash script syntax but does the basic logic seem reasonable? I know it's a bit simplistic but I figure I should get something to work for my first script and then add features later...

---------- Post updated at 07:53 AM ---------- Previous update was at 07:46 AM ----------

Wow, actually, my script worked. I'm shocked. It's not fancy but it basically did what i wanted. I have to improve it for sure.

Last edited by RudiC; 05-11-2016 at 11:43 AM.. Reason: Changed icode to code tags.
 

10 More Discussions You Might Find Interesting

1. Solaris

Solaris DNS Client For Microsoft DNS Server

hey guys, how to add soalris box as a microsoft DNS Client ? and how to register in the microsoft DNS ?? i managed to query from the DNS server after adding /etc/resolve.conf and editing /etc/nsswitch.conf but i need to register the soalris server (dns Client) into Microsoft DNS automatically.... (3 Replies)
Discussion started by: mduweik
3 Replies

2. UNIX for Dummies Questions & Answers

health checks

Hello Anyone please help me with a health check script on HP-UX. (1 Reply)
Discussion started by: mahlathini
1 Replies

3. UNIX for Advanced & Expert Users

Doing Checks on a file

I have a process that I am trying to provide a solution for and have hit a brick wall and would like some pointers in the right direction. Basically on a daily basis a report is automatically generated in a CSV format (FIRST.CSV) which includes codes and amounts in the following format: ... (6 Replies)
Discussion started by: SAMZ
6 Replies

4. AIX

Pre-checks

AIX Guys!!! What pre-checks would you do on a 5.3 server before TL/SP/APAR installation? Bala (2 Replies)
Discussion started by: balaji_prk
2 Replies

5. UNIX for Advanced & Expert Users

DNS server choice: Windows DNS vs Linux BIND

I'd like to get some opnions on choosing DNS server: Windows DNS vs Linux BIND comparrsion: 1) managment, easy of use 2) Security 3) features 4) peformance 5) ?? I personally prefer Windows DNS server for management, it supports GUI and command line. But I am not sure about security... (2 Replies)
Discussion started by: honglus
2 Replies

6. Red Hat

DNS A-Record point to another DNS

Hi, I have a question on how to point the DNS server-1's A-record to second DNS server, which is DNS server-2. So, the computer can access other domain which only listed in the DNS server-2. The scenario is as follow: http://img689.imageshack.us/img689/6333/12234.png How to configure this... (4 Replies)
Discussion started by: Paris Heng
4 Replies

7. Red Hat

DHCP & DNS - Clients get IP but don't register in DNS

I am trying to setup a CentOS 6.2 server that will be doing 3 things DHCP, DNS & Samba for a very small office (2 users). The idea being this will replace a very old Win2k server. The users are all windows based clients so only the server will be Linux based. I've installed CentOS 6.2 with... (4 Replies)
Discussion started by: FireBIade
4 Replies

8. Shell Programming and Scripting

Daily Checks

Hey Guys, I'm seeking some assistance in getting this script to run as a cron job for the user oracle.. the script is basically to perform 2 ADRCI checks... see the script below... i'm getting the following error: /export/home/oracle/Daily_Checks/ADRCI_Daily_Checks.sh: syntax error at line 16:... (7 Replies)
Discussion started by: Racegod
7 Replies

9. Shell Programming and Scripting

Script to do the following checks

Hi , I need a script for processing below scenario. I have to check daily by doing ftp IP to check it is logging or not. So i want this activity to be automated such that if login succesful i will get "FTP LOGIN SUCCESS" in a log file and if fails i want the error message in the same log... (1 Reply)
Discussion started by: sv0081493
1 Replies

10. Solaris

DNS client added to DNS server but not working

Hi, We have built a new server (RHEL VM)and added that IP/hostname into dns zone configs file on DNS server (Solaris 10). Reloaded the configuration using and added nameserver into resolv.conf on client. But when I am trying nslookup, its not getting resolved. The nameserver is not able to... (8 Replies)
Discussion started by: snchaudhari2
8 Replies
Mail::DKIM::AuthorDomainPolicy(3)			User Contributed Perl Documentation			 Mail::DKIM::AuthorDomainPolicy(3)

NAME
Mail::DKIM::AuthorDomainPolicy - represents an Author Domain Signing Practices (ADSP) record DESCRIPTION
The Author Domain Signing Policies (ADSP) record can be published by any domain to help a receiver know what to do when it encounters an unsigned message claiming to originate from that domain. The record is published as a DNS TXT record at _adsp._domainkey.DOMAIN where DOMAIN is the domain of the message's "From" address. More details about this record can be found by reading the specification itself at <http://tools.ietf.org/html/rfc5617>. CONSTRUCTORS
fetch() Lookup an ADSP record in DNS. my $policy = Mail::DKIM::AuthorDomainPolicy->fetch( Protocol => "dns", Author => 'jsmith@example.org', ); If the ADSP record is found and appears to be valid, an object containing that record's information will be constructed and returned. If the ADSP record is blank or simply does not exist, an object representing the default policy will be returned instead. (See also "is_implied_default_policy()".) If a DNS error occurs (e.g. SERVFAIL or time-out), this method will "die". new() Construct a default policy object. my $policy = Mail::DKIM::AuthorDomainPolicy->new; parse() Construct an ADSP record from a string. my $policy = Mail::DKIM::AuthorDomainPolicy->parse( String => "dkim=all", Domain => "aaa.example", ); METHODS
apply() Apply the policy to the results of a DKIM verifier. my $result = $policy->apply($dkim_verifier); The caller must provide an instance of Mail::DKIM::Verifier, one which has already been fed the message being verified. Possible results are: accept The message is approved by the sender signing policy. reject The message is rejected by the sender signing policy. It can be considered very suspicious. neutral The message is neither approved nor rejected by the sender signing policy. It can be considered somewhat suspicious. Note: in the future, these values may become: none - no ADSP record is published pass - a passing signature is present fail - ADSP record is "all" and no passing signature is found discard - ADSP record is "discardable" and no passing signature is found nxdomain - the DNS domain does not exist temperror - transient error occurred permerror - non-transient error occurred is_implied_default_policy() Tells whether this policy implied. my $is_implied = $policy->is_implied_default_policy; If you fetch the policy for a particular domain, but that domain does not have a policy published, then the "default policy" is in effect. Use this method to detect when that happens. location() Tells where the policy was fetched from. If the policy is domain-wide, this will be domain where the policy was published. If the policy is user-specific, TBD. If nothing is published for the domain, and the default policy was returned instead, the location will be "undef". policy() Get or set the outbound signing policy (dkim=) tag. my $sp = $policy->policy; Outbound signing policy for the entity. Possible values are: "unknown" The default. The entity may sign some or all email. "all" All mail from the domain is expected to be signed, using a valid Author signature, but the author does not suggest discarding mail without a valid signature. "discardable" All mail from the domain is expected to be signed, using a valid Author signature, and the author is so confident that non-signed mail claiming to be from this domain can be automatically discarded by the recipient's mail server. "NXDOMAIN" The domain is out of scope, i.e., the domain does not exist in the DNS. signall() True if policy is "all". signall_discardable() True if policy is "strict". BUGS
o Section 4.3 of the specification says to perform a query on the domain itself just to see if it exists. This class is not currently doing that, i.e. it might report NXDOMAIN because _adsp._domainkey.example.org is nonexistent, but it should not be treated the same as example.org being nonexistent. AUTHOR
Jason Long, <jlong@messiah.edu> COPYRIGHT AND LICENSE
Copyright (C) 2006-2009 by Messiah College This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. perl v5.12.1 2010-01-23 Mail::DKIM::AuthorDomainPolicy(3)
All times are GMT -4. The time now is 11:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy