SelectorForNow returns the selector used for new keypairs at the current wall-clock month. The "e2a" prefix scopes the selector to this product so users hosting both e2a and another mail provider under the same domain can keep selectors disjoint. The YYYYMM tail lets us rotate selectors monthly with
()
| 46 | // records — the rotated row reuses the same column, but selector |
| 47 | // changes mean DNS lookups land on a new key. |
| 48 | func SelectorForNow() string { |
| 49 | return SelectorForTime(time.Now().UTC()) |
| 50 | } |
| 51 | |
| 52 | // SelectorForTime is the testable variant of SelectorForNow. |
| 53 | func SelectorForTime(t time.Time) string { |
no test coverage detected