PDA

View Full Version : Postfix/Exchange Integration.


MattyB
16th January 2006, 00:32
Hi Peoples,
I am implementing RedHat Enterprise Linux in an existing Exchange environment. I will be using Postfix for front-end mail handling, here is what I would like to achieve; when am email comes into postfix it will verify with Active Directory via an LDAP query if the user/account exists (this part is functioning perfectly so far) and if it does then the mail is delivered to an existing Exchange mailbox, if the user/account does not exist in AD I want Postfix to check local recipient tables for local delivery so some users can POP the mail at a later date using Cyrus (or similar I've not decided as yet).

As I said – I have the LDAP query functioning fine at this point, but if the user does not exist in AD I get a 550 error where I would prefer some local recipient lookups to occur.

I’m sure that this must be possible – I have tried a few solutions but none have had the desired result..

Thanks in advance…
Matt.

falko
16th January 2006, 09:21
I think it must have something to do with the smtpd_recipient_restrictions line in /etc/postfix/main.cf...

MattyB
16th January 2006, 12:52
Hi Falko, thanks for your reply
Correct me if I'm wrong (and i probably am) but doesn't smtpd_recipient_restrictions just affect client access for delivery? As in the event of RBL listings or Relay Perms?

I thought I may have been able to do something like this in /etc/postfix/main.cf -

*****
...
local_recipient_maps = unix:passwd.byname $alias_maps
...
fallback_transport = ldap:/etc/postfix/ldap_relay_recipient_maps.cf
...
*****

But this does not appear tp have the desired effect.. It appears as though it still ignores one or the other (depending on my config) and won't check both tables for delivery ...

Cheers,
Matt.

falko
16th January 2006, 19:32
Correct me if I'm wrong (and i probably am) but doesn't smtpd_recipient_restrictions just affect client access for delivery? As in the event of RBL listings or Relay Perms?

I found this definition on http://www.linuxsecurity.com/docs/HOWTO/Postfix-EnGarde-HOWTO.html:

The smtpd_recipient_restrictions parameter, according to most Postfix documentation, specifies restrictions on recipient addresses that SMTP clients can send in RCPT TO commands. But in reality it can actually control ALL smtpd restrictions and it is highly recommended to put ALL of the smtpd restrictions in this parameter. (These are just a few of many restrictions - there is a more complete list documented in /etc/postfix/main.cf and sample configurations in /etc/postfix/samples).

* reject_unknown_client: reject the request if the client hostname is unknown (ie. not DNS resolveable).

* permit_mynetworks: permit if the client address matches $mynetworks (see "mynetworks" below).

* check_relay_domains: permit mail only:
o to destinations matching $inet_interfaces, $mydestination, or $virtual_maps,
o from trusted clients matching $relay_domains or subdomain thereof,
o from untrusted clients to destinations matching $relay_domains or subdomain thereof (except addresses with sender-specified routing),
o reject anything else.

smtpd_recipient_restrictions = reject_unknown_client,
permit_mynetworks, check_relay_domains