D?vis Mos?ns: > piektd., 2024. g. 2. aug., plkst. 02:46 ? lietot?js Wietse Venema > (<wie...@porcupine.org>) rakst?ja: > > > > D?vis Mos?ns via Postfix-users: > > > ceturtd., 2024. g. 1. aug., plkst. 09:10 ? lietot?js Wietse Venema via > > > Postfix-users (<postfix-users@postfix.org>) rakst?ja: > > > > > > > > Davis Mosans via Postfix-users: > > > > > Hi, > > > > > > > > > > I'm trying to setup Postfix in a way that will forward/relay all mail > > > > > on SMTP port 25 but send out (don't forward) email when receiving on > > > > > submission port 465. > > > > > > > > You cant to receive email on port 465 and want to send that out to > > > > the internet? That requires that the SMTP clients have relay > > > > permission (permit_sasl_authenticated, reject). > > > > > > > > You want to receive email on port 25 from local systems, and forward > > > > their messages to the internet? That requires that local SMTP clients > > > > have relay permission (permit_mynetworks, reject_unauth_destination). > > > > > > > > You want to receive email on port 25 from the internet and want to > > > > forward messages for specific destinations? See Configuring Postfix > > > > as primary or backup MX host for a remote site", > > > > https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup > > > > > > > > You want to receive email on port 25 from anywhere on the internet > > > > and want to forward messages to anywhere on the internet? Don't do > > > > that. > > > > > > > > > > None of that is what I want. Also it's not about permissions, those work > > > fine. > > > What I want is forward incoming email on port 25 to internal email > > > server but at same time deliver outgoing email from port 465 and that > > > shouldn't be forwarded to internal server. > > > > You don't need two instances for that. One will do just fine. > > > > - Receive email on port 465 and to send that out to the internet. > > That is handled by the smtps or submissions example in master.cf. > > No transport map needed. Just remove the '#' from those lines. > > > That's the issue, transport map I have: > transport_maps = lmdb:/etc/postfix/transport > with: > * smtp:internal.example.org > > It's used for both cases. > > > - Receive email on port 25 from the internet and forward messages > > for specific destinations? That involves a transport map and > > relay_domains as described in > > https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup > > > > I want forward/relay all incoming mail for all domains not just few. > But even with this approach it doesn't work as in mail from > submissions port is still forwarded which is not what I want. > I tried: > transport_maps = lmdb:/etc/postfix/transport > relay_domains = $mydestination lmdb:/etc/postfix/relay > relay_recipient_maps = > relay_transport = relay > > and /etc/postfix/relay with: > * - > > and /etc/postfix/transport with: > * relay:internal.example.org
If you must route mail for ARBITRARY DESTINATIONS depending on what service it was received with, then in many cases you will need separate Postfix instances. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org