The postsrsd module lets you use Puppet to manage PostSRSd (Postfix Sender Rewriting Scheme daemon).
Providing a list of domains to manage is enough to get started:
class { 'postsrsd':
secrets => [
Sensitive('Example! Please use a better secret!'),
],
domains => [
'example.com',
'example.org',
],
}
When using the puppet-postfix module, add the following to your Postfix configuartion to use PostSRSd:
postfix::config {
'sender_canonical_maps': value => 'socketmap:unix:srs:forward';
'sender_canonical_classes': value => 'envelope_sender';
'recipient_canonical_maps': value => 'socketmap:unix:srs:reverse';
'recipient_canonical_classes': value => 'envelope_recipient,header_recipient';
}