Required configuration
$params =
[
'bind_ip' => 'XXX.XXX.XXX.XXX', // IP to BIND
'bind_port' => 25, // port to bind
'server' => 'ext.domain.tld', // publish server name
'max_size' => (2010241204), // 20 Mb of ma sise
'maxcommandlinesize'=> 4096,
'messagestore'=> '/home/smtpd/messages', // place to store received messages
];
To launch the service
php7.4 smtpd-light.php
php7.4 smtpd-light.php &
Zone DNS configuration in your domain configuration
ext.domain.tld. IN MX 1 ext.domain.tld.
ext.domain.tld. IN A XXX.XXX.XXX.XXX