Skip to content

Commit

Permalink
Text formatting
Browse files Browse the repository at this point in the history
Deleted spaces and tabs at EOL
  • Loading branch information
kvsmirnov committed Jun 2, 2017
1 parent c5697c2 commit 801a831
Show file tree
Hide file tree
Showing 30 changed files with 119 additions and 119 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/clients/courierimap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
6 changes: 3 additions & 3 deletions docs/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vexim/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions vexim/adminalias.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>';
Expand Down
2 changes: 1 addition & 1 deletion vexim/adminaliasadd.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions vexim/adminaliasaddsubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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']}");
Expand All @@ -108,6 +108,6 @@
}
} else {
header ("Location: adminalias.php?badaliaspass={$_POST['localpart']}");
}
}
?>
<!-- Layout and CSS tricks obtained from http://www.bluerobot.com/web/layouts/ -->
14 changes: 7 additions & 7 deletions vexim/adminaliaschange.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']));
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -178,10 +178,10 @@
</tr>
</table>
</form>
<?php
<?php
# end of the block editing an alias within the domain
}
?>
}
?>
</div>
</body>
</html>
Expand Down
12 changes: 6 additions & 6 deletions vexim/adminaliaschangesubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion vexim/adminaliasdelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')";
Expand Down
14 changes: 7 additions & 7 deletions vexim/admincatchall.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']));
Expand All @@ -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">
Expand Down Expand Up @@ -63,10 +63,10 @@ class="textfield"><br>
</tr>
</table>
</form>
<?php
<?php
# end of block shown for editing the domains catchall
}
?>
}
?>
</div>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion vexim/admincatchallsubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions vexim/adminfailchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -57,10 +57,10 @@
</tr>
</table>
</form>
<?php
<?php
# end of the block editing a fail within the domain
}
?>
}
?>
</div>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion vexim/adminfailchangesubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions vexim/admingroupaddsubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/ -->
26 changes: 13 additions & 13 deletions vexim/admingroupchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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
Expand All @@ -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']
Expand Down Expand Up @@ -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>
Expand All @@ -168,10 +168,10 @@ class="textfield">
</tr>
</form>
</table>
<?php
<?php
# end of the block editing a group within the domain
}
?>
}
?>
</div>
</body>
</html>
Expand Down
8 changes: 4 additions & 4 deletions vexim/admingroupchangesubmit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']}");
}
?>
Loading

0 comments on commit 801a831

Please sign in to comment.