OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • [SOLVED] Postfix Import
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Postfix Import  (Read 3575 times)

procsik

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
[SOLVED] Postfix Import
« 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!
« Last Edit: February 02, 2018, 09:57:16 am by procsik »
Logged

bartjsmit

  • Hero Member
  • *****
  • Posts: 1594
  • Karma: 167
    • View Profile
Re: Postfix Import
« Reply #1 on: February 01, 2018, 04:49:41 pm »
If your postfix users are in a Radius or LDAP directory, you can use those as authentication sources in OPNsense.

Bart...
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2768
  • Karma: 199
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Postfix Import
« Reply #2 on: February 01, 2018, 05:49:21 pm »
Quote from: procsik on February 01, 2018, 04:44:53 pm
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.
Logged

procsik

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Postfix Import
« Reply #3 on: February 01, 2018, 11:16:27 pm »
Quote from: fabian on February 01, 2018, 05:49:21 pm
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.

Quote from: bartjsmit on February 01, 2018, 04:49:41 pm
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.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6331
  • Karma: 435
    • View Profile
Re: Postfix Import
« Reply #4 on: February 02, 2018, 06:04:22 am »
You should get familiar with the API to do this:

https://forum.opnsense.org/index.php?topic=6116.msg25681#msg25681
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

procsik

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Postfix Import
« Reply #5 on: February 02, 2018, 09:56:57 am »
Quote from: fabian on February 01, 2018, 05:49:21 pm
Postfix has an API. Use can use that for bulk imports.

Quote from: mimugmail on February 02, 2018, 06:04:22 am
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:

Code: [Select]
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
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • [SOLVED] Postfix Import
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2