initial commit of file from CVS for e-smith-qmail on Wed 12 Jul 09:06:46 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:06:46 +01:00
parent 522798702f
commit 2d08981b2a
67 changed files with 2072 additions and 2 deletions

View File

@@ -0,0 +1 @@
MAILER-DAEMON

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ (defined $DB->get('qmail')->prop('ConcurrencyLocal')) ? $DB->get('qmail')->prop('ConcurrencyLocal') : "20"; }

View File

@@ -0,0 +1 @@
{ (defined $DB->get('qmail')->prop('ConcurrencyRemote'))? $DB->get('qmail')->prop('ConcurrencyRemote') : "20"; }

View File

@@ -0,0 +1 @@
{ $DB->get('qmail')->prop('MaxMessageSize') || "0"; }

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ $DB->get('qmail')->prop('DoubleBounceTo') || "postmaster"; }

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ $qpsmtpd{HeloHost} || $DomainName }

View File

@@ -0,0 +1,11 @@
#
# Everything except the localhost and the local machine name is now
# treated as a virtual domain.
#
localhost
{"$SystemName.$DomainName"}
{
return "# No ExternalIP" unless (defined $ExternalIP);
return "[$ExternalIP]";
}

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1 @@
{ $DomainName }

View File

@@ -0,0 +1,25 @@
{
#
# qmail's smtproutes mechanism works such that the LAST BEST match
# found in /var/qmail/control/smtproutes will be used in preference
# to any other entry.
#
# Consider the following /var/qmail/control/smtproutes example:
#
# :smarthost.somewhere
# domain.place:some.host
# domain.place:other.host
# :some.other.smarthost.elsewhere
#
# Mail for user@domain.place will ALWAYS be delivered to
# other.host. The entry for some.host will NEVER be used.
#
# Mail for any other domain will ALWAYS be delivered to
# some.other.smarthost.elsewhere. The entry for smarthost.somewhere
# will NEVER be used.
#
# Therefore, if you wish to make any customisations to the
# /var/qmail/control/smtproutes templates, you must ensure that they
# appear AFTER the standard e-smith template entries.
#
}

View File

@@ -0,0 +1,17 @@
{
$OUT = "";
use esmith::DomainsDB;
my $ddb = esmith::DomainsDB->open_ro();
for my $domain ( $ddb->domains )
{
my $mail_server = $domain->prop('MailServer')
|| $DelegateMailServer
|| 'localhost';
next if ( $mail_server eq 'localhost' );
$OUT .= $domain->key . ":$mail_server\n";
}
}

View File

@@ -0,0 +1,28 @@
{
$OUT = "";
#--------------------------------------------------
# Now check for SMTP smart host
#--------------------------------------------------
if (
$SMTPSmartHost
&&
($SMTPSmartHost ne 'off')
&&
($SMTPSmartHost !~ /^\s*$/)
)
{
# Is the smtp-auth-proxy enabled?
if (${'smtp-auth-proxy'}{'status'} eq 'enabled')
{
$OUT .= ":localhost:26";
}
else
{
$OUT .= ":$SMTPSmartHost";
}
}
chomp ($OUT);
}

View File

@@ -0,0 +1,19 @@
{
$OUT = '';
use esmith::DomainsDB;
my $domainsdb = esmith::DomainsDB->open_ro();
for my $domain ($domainsdb->domains)
{
my $mail_server = $domain->prop('MailServer')
|| $DelegateMailServer
|| 'localhost';
next if ( $mail_server ne 'localhost' );
$emaildomain = $domain->key;
my $handler = $domain->prop('EmailTo') || "alias-localdelivery";
$OUT .= "$emaildomain:$handler\n";
}
}

View File

@@ -0,0 +1,26 @@
{
my $dms = $DelegateMailServer;
return "# DelegateMailServer is set" if ($dms && ($dms !~ /^\s*$/));
$OUT = "";
use esmith::AccountsDB;
my $adb = esmith::AccountsDB->open_ro or die "Couldn't open AccountsDB";
for my $pseudo ($adb->pseudonyms)
{
next unless ($pseudo->key =~ /@/);
my $account = $pseudo->prop("Account");
$account = "admin" and warn $pseudo->prop("Account") . " is not a valid account, default to admin " unless $adb->get($account);
my $acct = $adb->get($account);
if ($acct->prop('type') eq "group")
{
$account =~ s/\./:/g;
}
$OUT .= $pseudo->key . ":$account\n";
}
}