Files
smeserver-postfix/root/etc/e-smith/templates/etc/postfix/transport/10hosts
Jean-Philippe Pialasse df66a327cc * Sun Dec 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-5.sme
- 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
2024-12-17 00:30:48 -05:00

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";
}
}
}