davidep
(Davide Principi)
June 12, 2015, 3:49pm
1
The feature #2919 is now ON_QA.
It aims to do by Server Manager what was done by some shell commands .
More specifically, if your LAN has some stupid printer that does not support SMTP/AUTH or that insists on using port 25 for relaying a message somewhere, here it comes the new “SMTP access tab”.
I opened also a PR on the admin manual:
Please tell me your impressions and suggestions!
To test it:
yum --enablerepo=nethserver-testing update nethserver-mail-common-1.4.5-1.8.g488d4ac.ns6
3 Likes
Do you not have at least a stupid printer into your network?
davidep
(Davide Principi)
June 12, 2015, 3:56pm
3
Exactly the reason because this feature exists
Printers waste papers and cause harmful features in mail servers
2 Likes
sitz
(Roberto Sitzia)
June 12, 2015, 6:35pm
4
God bless you @davidep
You cannot imagine how many stupid printers, server’s console, NAS, DVR, switches etc. etc. etc. doesn’t support SMTP/AUTH.
I’ll try it ASAP!!!
2 Likes
sitz
(Roberto Sitzia)
December 4, 2015, 9:48am
5
Hi @davidep
just a question where are stored configuration data for this feature?
I mean is a db?
davidep
(Davide Principi)
December 4, 2015, 9:58am
6
Good question, it should be documented here:
http://docs.nethserver.org/projects/nethserver-devel/en/latest/email.html?highlight=email#configuration-database
but it’s missing
Anyway the prop should be postfix/AccessBypassList
, as we can see here:
#
# 10smtpaccess -- IP based policy from UI
#
{
$OUT = '';
foreach (split(/,/, $postfix{'AccessBypassList'})) {
$OUT .= sprintf("%s OK\n", $_);
}
}
And there, in UI
* Description of Access
*
* @author Davide Principi <davide.principi@nethesis.it>
*/
class SmtpAccess extends \Nethgui\Controller\AbstractController
{
public function initialize()
{
parent::initialize();
$this->declareParameter('AccessBypassList', $this->createValidator(TRUE), array('configuration', 'postfix', 'AccessBypassList'));
$this->declareParameter('AccessPolicyTrustedNetworks', \Nethgui\System\PlatformInterface::YES_NO, array('configuration', 'postfix', 'AccessPolicies'));
}
public static function splitLines($text)
{
return array_filter(preg_split("/[,;\s]+/", $text));
}
public function readAccessBypassList($dbList)
{