Sha256: 0587c334b809470ba70873df9cc628b15dd8119351e4f94a08b3e4eecb1a5335

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

if container.mail.enabled?
  container.mail.password.safe_put!(['a'..'z', 'A'..'Z', 0..9].map(&:to_a).flatten.sample(30).join)

  config "#{container.config.path}/ssmtp/ssmtp.conf"
  config "/etc/postfix/postfwd.cf.d/#{container.name}.cf", source: 'postfwd_rules'

  on_reconfig "echo '#{container.mail.password}' | /usr/sbin/saslpasswd2 -u #{etc.smtp_hostname} -a smtpauth #{container.name} -p"
else
  on_reconfig "/usr/sbin/saslpasswd2 -u #{etc.smtp_hostname} -a smtpauth #{container.name} -d"
end

# TODO: on_reconfig 'cat $(ls -1 /etc/postfix/postfwd.cf.d/ | sort) > /etc/postfix/postfwd.cf && service postfwd reload'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
superhosting-0.0.2 bootstrap/etc/sx/models/common_mail/container/config.rb