New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/kiekerjan/libdns_mailinabox

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/kiekerjan/libdns_mailinabox

  • v0.1.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

Mail-In-A-Box custom DNS API provider

Go Reference

This package implements the libdns interfaces for Mail-In-A-Box custom DNS API, allowing you to manage DNS records.

import (
	"context"
	"fmt"

	"github.com/libdns/mailinabox"
)

func GetSubDomains() []string {
	zone := "[your mailinabox root domain]." // <- note the trailing .
	provider := &mailinabox.Provider{
		APIURL:       "https://[your mailinabox box]/admin",
		EmailAddress: "[create a special account on your box for managing domains]",
		Password:     "[password of the special dns account]",
		TOTPSecret:   "[TOTP secret for multifactor authentication]", 
	}
	records, err := provider.GetRecords(context.TODO(), zone)
	if err != nil {
		fmt.Printf("Error fetching records: %s", err)
		return nil
	}

	subDomains := make([]string, len(records))
	for i, record := range records {
		subDomains[i] = record.Name
	}
	return subDomains
}

FAQs

Package last updated on 02 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc