# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1415799033 -3600 # Node ID 2492cea31acda5978cbe6cee63b6b21fcd857369 # Parent 31f1e0c6344d454bae2943973c12c9e9068dbf91 [savepoint] diff -r 31f1e0c6344d -r 2492cea31acd README --- a/README Mon Jul 19 23:42:14 2010 +0200 +++ b/README Wed Nov 12 14:30:33 2014 +0100 @@ -1,11 +1,15 @@ +----------- +exim-checks +----------- + The checks should ensure that configuration changes to exim didn't break anything. Several types of checks should be performed: -* ROUTING -* ACCESS -* AUTHENTICATION + * ROUTING + * ACCESS + * AUTHENTICATION Which parameters do we need to set for checking? @@ -15,3 +19,5 @@ suffice, since even routing could depend on source IP, sender address and so on. +.. comment + vim:ft=rst: diff -r 31f1e0c6344d -r 2492cea31acd README.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.html Wed Nov 12 14:30:33 2014 +0100 @@ -0,0 +1,335 @@ + + + + + + +exim-checks + + + +
+

exim-checks

+ +

The checks should ensure that configuration changes to exim didn't break +anything.

+

Several types of checks should be performed:

+
+
    +
  • ROUTING
  • +
  • ACCESS
  • +
  • AUTHENTICATION
  • +
+
+

Which parameters do we need to set for checking? +Which parameters influence Routing, Access Control and Authentication?

+

First we could focus on simple -bt or -bv checks. But this does not +suffice, since even routing could depend on source IP, sender address +and so on.

+ +
+ + + diff -r 31f1e0c6344d -r 2492cea31acd check --- a/check Mon Jul 19 23:42:14 2010 +0200 +++ b/check Wed Nov 12 14:30:33 2014 +0100 @@ -123,7 +123,7 @@ =head1 NAME -check - checks exim routing agains pre-defined values +check - checks exim routing against pre-defined values =head1 SYNOPSIS diff -r 31f1e0c6344d -r 2492cea31acd lib/Test.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Test.pm Wed Nov 12 14:30:33 2014 +0100 @@ -0,0 +1,11 @@ +=head1 NAME + + Test - blabla + +=head1 SYNOPSIS + + use Test; + + my $test = new Test "t/local_sender"; + $test->run; +ZZ 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) }; + } +} diff -r 31f1e0c6344d -r 2492cea31acd t/00-default --- a/t/00-default Mon Jul 19 23:42:14 2010 +0200 +++ b/t/00-default Wed Nov 12 14:30:33 2014 +0100 @@ -1,4 +1,4 @@ -sender: 127.0.0.1 +sender: 127.0.0.1 # -oMa helo: localhost mail-to: user@example.org rcpt-from: user@example.org