OPNsense Forum
Archive => 18.1 Legacy Series => Topic started by: procsik on February 01, 2018, 04:44:53 pm
-
Hello!
Whether there is a possibility to import users into lists of recipients/senders via web-gui? Or will such functionality appear?
thx!
-
If your postfix users are in a Radius or LDAP directory, you can use those as authentication sources in OPNsense.
Bart...
-
Whether there is a possibility to import users into lists of recipients/senders via web-gui? Or will such functionality appear?
Postfix has an API. Use can use that for bulk imports.
-
Postfix has an API. Use can use that for bulk imports.
I use postfix as MTA. For example, I do not want multiple users to receive emails from the outside world. For this, I would write the corresponding entries in the file /usr/local/etc/postfix/recipient_access. But I'm afraid that with the next updates and upgrades, my information will not be preserved. Otherwise, I'll have to add everyone separately through the web-gui.
If your postfix users are in a Radius or LDAP directory, you can use those as authentication sources in OPNsense.
Yes, I can use an authorization server with LDAP, but how it will help me add a lot of users to the recipient_access file via the web interface? Or I have to create all Internet users so that they can authenticate to my gateway? As far as I know, the smtpd_recipient_restrictions = check_recipient_access parameter is responsible for checking incoming mail relative to the recipient.
Still, I will have to manually add users until there is a System:Access:Server integration in the installer plugins, if that happens.
-
You should get familiar with the API to do this:
https://forum.opnsense.org/index.php?topic=6116.msg25681#msg25681
-
Postfix has an API. Use can use that for bulk imports.
You should get familiar with the API to do this:
https://forum.opnsense.org/index.php?topic=6116.msg25681#msg25681
Thanks for the help. It works:
curl -X POST -d '{"recipient":{"enabled":"1","address":"<email>","action":"OK"}}' -H "Content-Type: application/json" -k -u "<key>":"<secret>" http://<ipaddr>/api/postfix/recipient/addRecipient