initial commit of file from CVS for e-smith-qmail on Wed 12 Jul 09:06:46 BST 2023
This commit is contained in:
1
root/etc/e-smith/templates/var/qmail/control/bouncefrom
Normal file
1
root/etc/e-smith/templates/var/qmail/control/bouncefrom
Normal file
@@ -0,0 +1 @@
|
||||
MAILER-DAEMON
|
1
root/etc/e-smith/templates/var/qmail/control/bouncehost
Normal file
1
root/etc/e-smith/templates/var/qmail/control/bouncehost
Normal file
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@@ -0,0 +1 @@
|
||||
{ (defined $DB->get('qmail')->prop('ConcurrencyLocal')) ? $DB->get('qmail')->prop('ConcurrencyLocal') : "20"; }
|
@@ -0,0 +1 @@
|
||||
{ (defined $DB->get('qmail')->prop('ConcurrencyRemote'))? $DB->get('qmail')->prop('ConcurrencyRemote') : "20"; }
|
1
root/etc/e-smith/templates/var/qmail/control/databytes
Normal file
1
root/etc/e-smith/templates/var/qmail/control/databytes
Normal file
@@ -0,0 +1 @@
|
||||
{ $DB->get('qmail')->prop('MaxMessageSize') || "0"; }
|
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
1
root/etc/e-smith/templates/var/qmail/control/defaulthost
Normal file
1
root/etc/e-smith/templates/var/qmail/control/defaulthost
Normal file
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@@ -0,0 +1 @@
|
||||
{ $DB->get('qmail')->prop('DoubleBounceTo') || "postmaster"; }
|
1
root/etc/e-smith/templates/var/qmail/control/envnoathost
Normal file
1
root/etc/e-smith/templates/var/qmail/control/envnoathost
Normal file
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
1
root/etc/e-smith/templates/var/qmail/control/helohost
Normal file
1
root/etc/e-smith/templates/var/qmail/control/helohost
Normal file
@@ -0,0 +1 @@
|
||||
{ $qpsmtpd{HeloHost} || $DomainName }
|
11
root/etc/e-smith/templates/var/qmail/control/locals
Normal file
11
root/etc/e-smith/templates/var/qmail/control/locals
Normal 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]";
|
||||
}
|
1
root/etc/e-smith/templates/var/qmail/control/me
Normal file
1
root/etc/e-smith/templates/var/qmail/control/me
Normal file
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
1
root/etc/e-smith/templates/var/qmail/control/plusdomain
Normal file
1
root/etc/e-smith/templates/var/qmail/control/plusdomain
Normal file
@@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@@ -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.
|
||||
#
|
||||
}
|
@@ -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";
|
||||
}
|
||||
}
|
@@ -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);
|
||||
}
|
@@ -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";
|
||||
}
|
||||
}
|
@@ -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";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user