OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Routing questions

From: Doug Mayle (douglas.maylegmail.com)
Date: Thu Aug 02 2007 - 11:40:28 CDT


Hi everybody,
   I've been reading through the docs, and faqs, and experimenting and
searching, and I'm pulling my hair out because I can't figure out what I'm
doing wrong, and I was hoping someone might point me in the right direction.

    I use LDAP auth in my network for all of my domains, so I have users of the
form "userdomain.com". This works just fine for logging in, etc. (e.g. ssh
"userdomain.com"myserver.mydomain.com) Because I've gone to all of the
trouble of setting up local unix accounts for all of my users, I was hoping to
use local delivery (if not, I have to set up virtual aliases, gid aliases, uid
aliases, etc. which means a lot more round trips to the LDAP server, when I
already have all in the local user database).

    The problem comes when my alias comes back "userdomain.com", local tries
to deliver to the local user "user" and not "userdomain.com". Is there a way
to get local to accept the user name. For a log example, I get:

Aug 2 10:22:20 [postfix/smtpd] maps_find: local_recipient_maps:
unix:passwd.byname(0,lock|fold_fix): johnmydomain.com =
johnmydomain.com:x:2005:2000:John Doe:/home/mydomain.com/john:/bin/
bash
Aug 2 10:22:20 [postfix/smtpd] mail_addr_find: johnmydomain.com ->
johnmydomain.com:x:2005:2000:John
Doe:/home/mydomain.com/john:/bin/bash
Aug 2 10:22:20 [postfix/local] warning: maildir access problem for
UID/GID=2003/2000: create maildir file
/home/john/.maildir/tmp/1186042940.P3279.mail.mydomain.com: Permission
denied
Aug 2 10:22:20 [postfix/local] warning: perhaps you need to create
the maildirs in advance
Aug 2 10:22:20 [postfix/local] 7E56734CB9: to=<johnmydomain.com>,
relay=local, delay=0.67, delays=0.28/0.02/0/0.37, dsn=5.2.0,
status=bounced (maildir delivery failed: create maildir file /hom
e/john/.maildir/tmp/1186042940.P3279.mail.mydomain.com: Permission denied)

    As you can see, the mail lookup gives a home directory of
/home/mydomain.com/john (UID 2005) but it tries instead delivering to the user
"john" who has a home directory of /home/john (UID 2003, whose home directory
doesn't exist in the test). Is there a way to get postfix to deliver to the
correct user?

Thanks,
    Douglas Mayle