OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: "#" character as the first character of the email address in the map file

From: Brian Evans (grknightscent-team.com)
Date: Thu Apr 03 2008 - 14:49:04 CDT


Jevos, Peter wrote:
>> -----Original Message-----
>> From: Victor Duchovni [mailto:Victor.Duchovnimorganstanley.com]
>> Sent: Thursday, April 03, 2008 7:59 PM
>> To: Jevos, Peter
>> Cc: postfix-userspostfix.org
>> Subject: Re: "#" character as the first character of the email address
>> in the map file
>>
>> On Thu, Apr 03, 2008 at 07:11:32PM +0200, Jevos, Peter wrote:
>>
>>
>>>> If you query AD directly, the "#" addresses will work fine. Do you
>>>>
>> have
>>
>>>> to query a snapshot? Would the query load be too high? Many people
>>>> dedicate a replica LDAP (AD) server for mail servers, so users are
>>>> not impacted by high mail server query load.
>>>>
>>> Hi I'm using Chris Covington's script from
>>> http://www-personal.umich.edu/~malth/gaptuning/postfix/
>>>
>>> Yes, it takes about 4 minutes to get it. There is about 30000
>>>
>> addresses
>>
>>> in the reply_recipents file
>>>
>> Consider using LDAP directly:
>>
>> search_base = ...
>> query_filter = proxyaddresses = smtp:%s
>> result_attribute = mail
>> bind_dn = ...
>> bind_pw = ...
>>
>>
>
> It looks interesting. So in my case would it be?
>
> #main.cf
> relay_recipients = ldap:/etc/postfix/relay-recipients.cf
>
> And file relay_recipients would be:
>
> server_host = ldap.example.com
> server_port = 3268
> search_base = dc=domain dc=com
> query_filter = proxyaddresses = smtp:%s
> result_attribute = mail
> scope = sub
> bind_dn = username
> bind_pw = pwd
>
> Should I run postmap sometimes or not ? Will be configuration above
> working directly and constantly ?
>
>
LDAP lookup tables do not need to have postmap run against them to build
a database unlike some other lookup tables.

You can, and should for initial testing, use `postmap -q
testexample.com ldap:/etc/postfix/relay-recipients.cf` to test out if
your ldap lookup will work successfully.

Brian