Skip to content
Snippets Groups Projects
Commit f91e9cf6 authored by Patrick Cernko's avatar Patrick Cernko
Browse files

small LMDB/STS debug helpers

parent 4efdde38
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python3
import sys, io
import lmdb
lmdb_path, key = sys.argv[1], sys.argv[2]
env = lmdb.open(lmdb_path, max_dbs=10)
db = env.open_db()
with env.begin(write=True) as txn:
txn.delete(key.encode())
#!/usr/bin/python3
import sys
import lmdb
lmdb_path = sys.argv[1]
env = lmdb.open(lmdb_path, max_dbs=10)
db = env.open_db()
with env.begin() as txn:
for key, value in list(txn.cursor(db=db))[1:]:
k, v = key.decode(), value.decode()
print('%s="%s"' % (k, v))
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Mail::STS;
my $domainname = $ARGV[0];
print("Domain: $domainname\n");
my $sts = Mail::STS->new;
my $domain = $sts->domain($domainname);
#print("\nMail::STS:Domain: $domain\n");
#print("\nMail::STS:Domain: ".Dumper($domain));
eval { $domain->record_type; } or
die("Domain $domainname does not resolve\n");
my $tlsa = $domain->tlsa;
print("\nNet::DNS::RR::TLSA: ".Dumper($tlsa));
my $stsrecord = $domain->sts;
print("\nMail::STS::STSRecord: ".Dumper($stsrecord));
defined($stsrecord) or exit(0);
my $tlsrpt = $domain->tlsrpt;
print("\nMail::STS::TLSRPTRecord: ".Dumper($tlsrpt));
defined($tlsrpt) or exit(0);
my $policy = $domain->policy;
print("\nMail::STS::Policy: ".Dumper($policy));
defined($policy) or exit(0);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment