#2 DNS options

closed-fixed
nobody
5
2005-09-20
2005-09-12
Perry
No

I would like to see a TXT record option for the dns
server. This is kind of important for SPF checks on
domains. If the SPF don't find what it want in the TXT
record mails from that domain can not be validated as a
forged or real mail address.

Thanks

Perry

Discussion

  • Corey
    Corey
    2005-09-12

    Logged In: YES
    user_id=1066333

    I will be able to do this a lot quicker if you can give me
    an example of a bind zone file with a working TXT record.

    If not, I'll have to postpone this.

     
  • Corey
    Corey
    2005-09-12

    • status: open --> open-accepted
     
  • Perry
    Perry
    2005-09-12

    Logged In: YES
    user_id=1343027

    Attaching my own zone file from a testing server... sorry
    about all the mess in the zone file but it is part of a
    dynamic dns setup..

    The TXT record is located on the bottom line.

     
  • Perry
    Perry
    2005-09-12

    zone file with the TXT record

     
    Attachments
  • Perry
    Perry
    2005-09-12

    Logged In: YES
    user_id=1343027

    if you need some info about the SPF "record" here is a link
    http://www.zytrax.com/books/dns/ch9/spf.html

     
  • Perry
    Perry
    2005-09-12

    Logged In: YES
    user_id=1343027

    Sorry, but there is an error in that file.

    centos TXT v=spf1 ip4:192.168.1.251 a mx ptr
    include:langerud-vingrom.net -all

    it should be

    centos TXT "v=spf1 ip4:192.168.1.251 a mx ptr
    include:langerud-vingrom.net -all"

    I've edited the php files so that they make it possible to
    add a TXT record to the db, but I'm not sure how to make the
    rehash_named file insert the TXT record in the zone file. Do
    you have a quick/dirty solution on that?

     
  • Corey
    Corey
    2005-09-12

    Logged In: YES
    user_id=1066333

    The table look like this:

    +--------+------------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra
    |
    +--------+------------------+------+-----+---------+----------------+
    | id | int(10) unsigned | | PRI | NULL |
    auto_increment |
    | did | int(10) unsigned | | | 0 |
    |
    | name | varchar(255) | | | |
    |
    | type | varchar(255) | | | |
    |
    | target | varchar(255) | | | |
    |
    +--------+------------------+------+-----+---------+----------------+

    did is the ID of the domain
    name is the first part of the zone file. In this case: centos

    type would be: TXT

    target would be:
    "v=spf1 ip4:192.168.1.251 a mx ptr
    include:langerud-vingrom.net -all"

    Just run rehash_named --all and that should do it. If not,
    email me your code changes ( inline comments please! ) to:

    admin AT ravencore DOT com

    Thanks!

     
  • Perry
    Perry
    2005-09-12

    Logged In: YES
    user_id=1343027

    The records gets stored in the db, but the rehash_named file
    don't get them into the zone file..

    I'll just copy & paste the the line I've added that inserts
    the data to the database, it's the same line in add_dns and
    in add_def_dns

    line 51 in add_dns.php and line 42 in add_def_dns.php
    // trying to add TXT record
    if($_POST[type] == "TXT") $sql = "insert into
    dns_rec set did = '$did', name = '$_POST[name]', type =
    '$POST[type]', target = '$_POST[target]'";

    I've also added some lines for the case TXT so that it don't
    say Invalid dns record when choosing TXT as record type.
    I'll send you the complete files on mail...

     
  • Corey
    Corey
    2005-09-20

    Logged In: YES
    user_id=1066333

    Committed to 0.0.6

     
  • Corey
    Corey
    2005-09-20

    • status: open-accepted --> closed-fixed