Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Mail Filter Server with Postfix

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

Mail Filter Server with Postfix

  • Quote

Post by ROGA » Sat Oct 22, 2022 8:23 am

Hi,

I would like to build a front-Mail-Server to filtering spam, av, dnsbl etc. from scratch with postfix. It should only receive emails for recipient, that exists in a windows active directory. So, I need support for ldap. But which use-flag do i need for compiling postfix? ldap or ldap-bind? What's difference? Do I also need the use-flags sasl?

thanks for explanation and help!
regards,

Roland
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Oct 22, 2022 10:50 am

From https://www.gentoo.org/support/use-flags/

Code: Select all

global
ldap 	Add LDAP support (Lightweight Directory Access Protocol)

postfix
dovecot-sasl 	Enable net-mail/dovecot protocol version 1 (server only) SASL implementation
eai 	Add support for SMTPUTF8
ldap-bind 	Add support for binding to LDAP backend using dev-libs/cyrus-sasl
lmdb 	Add support for using dev-db/lmdb for lookup tables
memcached 	Add support for using net-misc/memcached for lookup tables
If I understand you correctly, this postfix instance is supposed to only act as a sanitizing proxy for incoming mail. You want to filter mail before passing it to another server equipped with some storage backend, right?
In this case I'd try use ldap. Receiving mail does not call for authentication, so sasl is not required on a proxy (MTA).


Im my personal setup I'm using dovecot-sasl, which delegates authentication to the storage backend which in turn queries mysql database, however this authentication is only used for mail submission. When it comes to receiving mail, I have postfix run SQL query for virtual mailboxes and virtual aliases directly, before forwarding it to dovecot.
You'll need an ldap query there and probably a relay host instead, but the idea is not too different.
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Sat Oct 22, 2022 12:43 pm

@szatox:

Thanks for your answer. I have already read this summary for use-flags but could not determine the difference between ldap and ldap-bind.

You understand me right. The Mail-Filter Server should only act as a sanitizing proxy for the incoming mails. Therefore I do not need virtual Users nor do I need a mysql Server Instance. I only want to query the AD-Server for an answer, if a E-Mail User exist or not. So whitch USE-Flag do I need to build postfix correctly to make this query? Is it possible, that the USE-Flag ldap does have more functionality as ldap-bind?
regards,

Roland
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sat Oct 22, 2022 1:22 pm

From postifx's ebuild:
DEPEND="[...]
ldap? ( net-nds/openldap:= )
ldap-bind? ( net-nds/openldap:=[sasl] )
"
REQUIRED_USE="ldap-bind? ( ldap sasl )"
So, ldap-bind requires ldap and sasl in postfix and also sasl in openldap.
Well, if your MTA won't be used for mail submission, there is no need for authentication mechanisms. You need ldap anyway, but ldap-bind is not necessary for your use case.

Therefore I do not need virtual Users nor do I need a mysql Server Instance
You don't need mysql, since you want to query LDAP, but you do need virtual users because that's where you will put a path to your LDAP query.
Unless you found another hook for that?
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic