initial commit of file from CVS for smeserver-qpsmtpd on Thu 26 Oct 11:25:19 BST 2023

This commit is contained in:
2023-10-26 11:25:19 +01:00
parent c8bfca82cb
commit c45ac2b2d0
197 changed files with 3867 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
{
use esmith::DomainsDB;
my $ddb = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB";
@domains = map $_->key, $ddb->domains;
"";
}

View File

@@ -0,0 +1,5 @@
{
return "" unless (defined $ExternalIP);
return "postmaster\@[$ExternalIP]";
}

View File

@@ -0,0 +1,8 @@
{
$OUT = "";
for my $user ( qw(admin root) )
{
$OUT .= "$user\@$_\n" for (@domains);
}
}

View File

@@ -0,0 +1,24 @@
{
# Make a list of all valid local recipients
use esmith::AccountsDB;
my %valid = map { $_ => 1 } qw(group pseudonym user mailmanlist mailinglist);
$OUT = "";
my $adb = esmith::AccountsDB->open_ro();
foreach my $account ($adb->get_all)
{
my $key = $account->key;
next unless $valid{$account->prop('type')};
if ($key =~ /\@/)
{
$OUT .= "$key\n";
}
else
{
$OUT .= "$key\@$_\n" for (@domains);
}
}
}

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 . "\n";
}
}