Parece que você está descrevendo o parâmetro validate_cmd
exatamente. A partir da referência do tipo de marionete para file
:
A command for validating the file’s syntax before replacing it. If Puppet would need to rewrite a file due to new source or content, it will check the new content’s validity first. If validation fails, the file resource will fail.
This command must have a fully qualified path, and should contain a percent (%) token where it would expect an input file. It must exit 0 if the syntax is correct, and non-zero otherwise. The command will be run on the target system while applying the catalog, not on the puppet master.
No seu exemplo, acho que você faria isso:
file { '/etc/exim4/exim4.conf':
content => template("exim/etc/exim4/exim4.conf.erb"),
notify => Service[exim4],
validate_cmd => '/usr/bin/exim4 -bV -C %',
}