postfix and SMTP AUTH - help please
"Marco Carcano" <mcarcano-IvpIpsuCVxdWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.isp.ispman.user |
|---|---|
| Message-ID | <002b01c5021a$fe23c710$0400000a@pc01> |
Hi, I want to have email clients to authenticate in order to send email:
so I'm trying to have postfix to relay out of my network only with SMTP
auth:
I read quite a lot of docs, but I can't find wy my environ is not working:
so,
from /etc/postifx/main.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_sasl_auth_client = yes
smtp_sender_restrictions =
...
permit_sasl_authenticated,
permit_mynetworks,
check_relay_domains
smtp_recipient_restrictions =
...
permit_sasl_authenticated,
permit_mynetworks,
...
check_relay_domains
from /etc/sysconfig/saslauthd (I'm using Fedora core 3)
start=yes
SOCKETDIR=/var/run/saslauthd
MECH=pam
FLAGS=
from /etc/pam.d/smtp
auth required /lib/security/pam_ldap.so
account required /lib/security/pam_ldap.so
password required /lib/security/pam_ldap.so use_authok
session required /lib/security/pam_ldap.so
from /usr/lib/sasl/smtpd.conf
pwcheck_method: saslauthd
saslauthd_version: 2
from /usr/lib/sasl2/smtpd.conf (this is the really important one)
pwcheck_method: saslauthd
mech_list: plain login
from /etc/ldap.conf (pam_ldap use this file to estabilish logins)
host 127.0.0.1
base o=ispman
ldap_version = 3
binddn = cn=Directory Administrator,o=ispman
bindpw mysecret
pam_password crypt
ssl no
Notice that slapd is already properly configured (I can run webpanel,
courierimap, apache, bind, pureftpd, freeradius, sqwebmail, .. they are all
in good working order)
I really don't know what goes wrong, but before getting completely crazy I
enabled loggin in slapd, so I noticed this:
from /var/log/slapd.log
conn=1 op=1 SRCH base "o=ispman" scope=2 deref=0,
filter="[email protected]"
conn=1 op=1 SRCH attr=homeDirectory, maibox, cn, clearPassword,
userPassword, uidNumber, gidNumber, uid, mailQuota
conn=1 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
The above is logged when attempting a pop3 access with courier with its (own
ldap module), not usin pam_ldap
Below instead is an access with SMTP AUTH:
from /var/log/slapd.log
conn=10 op=1 SRCH base "o=ispman" scope=2 deref=0, filter="uid=user"
conn=10 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
So I noticed 2 things: uid is not the one provided by email client (which
sent [email protected])
again the 2nd thing is nentries=0
what do you think about? May somone help me?
Thanks since now
Marco Carcano
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl