OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: [Fwd: ldap users & aliases config]

From: Victor Duchovni (Victor.Duchovnimorganstanley.com)
Date: Thu May 08 2008 - 11:24:58 CDT


On Thu, May 08, 2008 at 05:16:27PM +0100, Wojtek Bogusz wrote:

> >>virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf
> >
> >This applies to all recipient addresses, not just those in your domain.
>
> yes. we have just one domain. and i wanted to avoid writing this domain
> in all aliases and addresses. so instead i am just checking the user
> names / alias names and leave the domain static listed in other settings.

You never send any mail out? Not even legitimate bounces? Seems unlikely.

> >This ignores the domain part without restricting it. The result is that
> >you rewrite <localpart><any.domain> provided the local part is the "sn"
> >of one of your users. A terrible idea.
>
> why is it terrible idea?
>

You will rewrite "your-last-namegmail.com" to "your-accountgmail.com"
even though the "gmail.com" address has nothing to do with you or your
account.

> >>$ sudo postmap -q wojtekboguszfrontlinedefenders.org
> >>ldap:/etc/postfix/ldap-aliases.cf
> >>$ sudo postmap -q wojtekbogusz ldap:/etc/postfix/ldap-aliases.cf
> >>
> >>is nothing...
> >
> >Good. Are these expected to match anything?
>
> yes. if you do:

The strings "admin" and "wojtekbogusz" are not the same.

> $ ldapsearch -b 'ou=EmailAliases,dc=frontline' -x 'sn=admin' cn

This query filter is not the one you are using in the Postfix
table definitions. Compare apples with apples.

> May 8 17:13:01 base postfix/smtpd[16729]: NOQUEUE: reject: RCPT from
> unknown[192.168.0.3]: 550 5.1.1 <adminfrontlinedefenders.org>:
> Recipient address rejected: User unknown in virtual mailbox table
> ; from=<wojtekriseup.net> to=<adminfrontlinedefenders.org> proto=SMTP
> helo=<vortex.localhost>

Naturally, since "postmap -q" does not see "admin". Fix that first. Try
"postmap -vq" and see what query Postfix sends, try that query for
yourself with "ldapsearch" if you like. Make sure your result_attribute
is valid.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.