diff -r 31f1e0c6344d -r 2492cea31acd run --- a/run Mon Jul 19 23:42:14 2010 +0200 +++ b/run Wed Nov 12 14:30:33 2014 +0100 @@ -2,11 +2,23 @@ use strict; use warnings; +use feature qw(switch); use lib "lib"; use Exim; my $exim = new Exim(basename => "exim4", config => "/etc/exim4/exim4.conf"); -$exim->set_cmdline(-oMi => "1.1.1.1.22"); +$exim->set_cmdline(-oMi => undef); print $exim->expand("\$received_port"); + +# now read the default values +open(my $input, $_ = "< t/00-default") or die "Can't open $_: $!\n"; +while (<$input>) { + next if /^\s*(?#.*)?$/; + my ($key, $value) = /^\s*(\S+):\s*(\S+)/; + + given($key) { + when ("sender") { $exim->set_cmdline(-oMa => $value) }; + } +}