generated from smedev/Template-for-SMEServer-Core-Package
- add mini-qmail as Message delivery agent [SME: 12737] few other fixes; +x on needed executable files migrate old qmail properties used in postfix catch all non existing recipient / check BCC working
32 lines
688 B
Plaintext
32 lines
688 B
Plaintext
{
|
|
$OUT = '';
|
|
|
|
use esmith::DomainsDB;
|
|
my $domainsdb = esmith::DomainsDB->open_ro();
|
|
|
|
|
|
|
|
for my $domain ($domainsdb->get_all)
|
|
{
|
|
|
|
my $mail_server = $domain->prop('MailServer')
|
|
|| $DelegateMailServer
|
|
|| 'localhost';
|
|
|
|
if ( $mail_server ne 'localhost' )
|
|
{
|
|
my ($dest,$port) = split(':',$mail_server);
|
|
$port = ( $port =~ /^\d+$/)? $port : "25";
|
|
$emaildomain = $domain->key;
|
|
$OUT .= "$emaildomain\t smtp:[$dest]:$port\n";
|
|
}
|
|
else
|
|
{
|
|
$emaildomain = $domain->key;
|
|
$OUT .= "$emaildomain\t local:\$myhostname\n";
|
|
}
|
|
|
|
}
|
|
|
|
}
|