Compare commits
No commits in common. 'master' and 'sigintools' have entirely different histories.
master
...
sigintools
43 changed files with 77 additions and 1012 deletions
@ -1,3 +0,0 @@ |
||||
the .tito/packages directory contains metadata files |
||||
named after their packages. Each file has the latest tagged |
||||
version and the project's relative directory. |
@ -1 +0,0 @@ |
||||
0.2.70-1 ./ |
@ -1 +0,0 @@ |
||||
../../tito_libs/releasers.conf |
@ -1,6 +0,0 @@ |
||||
[buildconfig] |
||||
builder = tito.builder.Builder |
||||
tagger = tito.tagger.VersionTagger |
||||
changelog_do_not_remove_cherrypick = 0 |
||||
changelog_format = %s (%ae) |
||||
lib_dir = ../tito_libs |
@ -1,4 +0,0 @@ |
||||
#!/bin/bash |
||||
|
||||
/usr/bin/yum --downloadonly --skip-broken -y update > /dev/null 2>&1 |
||||
exit 0 |
@ -1,57 +0,0 @@ |
||||
#!/usr/bin/perl -w |
||||
|
||||
#---------------------------------------------------------------------- |
||||
# Copyright (C) 2012 Firewall Services |
||||
# daniel@firewall-services.com |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||||
#---------------------------------------------------------------------- |
||||
|
||||
use esmith::AccountsDB; |
||||
use esmith::ConfigDB; |
||||
use File::Find; |
||||
use File::stat; |
||||
|
||||
my $c = esmith::ConfigDB->open_ro || die "Error opening ConfigDB\n"; |
||||
my $a = esmith::AccountsDB->open_ro || die "Error opening AccountsDB\n"; |
||||
my $smb = $c->get('smb') || die "Can't find the smb service in the ConfigDB\n"; |
||||
my $recycle = $smb->prop('RecycleBin') || 'disabled'; |
||||
our $retention = $smb->prop('RecycleBinRetention') || 'unlimited'; |
||||
$retention = 'unlimited' unless ($retention =~ m/^\d+$/); |
||||
|
||||
exit(0) if (($recycle ne 'enabled') || ($retention eq 'unlimited')); |
||||
|
||||
# Convert retention in seconds |
||||
$retention = 60*60*24*$retention; |
||||
|
||||
foreach my $user ($a->get_all_by_prop(type=>'user')){ |
||||
my $key = $user->key; |
||||
# Skip the user if RecycleBin doesn't exists |
||||
next unless (-d "/home/e-smith/files/users/$key/home/Recycle Bin"); |
||||
finddepth(\&remove, "/home/e-smith/files/users/$key/home/Recycle Bin/"); |
||||
} |
||||
|
||||
sub remove{ |
||||
# Remove files with last modification older than $retention |
||||
if ( -f ){ |
||||
my $mtime = stat($_)->mtime; |
||||
(time() - $mtime > $retention) && unlink($_); |
||||
} |
||||
# Remove empty directories |
||||
elsif ( -d ){ |
||||
(scalar <"$_/*">) || rmdir("$_"); |
||||
} |
||||
} |
||||
|
@ -1 +0,0 @@ |
||||
8192 |
@ -1 +0,0 @@ |
||||
disabled |
@ -1 +0,0 @@ |
||||
service |
@ -1 +0,0 @@ |
||||
50 |
@ -1 +0,0 @@ |
||||
50 |
@ -1 +0,0 @@ |
||||
15 |
@ -1 +0,0 @@ |
||||
50 |
@ -0,0 +1,2 @@ |
||||
local5.=notice -/var/log/smb_audit.log |
||||
local5.*;local5.!=notice -{ "${messages}" } |
@ -1 +0,0 @@ |
||||
PERMS=0755 |
@ -1 +1,3 @@ |
||||
#!/bin/sh |
||||
exec qmail-notify -r -m -f /var/qmail/control/queuenotifymsg |
||||
|
||||
|
@ -1,7 +0,0 @@ |
||||
<Location /server-status> |
||||
SetHandler server-status |
||||
Order deny,allow |
||||
deny from all |
||||
allow from 127.0.0.1 |
||||
</Location> |
||||
ExtendedStatus On |
@ -1,16 +0,0 @@ |
||||
{ |
||||
if (($spamassassin{UseBayes} || '0') =~ m/^1|on|yes|enabled$/ && ($spamassassin{BayesAutoLearn} || 'no') =~ m/^1|on|yes|enabled$/){ |
||||
my $ham_thres = $spamassassin{BayesHamThreshold} || '-1.0'; |
||||
my $spam_thres = $spamassassin{BayesSpamThreshold} || '6'; |
||||
$OUT .=<<"_EOF"; |
||||
bayes_auto_learn 1 |
||||
bayes_auto_learn_threshold_nonspam $ham_thres |
||||
bayes_auto_learn_threshold_spam $spam_thres |
||||
_EOF |
||||
} |
||||
else{ |
||||
$OUT .=<<"_EOF"; |
||||
bayes_auto_learn 0 |
||||
_EOF |
||||
} |
||||
} |
@ -1,83 +0,0 @@ |
||||
##################################################################################### |
||||
##### FRENCH SPECIFIC SPAMASSASSIN RULES. |
||||
##### USE AND REDISTRIBUTE WITH THIS NOTE AT YOUR OWN RISK AND PLEASURE. |
||||
##### AUTHOR: John GALLET |
||||
##### Version: 2008-JUNE-21 |
||||
##### Latest: http://www.saphirtech.fr/ |
||||
##### Status: It Works For Me (tm) |
||||
##################################################################################### |
||||
# Spam is legal in France ! |
||||
body FR_SPAMISLEGAL /\b(Conform.+ment|En vertu).\{0,5\}(article.\{0,4\}34.\{0,4\})?la loi\b/i |
||||
describe FR_SPAMISLEGAL French: pretends spam is (l)awful. |
||||
lang fr describe FR_SPAMISLEGAL Invoque la loi informatique et libertes. |
||||
score FR_SPAMISLEGAL 1.0 |
||||
|
||||
body FR_SPAMISLEGAL_2 /\bdroit d.acc.+s.\{1,3\}(de modification)?.\{0,5\}de rectification\b/i |
||||
describe FR_SPAMISLEGAL_2 French: pretends spam is (l)awful. |
||||
lang fr describe FR_SPAMISLEGAL_2 Invoque le droit de rectification cnil. |
||||
score FR_SPAMISLEGAL_2 1.0 |
||||
|
||||
##### |
||||
# yeah, sure. |
||||
body FR_NOTSPAM /\b(ceci|ce).\{1,9\} n.est pas.\{1,5\}spam\b/i |
||||
describe FR_NOTSPAM French: claims not to be spam. |
||||
lang fr describe FR_NOTSPAM Affirme ne pas etre du spam. |
||||
score FR_NOTSPAM 2.5 |
||||
|
||||
##### |
||||
## I can pay my taxes |
||||
body FR_PAYLESSTAXES /\b(paye|calcul|simul|r.+dui|investi).\{1,7\}(moins|vo|ses).\{0,5\}imp.+t(s)?\b/i |
||||
describe FR_PAYLESSTAXES French: Pay less taxes |
||||
lang fr describe FR_PAYLESSTAXES Simulateurs et reductions d'impots. |
||||
score FR_PAYLESSTAXES 2.0 |
||||
|
||||
body FR_REALESTATE_INVEST /\b(loi)? (de.robien|girardin).\{1,15\}(neuf|recentr.+|ancien|IR|IS|imp.+t(s)?|industriel(le)?)\b/i |
||||
describe FR_REALESTATE_INVEST French: Invest in real-estate with tax-reductions |
||||
lang fr describe FR_REALESTATE_INVEST Reduction impots immobilier. |
||||
score FR_REALESTATE_INVEST 2.5 |
||||
|
||||
##### |
||||
# I won at the casino |
||||
body FR_ONLINEGAMBLING /\b(casino(s)?|jeu(x)?|joueur(s)?) (en ligne|de grattage)\b/i |
||||
describe FR_ONLINEGAMBLING French: Online gambling |
||||
lang fr describe FR_ONLINEGAMBLING Jeux en ligne. |
||||
score FR_ONLINEGAMBLING 2.0 |
||||
|
||||
##### |
||||
# Baby, did you forget to take your meds ? |
||||
body FR_ONLINEMEDS /\bpharmacie(s)? (en ligne|internet)\b/i |
||||
describe FR_ONLINEMEDS French: Online meds ordering |
||||
lang fr describe FR_ONLINEMEDS Achat de medicaments en ligne. |
||||
score FR_ONLINEMEDS 2.5 |
||||
|
||||
###### |
||||
# Tell me why |
||||
body FR_REASON_SUBSCRIBE /\bVous recevez ce(t|tte)? (message|mail|m.+l|lettre|news.+|information) (car|parce que)\b/i |
||||
describe FR_REASON_SUBSCRIBE French: you subscribed to my spam. |
||||
lang fr describe FR_REASON_SUBSCRIBE Indique pourquoi vous recevez le courrier. |
||||
score FR_REASON_SUBSCRIBE 0.8 |
||||
|
||||
##### |
||||
# How to unsubscribe |
||||
body FR_HOWTOUNSUBSCRIBE /\b(souhaitez|d.+sirez|pour).\{1,10\}(plus.\{1,\}recevoir|d.+sincrire|d.+sinscription|d.+sabonner).\{0,10\}(information|email|mail|mailing|newsletter|lettre|liste|message|offre|promotion|programme)(s)?\b/i |
||||
describe FR_HOWTOUNSUBSCRIBE French: how to unsubscribe |
||||
lang fr describe FR_HOWTOUNSUBSCRIBE Indique comment se desabonner. |
||||
score FR_HOWTOUNSUBSCRIBE 0.8 |
||||
|
||||
#### |
||||
# Various "CRM" (Could Remove Me) |
||||
##### |
||||
header FR_MAILER_1 X-Mailer =~ /(delosmail|cabestan|ems|mp6|wamailer|eMailink|Accucast|Benchmail|MailChimp)/i |
||||
describe FR_MAILER_1 French spammy X-Mailer |
||||
lang fr describe FR_MAILER_1 X-Mailer couramment employe pour des spams en francais. |
||||
score FR_MAILER_1 1.0 |
||||
|
||||
header FR_MAILER_2 X-EMV-CampagneId =~ /.+/ |
||||
describe FR_MAILER_2 French spammy mailer header |
||||
lang fr describe FR_MAILER_2 X-Mailer couramment employe pour des spams en francais. |
||||
score FR_MAILER_2 2.0 |
||||
|
||||
##################################################################################### |
||||
##### END FRENCH SPECIFIC SPAMASSASSIN RULES. |
||||
##################################################################################### |
||||
|
@ -1,129 +0,0 @@ |
||||
# Check someblacklists |
||||
|
||||
header RCVD_IN_GBUDB eval:check_rbl('gbudb', 'truncate.gbudb.net.', '127.0.0.2') |
||||
describe RCVD_IN_GBUDB Listed in truncate.gbudb.net |
||||
tflags RCVD_IN_GBUDB net |
||||
score RCVD_IN_GBUDB 1.0 |
||||
|
||||
header RCVD_IN_IMP_SPAMLIST eval:check_rbl('spamrbl-lastexternal','spamrbl.imp.ch.','127.0.1.5') |
||||
describe RCVD_IN_IMP_SPAMLIST Listed in spamrbl.imp.ch |
||||
tflags RCVD_IN_IMP_SPAMLIST net |
||||
score RCVD_IN_IMP_SPAMLIST 1.0 |
||||
|
||||
header RCVD_IN_INPS eval:check_rbl('inps-de-lastexternal','dnsbl.inps.de.') |
||||
describe RCVD_IN_INPS Received via a relay in inps.de DNSBL |
||||
tflags RCVD_IN_INPS net |
||||
score RCVD_IN_INPS 1.0 |
||||
|
||||
header RCVD_IN_JMF_BL eval:check_rbl_sub('JMF-lastexternal','hostkarma.junkemailfilter.com','127.0.0.2') |
||||
describe RCVD_IN_JMF_BL Sender listed in JMF-BLACK |
||||
tflags RCVD_IN_JMF_BL net |
||||
score RCVD_IN_JMF_BL 1.0 |
||||
|
||||
header RCVD_IN_NIX_SPAM eval:check_rbl('nix-spam-lastexternal','ix.dnsbl.manitu.net.') |
||||
describe RCVD_IN_NIX_SPAM Listed in NIX-SPAM DNSBL (heise.de) |
||||
tflags RCVD_IN_NIX_SPAM net |
||||
score RCVD_IN_NIX_SPAM 1.0 |
||||
|
||||
header RCVD_IN_SORBS eval:check_rbl('sorbscombined','dnsbl.sorbs.net.') |
||||
describe RCVD_IN_SORBS Sender listed at http://www.sorbs.net |
||||
tflags RCVD_IN_SORBS net |
||||
score RCVD_IN_SORBS 1.0 |
||||
|
||||
header RCVD_IN_SEM_BLACK eval:check_rbl('semblack-lastexternal','bl.spameatingmonkey.net') |
||||
tflags RCVD_IN_SEM_BLACK net |
||||
describe RCVD_IN_SEM_BLACK Received from an IP listed by SEM-BLACK |
||||
score RCVD_IN_SEM_BLACK 1.0 |
||||
|
||||
header RCVD_IN_SEMNETBLACK eval:check_rbl('semnetblack-lastexternal', 'netbl.spameatingmonkey.net') |
||||
tflags RCVD_IN_SEMNETBLACK net |
||||
describe RCVD_IN_SEMNETBLACK Received from an IP listed by SEM-NETBLACK |
||||
score RCVD_IN_SEMNETBLACK 1.0 |
||||
|
||||
urirhssub SEM_URIRED urired.spameatingmonkey.net. A 2 |
||||
body SEM_URIRED eval:check_uridnsbl('SEM_URIRED') |
||||
describe SEM_URIRED Contains a URI listed by SEM-URIRED |
||||
tflags SEM_URIRED net |
||||
score SEM_URIRED 1.0 |
||||
|
||||
urirhssub SEM_FRESH fresh.spameatingmonkey.net. A 2 |
||||
body SEM_FRESH eval:check_uridnsbl('SEM_FRESH') |
||||
describe SEM_FRESH Contains a domain registered less than 5 days ago |
||||
tflags SEM_FRESH net |
||||
score SEM_FRESH 1.0 |
||||
|
||||
header RCVD_IN_SPAMRATS_DYNA eval:check_rbl('spamratsdyna-lastexternal','dyna.spamrats.com.') |
||||
describe RCVD_IN_SPAMRATS_DYNA Sender listed in spamratsdyna |
||||
tflags RCVD_IN_SPAMRATS_DYNA net |
||||
score RCVD_IN_SPAMRATS_DYNA 1.0 |
||||
|
||||
header RCVD_IN_SPAMRATS_NOPTR eval:check_rbl('spamratsnoptr-lastexternal','noptr.spamrats.com.') |
||||
describe RCVD_IN_SPAMRATS_NOPTR Sender listed in spamratsnoptr |
||||
tflags RCVD_IN_SPAMRATS_NOPTR net |
||||
score RCVD_IN_SPAMRATS_NOPTR 1.0 |
||||
|
||||
urirhsbl URIBL_SC_SWINOG uribl.swinog.ch. A |
||||
body URIBL_SC_SWINOG eval:check_uridnsbl('URIBL_SC_SWINOG') |
||||
describe URIBL_SC_SWINOG URI's listed in uribl.swinog.ch. |
||||
tflags URIBL_SC_SWINOG net |
||||
score URIBL_SC_SWINOG 1.0 |
||||
|
||||
header RCVD_IN_UCEPROTECT1 eval:check_rbl_txt('uceprotect1-lastexternal','dnsbl-1.uceprotect.net.') |
||||
describe RCVD_IN_UCEPROTECT1 Listed in dnsbl-1.uceprotect.net (open relay/proxy/dialup) |
||||
tflags RCVD_IN_UCEPROTECT1 net |
||||
score RCVD_IN_UCEPROTECT1 1.0 |
||||
|
||||
header RCVD_IN_UNSUBSCORE eval:check_rbl('unsubscore-lastexternal','ubl.unsubscore.com.') |
||||
describe RCVD_IN_UNSUBSCORE Listed in Lashback unsubscore.com |
||||
tflags RCVD_IN_UNSUBSCORE net |
||||
score RCVD_IN_UNSUBSCORE 1.0 |
||||
|
||||
header RCVD_IN_WPBL eval:check_rbl('wpbl-lastexternal','db.wpbl.info.','127.0.0.2') |
||||
describe RCVD_IN_WPBL Listed in wpbl |
||||
tflags RCVD_IN_WPBL net |
||||
score RCVD_IN_WPBL 1.0 |
||||
|
||||
header RCVD_IN_S5HBL eval:check_rbl_txt('s5hbl', 'all.s5h.net') |
||||
describe RCVD_IN_S5HBL Listed in all.s5h.net |
||||
tflags RCVD_IN_S5HBL net |
||||
score RCVD_IN_S5HBL 1.0 |
||||
|
||||
header RCVD_IN_SPAMCANNIBAL eval:check_rbl('spamcannibal', 'bl.spamcannibal.org') |
||||
describe RCVD_IN_SPAMCANNIBAL Listed in bl.spamcannibal.org |
||||
tflags RCVD_IN_SPAMCANNIBAL net |
||||
score RCVD_IN_SPAMCANNIBAL 1.0 |
||||
|
||||
header RCVD_IN_BACKSCATTERER eval:check_rbl('backscatterer', 'ips.backscatterer.org') |
||||
describe RCVD_IN_BACKSCATTERER Listed in ips.backscatterer.org |
||||
tflags RCVD_IN_BACKSCATTERER net |
||||
score RCVD_IN_BACKSCATTERER 1.0 |
||||
|
||||
header RCVD_IN_FABEL eval:check_rbl('fabel', 'spamsources.fabel.dk.') |
||||
describe RCVD_IN_FABEL Received via a relay in spamsources.fabel.dk |
||||
tflags RCVD_IN_FABEL net |
||||
score RCVD_IN_FABEL 1.0 |
||||
|
||||
header RCVD_IN_DRONEBL eval:check_rbl('dronebl', 'dnsbl.dronebl.org') |
||||
describe RCVD_IN_DRONEBL Listed in dnsbl.dronebl.org |
||||
tflags RCVD_IN_DRONEBL net |
||||
score RCVD_IN_DRONEBL 1.0 |
||||
|
||||
header RCVD_IN_MANITU eval:check_rbl('manitu', 'ix.dnsbl.manitu.net') |
||||
describe RCVD_IN_MANITU Listed in ix.dnsbl.manitu.net |
||||
tflags RCVD_IN_MANITU net |
||||
score RCVD_IN_MANITU 1.0 |
||||
|
||||
header RCVD_IN_SINGULAR eval:check_rbl('singular', 'singular.ttk.pte.hu') |
||||
describe RCVD_IN_SINGULAR Listed in singular.ttk.pte.hu |
||||
tflags RCVD_IN_SINGULAR net |
||||
score RCVD_IN_SINGULAR 1.0 |
||||
|
||||
header RCVD_IN_SPAMBOT_DIGIBASE eval:check_rbl('spambot-digibase', 'spambot.bls.digibase.ca') |
||||
describe RCVD_IN_SPAMBOT_DIGIBASE Listed in spambot.bls.digibase.ca |
||||
tflags RCVD_IN_SPAMBOT_DIGIBASE net |
||||
score RCVD_IN_SPAMBOT_DIGIBASE 1.0 |
||||
|
||||
header RCVD_IN_OPENPROXY_DIGIBASE eval:check_rbl('openproxy-digibase', 'openproxy.bls.digibase.ca') |
||||
describe RCVD_IN_OPENPROXY_DIGIBASE Listed in openproxy.bls.digibase.ca |
||||
tflags RCVD_IN_OPENPROXY_DIGIBASE net |
||||
score RCVD_IN_OPENPROXY_DIGIBASE 1.0 |
@ -1 +0,0 @@ |
||||
innodb_file_per_table |
@ -0,0 +1 @@ |
||||
open_files_limit = 4096 |
@ -1 +0,0 @@ |
||||
max_connections = 500 |
@ -1,3 +0,0 @@ |
||||
local5.notice /var/log/smb_audit.log |
||||
local5.notice ~ |
||||
|
@ -1 +0,0 @@ |
||||
group=admins lrswtipekxa |
@ -1,5 +0,0 @@ |
||||
{ |
||||
my $spf = $qpsmtpd{'CheckSPF'} || 'disabled'; |
||||
return '' unless ($spf =~ m/^[012]$/); |
||||
return "sender_permitted_from spf_deny $spf"; |
||||
} |
@ -1,11 +0,0 @@ |
||||
{ |
||||
|
||||
return "" unless (-x '/usr/bin/make-srv'); |
||||
|
||||
$OUT .= "# SRV Records for Email services\n"; |
||||
$OUT .= `/usr/bin/make-srv -service _imap._tcp.$DomainName -target $SystemName.$DomainName -port 143`; |
||||
$OUT .= `/usr/bin/make-srv -service _imaps._tcp.$DomainName -target $SystemName.$DomainName -port 993`; |
||||
$OUT .= `/usr/bin/make-srv -service _smtp._tcp.$DomainName -target $SystemName.$DomainName -port 25`; |
||||
$OUT .= `/usr/bin/make-srv -service _smtps._tcp.$DomainName -target $SystemName.$DomainName -port 465`; |
||||
|
||||
} |
@ -1,16 +0,0 @@ |
||||
{ |
||||
if (($qpsmtpd{RejectSpoofedLocalDomains} || 'disabled') eq 'enabled'){ |
||||
$OUT .= "# SPF entries for local domains\n"; |
||||
my $allowed = ''; |
||||
foreach my $ip ( split /[;,]/, ($qpsmtpd{AllowedRemoteIP} || '')){ |
||||
$allowed .= 'ip4\072'.$ip.' '; |
||||
} |
||||
foreach my $domain (get_domains()){ |
||||
$OUT .= "'$domain:v=spf1 mx $allowed-all:3600\n"; |
||||
$OUT .= ":$domain:99:\041v=spf1 mx $allowed-all:3600\n"; |
||||
} |
||||
} |
||||
else{ |
||||
$OUT .= "\n"; |
||||
} |
||||
} |
@ -1,181 +0,0 @@ |
||||
#!/usr/bin/perl |
||||
# $Header: /u/cvsroot/env/b/make-srv,v 1.3 2002/10/30 17:26:42 mayoff Exp $ |
||||
|
||||
use strict; |
||||
use Getopt::Long; |
||||
use Pod::Usage; |
||||
|
||||
my $priority = 0; |
||||
my $weight = 0; |
||||
my $service; |
||||
my $port; |
||||
my $target; |
||||
my $help = 0; |
||||
|
||||
my $result = GetOptions( |
||||
'help|?' => \$help, |
||||
'service=s' => \$service, |
||||
'priority=i' => \$priority, |
||||
'weight=i' => \$weight, |
||||
'port=i' => \$port, |
||||
'target=s' => \$target |
||||
) || pod2usage(2); |
||||
|
||||
pod2usage(1) if $help; |
||||
pod2usage(3) if (!defined($service) || !defined($port) || !defined($target)); |
||||
|
||||
my $data = tinydns_escape( |
||||
pack("nnn", $priority, $weight, $port) |
||||
. dotted_sequence_to_label_sequence($target)); |
||||
|
||||
print ":$service:33:$data\n"; |
||||
|
||||
exit 0; |
||||
|
||||
sub tinydns_escape { |
||||
my ($data) = @_; |
||||
|
||||
$data =~ s{[\000-\037:\\\177-\377]}{ |
||||
sprintf("\\%03o", unpack('C', $&)) |
||||
}ge; |
||||
|
||||
return $data; |
||||
} |
||||
|
||||
sub dotted_sequence_to_label_sequence { |
||||
my ($dotted) = @_; |
||||
my @chars = split(//, $dotted); |
||||
my $l = scalar(@chars); |
||||
my $out = ''; |
||||
my $label = ''; |
||||
|
||||
my $i = 0; |
||||
while (1) { |
||||
my $c; |
||||
if ($i < $l) { |
||||
$c = $chars[$i]; |
||||
$i++; |
||||
} |
||||
|
||||
else { |
||||
$c = '.'; |
||||
} |
||||
|
||||
if ($c eq '.') { |
||||
my $ll = length($label); |
||||
if ($ll > 63) { |
||||
die "$dotted contains a label of length $ll, but max length is 63"; |
||||
} |
||||
if ($ll > 0) { |
||||
$out .= pack('C', $ll); |
||||
$out .= $label; |
||||
$label = ''; |
||||
} |
||||
|
||||
last if ($i >= $l); |
||||
|
||||
next; |
||||
} |
||||
|
||||
if ($c eq '\\') { |
||||
if ($i < $l) { |
||||
$c = $chars[$i]; |
||||
$i++; |
||||
if ($c ge '0' && $c le '7') { |
||||
my $o = $c; |
||||
if ($i < $l) { |
||||
$c = $chars[$i]; |
||||
if ($c ge '0' && $c le '7') { |
||||
$i++; |
||||
$o .= $c; |
||||
if ($i < $l) { |
||||
$c = $chars[$i]; |
||||
if ($c ge '0' && $c le '7') { |
||||
$i++; |
||||
$o .= $c; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
$c = pack('C', oct($o)); |
||||
} |
||||
} |
||||
} |
||||
|
||||
$label .= $c; |
||||
} |
||||
|
||||
$out .= "\000"; |
||||
return $out; |
||||
} |
||||
|
||||
__END__ |
||||
|
||||
=head1 NAME |
||||
|
||||
make-srv - Make an SRV record for tinydns |
||||
|
||||
=head1 SYNOPSIS |
||||
|
||||
make-srv -service I<service> -target I<target> -port I<port> [I<options>] |
||||
|
||||
Options: |
||||
|
||||
=over 4 |
||||
|
||||
=item -priority I<priority> |
||||
|
||||
=item -weight I<weight> |
||||
|
||||
=head1 DESCRIPTION |
||||
|
||||
This command prints a DNS SRV record to standard output in |
||||
C<tinydns-data> format. This record is defined by RFC 2052. |
||||
|
||||
The C<-service> flag specifies the domain name for which |
||||
the SRV record is defined. This name should have the format |
||||
I<service>C<.>I<protocol>C<.>I<domain>. For example: |
||||
C<http.tcp.dqd.com>. You must specify the C<-service> flag. |
||||
|
||||
The C<-target> flag specifies the target domain name of the record. The |
||||
I<target> must be a domain name with an associated A record. (This |
||||
command doesn't verify that, but the RFC says it's a requirement.) You |
||||
must specify the C<-target> flag. |
||||
|
||||
The C<-port> flag specifies the port number of the record. You must |
||||
specify the C<-port> flag. |
||||
|
||||
The C<-priority> and C<-weight> flags specify the priority and weight of |
||||
the record. These flags are optional; I<priority> and I<weight> are |
||||
zero by default. |
||||
|
||||
Example: |
||||
|
||||
$ make-srv -service http.tcp.dqd.com -target zot.dqd.com -port 80 |
||||
:http.tcp.dqd.com:33:\000\000\000\000\000P\003zot\003dqd\003com\000 |
||||
|
||||
You may add the I<ttl>, I<timestamp>, and I<lo> fields to the end of the |
||||
line yourself if necessary. For example, |
||||
|
||||
:http.tcp.dqd.com:33:\000\000\000\000\000P\003zot\003dqd\003com\000:::in |
||||
|
||||
is the same SRV record as in the example above, but will be visible only |
||||
to clients in the C<in> location. See the C<tinydns-data> documentation |
||||
for help with these fields. |
||||
|
||||
=head1 LINKS |
||||
|
||||
=over |
||||
|
||||
=item * |
||||
|
||||
RFC 2052: L<http://www.ietf.org/rfc/rfc2052.txt> |
||||
|
||||
=item * |
||||
|
||||
C<tinydns-data> documentation: L<http://cr.yp.to/djbdns/tinydns-data.html> |
||||
|
||||
=back |
||||
|
||||
=cut |
||||
|
@ -1 +0,0 @@ |
||||
winnow.spam.ts.brokenspam.1 |
Loading…
Reference in new issue