Permalink
Browse files

Merge pull request #240 from kvsmirnov/master

Text formatting: deleted spaces and tabs at EOL
  • Loading branch information...
rimas-kudelis committed Jun 6, 2017
2 parents c5697c2 + 801a831 commit 8ec951405d4bb14d302cc7212e767ba30dd3b19c
View
@@ -152,7 +152,7 @@ If you are using PGSQL, uncomment the following four lines:
```
Depending on the database type you are using, you will need to uncomment the appropriate lines in the config, to enable lookups.
These control which domains you accept mail for and deliver locally (local_domains), which domains you accept mail for and deliver remotely (relay_to_domains), which IP addresses are allowed to send mail to any domain (relay_from_hosts) and which system users are considered trusted (trusted_users). More on these options – in Exim documentation.
These control which domains you accept mail for and deliver locally (local_domains), which domains you accept mail for and deliver remotely (relay_to_domains), which IP addresses are allowed to send mail to any domain (relay_from_hosts) and which system users are considered trusted (trusted_users). More on these options – in Exim documentation.
```
domainlist local_domains = @ : example.org : ${lookup mysql{VIRTUAL_DOMAINS}} : ${lookup mysql{ALIAS_DOMAINS}}
domainlist relay_to_domains = ${lookup mysql{RELAY_DOMAINS}}
@@ -181,7 +181,7 @@ exim_group = mail
```
Also it is assumed that the mysql domain socket is /tmp/mysql.sock, which is where the FreeBSD port puts it. Other installations put it in /var/tmp, /usr/lib, or any number of other places. If yours isn't /tmp/mysql.sock, you will need to set this.
TLS is activated by default. We suppose that you already created a SSL key and certificate.
TLS is activated by default. We suppose that you already created a SSL key and certificate.
```
tls_certificate = /etc/exim4/exim.crt
tls_privatekey = /etc/exim4/exim.key
@@ -198,7 +198,7 @@ The Diffie-Hellman group should have at least 1024 bit and can be created with t
In `tls_require_ciphers`, currently (2016) secure ciphers are selected. It works by default on GnuTLS setups (Debian/Ubuntu). If your distribution uses OpenSSL (e.g. FreeBSD, CentOS), comment the block `tls_require_ciphers = ...` and uncomment the line `openssl_options = ...`. If you are not sure, the output of `exim -bV` will show either GnuTLS or OpenSSL.
###### ACL's:
###### ACL's:
We have split all of the ACL's into separate files, to make managing them easier. Please review the ACL section of the configure file. If there are ACL's you would rather not have executed, please comment out the '.include' line that references them, or edit the ACL file directly and comment them out.
###### DEBIAN:
@@ -9,7 +9,7 @@ Installing Courier-IMAP 2.x on FreeBSD:
cp imapd.dist imapd
vi imapd
Installing Courier-IMAP on Debian:
Installing Courier-IMAP on Debian:
apt-get install courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-authlib-mysql courier-authdaemon
View
@@ -208,7 +208,7 @@ acl_smtp_mime = acl_check_mime
# This configuration variable defines the virus scanner that is used with
# the 'malware' ACL condition of the exiscan acl-patch. If you do not use
# virus scanning, leave it commented. Please read:
# http://www.exim.org/exim-html-current/doc/html/spec_html/ch-content_scanning_at_acl_time.html
# http://www.exim.org/exim-html-current/doc/html/spec_html/ch-content_scanning_at_acl_time.html
# for a list of supported scanners.
av_scanner = clamd:/var/run/clamav/clamd
@@ -221,8 +221,8 @@ av_scanner = clamd:/var/run/clamav/clamd
spamd_address = 127.0.0.1 783
# User who passes mails to spamassassin. He should have a home directory in order
# to save configuration and scanning data (e.g. for Bayes filter). The default
# vexim-user can be used for this purpose. If the user does not exist, SpamAssassin
# to save configuration and scanning data (e.g. for Bayes filter). The default
# vexim-user can be used for this purpose. If the user does not exist, SpamAssassin
# will fall back to "nobody" and default settings, with all consequences.
VEXIM_SA_USERNAME = vexim
View
@@ -59,7 +59,7 @@
<tr><td></td></tr>
<tr><td></td></tr>
<?php
$query = "SELECT alias,domain FROM domainalias,domains
$query = "SELECT alias,domain FROM domainalias,domains
WHERE domainalias.domain_id=:domain_id
AND domains.domain_id = domainalias.domain_id";
$sth = $dbh->prepare($query);
View
@@ -50,8 +50,8 @@
. $row['localpart']
. '"></a></td>';
print '<td>'
. '<a href="admincatchall.php?user_id='
. $row['user_id']
. '<a href="admincatchall.php?user_id='
. $row['user_id']
. '">'
. $row['realname']
. '</a></td>';
View
@@ -75,7 +75,7 @@
<td><?php echo _('Anti-Virus'); ?>:</td>
<td colspan="2"><input name="on_avscan" type="checkbox"></td>
</tr>
<?php }
<?php }
if ($row['spamassassin'] == "1") {
?>
<tr>
@@ -76,7 +76,7 @@
die;
}
$query = "INSERT INTO users
(localpart, username, domain_id, crypt, smtp, pop, uid, gid, realname, type, admin, on_avscan,
(localpart, username, domain_id, crypt, smtp, pop, uid, gid, realname, type, admin, on_avscan,
on_spamassassin, sa_tag, sa_refuse, spam_drop, enabled)
SELECT :localpart, :username, :domain_id, :crypt, :smtp, :pop, uid, gid, :realname, 'alias', :admin,
:on_avscan, :on_spamassassin, :sa_tag, :sa_refuse, :spam_drop, :enabled
@@ -99,7 +99,7 @@
':spam_drop'=>(isset($_POST['spam_drop']) ? $_POST['spam_drop'] : 0),
':enabled' => $_POST['enabled']
));
if ($success) {
header ("Location: adminalias.php?added={$_POST['localpart']}");
@@ -108,6 +108,6 @@
}
} else {
header ("Location: adminalias.php?badaliaspass={$_POST['localpart']}");
}
}
?>
<!-- Layout and CSS tricks obtained from http://www.bluerobot.com/web/layouts/ -->
View
@@ -4,7 +4,7 @@
include_once dirname(__FILE__) . '/config/functions.php';
include_once dirname(__FILE__) . '/config/httpheaders.php';
$query = "SELECT localpart,realname,smtp,on_avscan,on_spamassassin,sa_tag,sa_refuse,spam_drop,
admin,enabled FROM users
admin,enabled FROM users
WHERE user_id=:user_id AND domain_id=:domain_id AND type='alias'";
$sth = $dbh->prepare($query);
$sth->execute(array(':user_id'=>$_GET['user_id'], ':domain_id'=>$_SESSION['domain_id']));
@@ -36,13 +36,13 @@
<br><a href="logout.php"><?php echo _('Logout'); ?></a><br>
</div>
<div id="Forms">
<?php
<?php
# ensure this page can only be used to view/edit aliases that already exist for the domain of the admin account
if (!$sth->rowCount()) {
echo '<table align="center"><tr><td>';
echo "Invalid alias userid '" . htmlentities($_GET['user_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo "Invalid alias userid '" . htmlentities($_GET['user_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo '</td></tr></table>';
}else{
}else{
?>
<form name="aliaschange" method="post" action="adminaliaschangesubmit.php">
<table align="center">
@@ -178,10 +178,10 @@
</tr>
</table>
</form>
<?php
<?php
# end of the block editing an alias within the domain
}
?>
}
?>
</div>
</body>
</html>
@@ -4,17 +4,17 @@
include_once dirname(__FILE__) . '/config/functions.php';
include_once dirname(__FILE__) . '/config/httpheaders.php';
# confirm that the postmaster is updating an alias they are permitted to change before going further
# confirm that the postmaster is updating an alias they are permitted to change before going further
$query = "SELECT localpart,realname,smtp,on_spamassassin,sa_tag,sa_refuse,spam_drop,
admin,enabled FROM users
admin,enabled FROM users
WHERE user_id=:user_id AND domain_id=:domain_id AND type='alias'";
$sth = $dbh->prepare($query);
$sth->execute(array(':user_id'=>$_POST['user_id'], ':domain_id'=>$_SESSION['domain_id']));
if (!$sth->rowCount()) {
header ("Location: adminalias.php?failupdated={$_POST['localpart']}");
die();
die();
}
# Fix the boolean values
if (isset($_POST['admin'])) {
$_POST['admin'] = 1;
@@ -45,15 +45,15 @@
# Update the password, if the password was given
if(isset($_POST['password']) && $_POST['password']!=='' ){
if (validate_password($_POST['password'], $_POST['vpassword'])) {
if (!password_strengthcheck($_POST['password'])) {
if (!password_strengthcheck($_POST['password'])) {
header ("Location: adminalias.php?weakpass={$_POST['localpart']}");
die;
}
$cryptedpassword = crypt_password($_POST['password']);
$query = "UPDATE users SET crypt=:crypt WHERE user_id=:user_id AND domain_id=:domain_id AND type='alias'";
$sth = $dbh->prepare($query);
$success = $sth->execute(array(':crypt'=>$cryptedpassword, ':user_id'=>$_POST['user_id'], ':domain_id'=>$_SESSION['domain_id']));
if ($success) {
if ($_POST['localpart'] == $_SESSION['localpart']) {
$_SESSION['crypt'] = $cryptedpassword;
@@ -6,7 +6,7 @@
if(array_key_exists('confirm', $_GET)) {
if ($_GET['confirm'] == '1') {
$query = "DELETE FROM users
$query = "DELETE FROM users
WHERE user_id=:user_id
AND domain_id=:domain_id
AND (type='alias' OR type='catch')";
View
@@ -3,7 +3,7 @@
include_once dirname(__FILE__) . '/config/authpostmaster.php';
include_once dirname(__FILE__) . '/config/functions.php';
include_once dirname(__FILE__) . '/config/httpheaders.php';
$query = "SELECT smtp FROM users WHERE user_id=:user_id
$query = "SELECT smtp FROM users WHERE user_id=:user_id
AND domain_id=:domain_id AND type='catch'";
$sth = $dbh->prepare($query);
$sth->execute(array(':user_id'=>$_GET['user_id'], ':domain_id'=>$_SESSION['domain_id']));
@@ -25,13 +25,13 @@
<br><a href="logout.php"><?php echo _('Logout'); ?></a><br>
</div>
<div id="Forms">
<?php
<?php
# ensure this page can only be used to view/edit the catchall that already exist for the domain of the admin account
if (!$sth->rowCount()) {
if (!$sth->rowCount()) {
echo '<table align="center"><tr><td>';
printf(_("Invalid catchall userid '%s' for domain '%s'"), htmlentities($_GET['user_id']), htmlentities($_SESSION['domain']));
echo '</td></tr></table>';
}else{
}else{
?>
<form name="admincatchall" method="post" action="admincatchallsubmit.php">
<table align="center">
@@ -63,10 +63,10 @@ class="textfield"><br>
</tr>
</table>
</form>
<?php
<?php
# end of block shown for editing the domains catchall
}
?>
}
?>
</div>
</body>
</html>
@@ -19,7 +19,7 @@
'1' FROM domains WHERE domains.domain_id=:domain_id";
$sth = $dbh->prepare($query);
$success = $sth->execute(array(':domain'=>'*@'.$_SESSION['domain'], ':domain_id'=>$_SESSION['domain_id'], ':smtp'=>$_POST['smtp']));
if ($success) {
header ("Location: adminalias.php?updated=Catchall");
} else {
View
@@ -26,13 +26,13 @@
<br><a href="logout.php"><?php echo _('Logout'); ?></a><br>
</div>
<div="Forms">
<?php
<?php
# ensure this page can only be used to view/edit fail's that already exist for the domain of the admin account
if (!$sth->rowCount()) {
if (!$sth->rowCount()) {
echo '<table align="center"><tr><td>';
echo "Invalid fail userid '" . htmlentities($_GET['user_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo "Invalid fail userid '" . htmlentities($_GET['user_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo '</td></tr></table>';
}else{
}else{
?>
<form name="failchange" method="post" action="adminfailchangesubmit.php">
<table align="center">
@@ -57,10 +57,10 @@
</tr>
</table>
</form>
<?php
<?php
# end of the block editing a fail within the domain
}
?>
}
?>
</div>
</body>
</html>
@@ -11,7 +11,7 @@
':username'=>$_POST['localpart'].'@'.$_SESSION['domain'],
':user_id'=>$_POST['user_id'], ':domain_id'=>$_SESSION['domain_id']));
if ($success) {
header ("Location: adminfail.php?updated={$_POST['localpart']}");
header ("Location: adminfail.php?updated={$_POST['localpart']}");
} else {
header ("Location: adminfail.php?failupdated={$_POST['localpart']}");
die;
@@ -21,11 +21,11 @@
$sth = $dbh->prepare($query);
$success = $sth->execute(array(':localpart'=>$_POST['localpart'], ':domain_id'=>$_SESSION['domain_id']));
if ($success) {
header ("Location: admingroup.php?group_added={$_POST['localpart']}");
} else {
header ("Location: admingroup.php?group_failadded={$_POST['localpart']}");
}
if ($success) {
header ("Location: admingroup.php?group_added={$_POST['localpart']}");
} else {
header ("Location: admingroup.php?group_failadded={$_POST['localpart']}");
}
?>
<!-- Layout and CSS tricks obtained from http://www.bluerobot.com/web/layouts/ -->
View
@@ -27,14 +27,14 @@
<br><a href="logout.php"><?php echo _('Logout'); ?></a><br>
</div>
<div id="Forms">
<?php
<?php
# ensure this page can only be used to view/edit aliases that already exist for the domain of the admin account
if (!$sth->rowCount()) {
if (!$sth->rowCount()) {
echo '<table align="center"><tr><td>';
echo "Invalid groupid '" . htmlentities($_GET['group_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo "Invalid groupid '" . htmlentities($_GET['group_id']) . "' for domain '" . htmlentities($_SESSION['domain']). "'";
echo '</td></tr></table>';
}else{
?>
?>
<table align="center">
<form name="groupchange" method="post"
action="admingroupchangesubmit.php">
@@ -74,7 +74,7 @@ class="textfield">
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<td colspan="2">
<?php
$query = "SELECT u.realname, u.localpart, u.enabled, c.member_id
FROM users u, group_contents c
@@ -97,8 +97,8 @@ class="textfield">
<tr>
<td class="trash">
<a href="admingroupcontentdeletesubmit.php?group_id=<?php echo $_GET['group_id'];
?>&member_id=<?php echo $row['member_id'];
?>&localpart=<?php echo $grouplocalpart;
?>&member_id=<?php echo $row['member_id'];
?>&localpart=<?php echo $grouplocalpart;
?>">
<img class="trash"
title="Remove member <?php echo $row['realname']
@@ -151,10 +151,10 @@ class="textfield">
$sth->execute(array(':domain_id'=>$_SESSION['domain_id']));
while ($row = $sth->fetch()) {
?>
<option value="<?php echo $row['user_id'];
?>"><?php echo $row['realname'];
<option value="<?php echo $row['user_id'];
?>"><?php echo $row['realname'];
?> (<?php echo $row['localpart'].'@'.$_SESSION['domain']; ?>)</option>
<?php
<?php
}
?>
</select>
@@ -168,10 +168,10 @@ class="textfield">
</tr>
</form>
</table>
<?php
<?php
# end of the block editing a group within the domain
}
?>
}
?>
</div>
</body>
</html>
@@ -18,9 +18,9 @@
$sth = $dbh->prepare($query);
$success = $sth->execute(array(':localpart'=>$_POST['localpart'], ':enabled'=>$_POST['enabled'],
':is_public'=>$_POST['is_public'], ':group_id'=>$_POST['group_id'], ':domain_id'=>$_SESSION['domain_id']));
if ($success) {
header ("Location: admingroupchange.php?group_id={$_POST['group_id']}&group_updated={$_POST['localpart']}");
} else {
header ("Location: admingroupchange.php?group_id={$_POST['group_id']}&group_failupdated={$_POST['localpart']}");
if ($success) {
header ("Location: admingroupchange.php?group_id={$_POST['group_id']}&group_updated={$_POST['localpart']}");
} else {
header ("Location: admingroupchange.php?group_id={$_POST['group_id']}&group_failupdated={$_POST['localpart']}");
}
?>
Oops, something went wrong.

0 comments on commit 8ec9514

Please sign in to comment.