X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Fmanifests%2Finit.pp;h=adbaf4d472ac93c778e21bae8fe7a79a055d1516;hb=e8a31a30d67a050678bc9ba1bd5fa551f9c08241;hp=882a3c2f7bedfda26842e872f4d55c4d457c983c;hpb=ad76825e7d64d13bbbecf1bffa2abb2f6151882a;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 882a3c2f7..adbaf4d47 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -1,14 +1,38 @@ +# our exim class +# @param use_smarthost use the smarthost +# @param smarthost host to relay through (if set and use_smarthost) +# @param is_bugsmx this system handles bugs.debian.org +# @param is_mailrelay this system is a mailrelay, both in and out, for debian hosts +# @param is_rtmaster this system handles rt.debian.org +# @param is_packagesmaster this system handles packagesrt.debian.org +# @param is_packagesqamaster this system handles packages.qa.debian.org +# @param mail_port override the default incoming mailport (only applicable for hosts behind an incoming relay) +# @param smarthost_port the port on which satellites send mail to the smarthost (needs to be the same on both sides) class exim ( + Optional[String] $smarthost, + Boolean $use_smarthost = true, Boolean $is_bugsmx = false, + Boolean $is_mailrelay = false, Boolean $is_rtmaster = false, + Boolean $is_packagesmaster = false, + Boolean $is_packagesqamaster = false, + Integer $smarthost_port = 587, + Optional[Integer] $mail_port = undef, ) { + include exim::vdomain::setup - $is_mailrelay = has_role('mailrelay') - $is_packagesmaster = has_role('packagesmaster') - $is_packagesqamaster = has_role('packagesqamaster') + if $use_smarthost { + $heavy = false - include exim::vdomain::setup - include debian_org::mail_incoming_port + if ! smarthost { + fail('No smarthost set but use_smarthost is true') + } + } else { + $heavy = true + if $mail_port { + fail('Cannot override mail_port in heavy/no-smarthost hosts') + } + } munin::check { 'ps_exim4': script => 'ps_' } munin::check { 'exim_mailqueue': }