A couple of small additions to the configuration.
1. For us, the ldap connnection needed a port specified. I added $ldap_port to configuration.php. This is read by install.php and used in or-authenticate.php
2. The $email_system variable is set to '' in the default sql file. I thought it would make sense to have this as a configuration variable. It is set in configuration.php and read in install.php
The attached diff file should not be used for an automatic patch but shows the lines which need changing ok.