Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i had mailserver and mailbox server are in two different machines.
Both are having the same domain (linux.com)
In my mailserver i configured all the mails to relay to my mailbox
server.
SMTP authentication is also enabled
The problem is I configured LDAP in my mailserver to store user
information.
I created all the users in the ldap database.
So when i try to send a mail to a user exists in ldap database, where
as only mailbox
is present in the mailbox server without user, my mail is not
delivering to the recipient it
was bouncing back to the sender.When i check the log i found that
it was not checking the ldap database itself.
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
access to attrs=userPassword
by self write
by dn="cn=syncuser,dc=linux,dc=com" read
by anonymous auth
by * none
access to *
by dn="cn=syncuser,dc=linux,dc=com" read
by * read
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
index default sub
The LDIF file which i added in ldap
dn: uid=saurav,ou=solution,dc=linux,dc=com
cn: Manaager
sn: ganguly
uid: saurav
mail: sau...@linux.com
description: Indian Team
telephoneNumber: 012101012
userPassword: password
uidNumber: 1023
homeDirectory: /home/saurav/
gidNumber: 10023
objectClass: person
objectClass: top
objectClass: inetOrgperson
objectClass: posixAccount
dn: uid=anil,ou=solution,dc=linux,dc=com
cn: Manager
sn: kumble
uid: anil
mail: a...@linux.com
description: Indian Team
telephoneNumber: 0212101012
userPassword: password
uidNumber: 1024
homeDirectory: /home/anil/
gidNumber: 1034
objectClass: person
objectClass: top
objectClass: inetOrgperson
objectClass: posixAccount
This is the logs which are taken when i send mail from client to the
user who has added in ldap database.
Apr 12 17:20:32 experts postfix/smtpd[6010]: connect from
unknown[151.2.117.166]
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_list_match:
unknown: no match
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_list_match:
151.2.117.166: no match
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_list_match:
unknown: no match
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_list_match:
151.2.117.166: no match
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_hostname: unknown
~? 151.2.0.0/16
Apr 12 17:20:32 experts postfix/smtpd[6010]: match_hostaddr:
151.2.117.166 ~? 151.2.0.0/16
I'm not reading all that, but are your postfix config files from the mailserver or mailbox server? I'd have thought the latter since that sounds like where your problem is, but isn't your ldap server remote from the mailbox server? If so, ldapaliases_server_host = localhost doesn't look correct. Ditto server_host = 127.0.0.1
my postfix config files is from mailserver not from mailbox server.
In my mailbox server only mailboxes are available not even user,since
users are available in ldap directory.
In my setup smtp and ldap are in one machine and mailbox is in different machine.
so when i send mail from client like outlook,it must go to mailserver for smtp authentication and look ldap for user information and mailbox location and deliver the mail to mailbox location which is in another machine.this is requirement,i have been trying this for long time.
Did i want to mention my mailbox server ip address in ldapaliases_server_host=
or
my mailserver ip where ldap is located?
plz help me with this one.
my mailbox server is running postfix.
Only postfix service will be running in mmailbox server.
In mailbox server i will create different users so automatically
mailbox will be created for particular users in /var/spool/mail/ directory.
So when i send mail from cilent such as outlook, mail will go to smtp server ie. mailserver in that i will mention my mailbox server its an openrelay,so mail will reach the destination mailbox.
By using LDAP
Now at present setup,am using ldap in my mailserver i wont create any user in mailbox server,instead i will create only the mailbox in a
particular location /var/spool/mail/saurav and user location and mailaddress(saurav@linux.com) will be in my ldap directory.
So when i send mail from client(outlook) it will go to mailserver and it must want to check the ldap directory get the recipent address and mailbox location and mail should be delivered in mailbox folder of that user.
I'm not sure where ldapaliases_server_host even comes from (I can't see it on the postfix site), but I'd bet on it being the ldap server. Use a fully qualified domain name rather than localhoast if you can
Go back to basics a bit. Kill the authentication first - you may want to add permit_mynetworks to smtpd_recipient_restrictions, and let's see what the logs say. The reason for this is it's too hard to fix postfix if you are trying to d otoo much at one time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.