# spf-flattener **Repository Path**: mirrors_letsencrypt/spf-flattener ## Basic Information - **Project Name**: spf-flattener - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-11 - **Last Updated**: 2025-12-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SPF-FLATTENER This tool flattens the SPF record for a given domain to avoid reaching the 10 DNS lookup cap. ## Flags | Flag | Required? | Type | Default | Description | |------| ----------| --------| -----|-------------| | domain | *required* | string | | root domain to set SPF record for | | initialSPF | *optional* | string | "" | initial SPF record to flatten* | | verbose | *optional* | bool | false | if true, print extra debug lines | | dryrun | *optional* | bool | true | if false, update existing SPF record with flattened SPF | | warn | *optional* | bool | true | if true, compares initial and flattened SPF, warning when different | | url | *optional*** | string | "" | url to PATCH updated SPF record | | authEmail | *optional*** | string | "" | X-Auth-Email header value | | authKey | *optiona*** | string | "" | X-Auth-Key header value | *if not provided, will lookup and use existing SPF record for domain **unless dryrun is false, then required ## Example use cases **Base case**: one-time flatten tool, just want to output flattened record: ``` go run main.go --domain --warn false ``` **Dynamic update case**: update SPF tool that acts without intervention. For example, a cron job that runs: ``` go run main.go --domain --initialSPF "" --dryrun false --warn false --url "" --authEmail "" --authKey "" ``` **Dynamic warning case**: recurring check SPF tool that alerts/warns on change. For example, a cron job that runs: ``` go run main.go --domain --intialSPF="" ``` Then once someone checks/approves of change, run once: ``` go run main.go --domain --initialSPF "" --dryrun false --warn false --url "" --authEmail "" --authKey ""