Adding a smarthost for exim and obviously need to add that spf record as well. A bit tricky when just trying to add it to current spf records and not just replace some existing entry. Guess I should probably add it to the zone template too, right?
Kundun
you can also use /usr/local/cpanel/bin/spf_installer to do this. "spf_installer $username 'include:spf.blah.com' 0 0 1" will add "+include:spf.blah.com" without removing the existing record
the ' 0 0 1' is important (cause that 1 at the end is what tells it to preserve)
Usage: /usr/local/cpanel/bin/spf_installer <user> [policy [is-complete [overwrite [preserve]]]]
Installs an SPF policy in TXT records for the given user's domains.
Note: The following will be prepended to the policy: +a +mx +ip4:<main-IP>.
Options:
<user> User whose domains will receive the SPF record.
<policy>
Comma delimited list of SPF mechanisms to include in the
policy, e.g:
'+ip4:192.0.2.0/24,-ip4:203.0.113.5,+ip6:2001:db8:1a34::/64'.
Default: ""
<is-complete>
Indicates whether the policy represents a complete record,
that is, whether it should terminate with "-all". Use "1"
to indicate that it is; otherwise, use "0". Default: "0"
<overwrite>
Indicates whether all SPF records should be overwritten for
the user. If not, only select records will be replaced; see
Overwrite. Use "1" to indicate that it should; otherwise,
use "0". Default: "0"
<preserve>
Indicates that existing mechanisms should be retained from the
current SPF record for the domain. Use "1" to indicate that
they should be kept; otherwise, use "0". Default: "0"
Overwrite
When this script is run, the zone file for the domain is inspected and the
first SPF record that is found (generally, the main domain) is recorded. Any
other subdomains that have an identical SPF record to this one are replaced.
If <overwrite> is "1", then all SPF records, regardless of whether their
content matches the first record, are replaced.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
C | Bulk Add Parked Domains to One Account? | Domain Management | 3 | |
P | Bulk add a TXT record to several zones? | Domain Management | 4 | |
M | Bulk DNS Addition | Domain Management | 3 | |
C | Bulk utility to Add "A" Entry | Domain Management | 1 | |
C | Bulk utility to Add DNS zone | Domain Management | 3 |