Adding a mailer to Postfix master.cf via Augeas

368 views
Skip to first unread message

Jeremy

unread,
Mar 18, 2011, 10:50:59 AM3/18/11
to Puppet Users
Has anyone had any success with adding a new mailer to the Postfix
master.cf using Augeas? I know the commands work if I use augtool but
I'm having problems translating it into a Puppet module configuration.
I'm attempting to set Postfix up to use Amazon Web Services Simple
Email Service as suggested at http://netwiser.blogspot.com/2011/02/setup-amazon-ses-to-relay-email-by.html.

This is what I have currently and it truncates the command+args
section after only "pipe". When I use augtool I would put the whole
command+args section within quotes but that doesn't seem to work with
Puppet+Augeas.

augeas {
"Postfix Master Config":
context => "/files/etc/postfix/master.cf",
changes => [
"set aws-email/type unix",
"set aws-email/private -",
"set aws-email/unpriviliged n",
"set aws-email/chroot n",
"set aws-email/wakeup -",
"set aws-email/limit -",
"set aws-email/command pipe flags=R user=nobody argv=/
usr/local/bin/ses-send-email -r -k /etc/postfix/aws-credentials -f $
{sender} ${recipient}",
],
require => Package["postfix"],
notify => Service["postfix"];
}

Luke Bigum

unread,
Mar 18, 2011, 12:03:13 PM3/18/11
to Puppet Users
On Mar 18, 2:50 pm, Jeremy <jtbo...@gmail.com> wrote:
>                 "set aws-email/command pipe flags=R user=nobody argv=/
> usr/local/bin/ses-send-email -r -k /etc/postfix/aws-credentials -f $
> {sender} ${recipient}",

Try:

'set aws-email/command "pipe flags=R user=nobody argv=/ usr/local/bin/
ses-send-email -r -k /etc/postfix/aws-credentials -f $ {sender} $
{recipient}"'

Single quotes around the string in Puppet, double quotes around the
Augeas string.
Reply all
Reply to author
Forward
0 new messages