hi Jamie,
i have setup in postfix main.cf:
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
But when I look into
Webmin/Postfix/SMTP Authentication And Encryption
I see under SMTP relaying restrictions NO option enabled.
Thanks for advice
Cheers mike
That's because currently, Webmin only supports editing the
smtpd_recipient_restrictionsdirective.Strange,
cause in Webmin/Postfix/SMTP Authentication And Encryption
the directive is exactly called : smtpd_relay_restrictions
Would be helpful if webmin would support all postfix directives.
cheers mike
Jamie,
i think you're wrong.
the directive in Webmin/Postfix/SMTP Authentication And Encryption
when you enable options under smtpd_relay_restrictions is wrong.
In fact webmin save these as the directive smtpd_recipient_restrictions.
No wonder that my settings of smtpd_relay_restrictions do not apear in this window.
i have verified this,
i enabled: Allow connections from same network in this window,
saved and applied and looked in main.cf.
on the bottom i found:
smtpd_recipient_restrictions = permit_mynetworks
this is a bug.
cheers mike
I had a look at the docs at http://www.postfix.org/SMTPD_ACCESS_README.html , and it looks like smtpd_relay_restrictions and smtpd_recipient_restrictions are two different (but similar) settings in Postfix. Currently Webmin only ever touches smtpd_recipient_restrictions , although maybe it should support both.
Very good idea to support both.
But the current one in Webmin/Postfix/SMTP Authentication And Encryption writes definitifly to main.cf directive smtpd_recipient_restrictions. So the title in this page must be changed from: "smtpd relay restrictions" to "smtpd recipient restrictions".
You could instead also put the directives to the page "Webmin/Postfix/SMTP Server Options", where all the other directives are.
Cheers mike
It's tricky because according to the docs, the meaning of that directive has changed in recently Postfix releases from applying to all connections to just relaying.
Nevertheless the current "smtpd relay restrictions" in "Webmin/Postfix/SMTP Authentication And Encryption" writes definitifly the directive "smtpd_recipient_restrictions" in main.cf
Atleast this title should be changed, to avoid confusion.
If the meaning of the directives would change, the user is informed by the postfix packet when installing the update anyway.
Cheers mike
Hi Jamie,
it's even worse,
the setting in "Webmin/SMTP Server Options/Restrictions on recipient addresses" points to the same directive like the setting in "Webmin/Postfix/SMTP Authentication And Encryption/smtpd relay restrictions".
Both point to the directive in main.cf "smtpd_recipient_restrictions".
This is really puzzled and confusing.
Since I found this , i would propose, that "Webmin/Postfix/SMTP Authentication And Encryption/smtpd relay restrictions" should point to "smtpd_relay_restrictions" in main.cf.
This is the missing directive.´and then everything would return to logic.
Thanks for repairing this please.
Cheers mike
Hi Jamie,
I have repaired the two responsible files in:
/usr/share/webmin/postfix
sasl.cgi
and
save_sasl.cgi
In both files I have replaced the directive:
"smtpd_recipient_restrictions"
with
"smtpd_relay_restrictions"
Now everything is working like it should.
I attach these two files.
Hope I could help you.
Cheers mike
Last edit: M.T.R 2017-04-11
I think what I'll do in the next release is support both these directives, and label them properly.
Jamie,
both directives are already there,
one in SMTP Server Options and one in SMTP Authentication And Encryption. The bug is only that the one in SMTP Authentication And Encryption does not write to the right directive in main.cf.
Instead of writing to "smtpd_relay_restrictions" it writes to "smtpd_recipient_restrictions",
which is already used in SMTP Server Options page.
My both uploaded files already solve the problem.
Hope i could make my point clear.
cheers mike