Difference between revisions of "Mailutils:HOWTO:Sendmail MU LDAP"

From Mailutils
Jump to navigationJump to search
Line 5: Line 5:
  
 
== LDAP ==
 
== LDAP ==
 +
 +
  
 
=== slapd.conf ===
 
=== slapd.conf ===
 +
 +
  
 
=== LDIF ===
 
=== LDIF ===
  
 
== sendmail ==
 
== sendmail ==
 +
we'll build sendmail with STARTTLS, SMTPAUTH, LDAP and db44 support
  
 
=== build config ===
 
=== build config ===
 +
site.config.m4
 +
<pre>
 +
##
 +
# general
 +
APPENDDEF(`confINCDIRS', `-I/usr/local/include -I/usr/local/include/db44')
 +
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib -L/usr/local/lib/db44')
 +
 +
## DB44
 +
#APPENDDEF(`confENVDEF', `-I/usr/local/include -I/usr/local/include/db44')
 +
#APPENDDEF(`conf_sendmail_LIBS', `-L/usr/local/lib -L/usr/local/lib/db44')
 +
 +
# SASL2 (smtp authentication)
 +
APPENDDEF(`confENVDEF', `-DSASL=2')
 +
APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')
 +
 +
# LDAP
 +
APPENDDEF(`confMAPDEF', `-DLDAPMAP')
 +
APPENDDEF(`confLIBS', `-lldap -llber')
 +
 +
# STARTTLS (smtp + tls/ssl)
 +
APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS -D_FFR_TLS_1')
 +
APPENDDEF(`conf_sendmail_LIBS', `-lssl -lcrypto')
 +
 +
# rest
 +
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER -DSOCKETMAP -DMAP_REGEX -DNEWDB')
 +
</pre>
  
 
=== sendmail.mc ===
 
=== sendmail.mc ===
  
 
=== mailertable ===
 
=== mailertable ===
 
+
<pre>
 +
test.foo.bar    local-ldap:test.foo.bar
 +
</pre>
 
== mu ==
 
== mu ==
  

Revision as of 13:35, 29 August 2013

Task

  • to get users database in accessible via LDAP
  • to get multidomain (multi domains with separate (if needed) users for each domain) support in sendmail

LDAP

slapd.conf

LDIF

sendmail

we'll build sendmail with STARTTLS, SMTPAUTH, LDAP and db44 support

build config

site.config.m4

##
# general
APPENDDEF(`confINCDIRS', `-I/usr/local/include -I/usr/local/include/db44')
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib -L/usr/local/lib/db44')

## DB44
#APPENDDEF(`confENVDEF', `-I/usr/local/include -I/usr/local/include/db44')
#APPENDDEF(`conf_sendmail_LIBS', `-L/usr/local/lib -L/usr/local/lib/db44')

# SASL2 (smtp authentication)
APPENDDEF(`confENVDEF', `-DSASL=2')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')

# LDAP
APPENDDEF(`confMAPDEF', `-DLDAPMAP')
APPENDDEF(`confLIBS', `-lldap -llber')

# STARTTLS (smtp + tls/ssl)
APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS -D_FFR_TLS_1')
APPENDDEF(`conf_sendmail_LIBS', `-lssl -lcrypto')

# rest
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER -DSOCKETMAP -DMAP_REGEX -DNEWDB')

sendmail.mc

mailertable

test.foo.bar    local-ldap:test.foo.bar

mu

config

mailutils.rc

pop3d

imap4d

maidag