46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
--- sendmail-bak/cf/feature/ldap_routing.m4 2009-06-26 23:11:08.000000000 +0200
|
|
+++ sendmail/cf/feature/ldap_routing.m4 2010-01-05 01:57:27.000000000 +0100
|
|
@@ -35,40 +35,12 @@
|
|
_ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')',
|
|
_ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')')
|
|
|
|
-define(`_ATMPF_', `<TMPF>')dnl
|
|
-dnl check whether arg contains -T`'_ATMPF_
|
|
-dnl unless it is a sequence map or just LDAP
|
|
-dnl note: this does not work if ARG1 begins with space(s), however, as
|
|
-dnl we issue a warning, hopefully the user will fix it...
|
|
-ifelse(defn(`_ARG1_'), `', `',
|
|
- defn(`_ARG1_'), `LDAP', `',
|
|
- `ifelse(index(_ARG1_, `sequence '), `0', `',
|
|
- `ifelse(index(_ARG1_, _ATMPF_), `-1',
|
|
- `errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing')
|
|
-')
|
|
- define(`_ABP_', index(_ARG1_, ` '))
|
|
- define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)')
|
|
- ')
|
|
- ')
|
|
- ')
|
|
-ifelse(defn(`_ARG2_'), `', `',
|
|
- defn(`_ARG2_'), `LDAP', `',
|
|
- `ifelse(index(_ARG2_, `sequence '), `0', `',
|
|
- `ifelse(index(_ARG2_, _ATMPF_), `-1',
|
|
- `errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing')
|
|
-')
|
|
- define(`_ABP_', index(_ARG2_, ` '))
|
|
- define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)')
|
|
- ')
|
|
- ')
|
|
- ')
|
|
-
|
|
LOCAL_CONFIG
|
|
# LDAP routing maps
|
|
Kldapmh ifelse(len(X`'_ARG1_), `1',
|
|
`ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
|
|
- defn(`_NARG1_'), `', `_ARG1_', `_NARG1_')
|
|
+ `_ARG1_')
|
|
|
|
Kldapmra ifelse(len(X`'_ARG2_), `1',
|
|
`ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
|
|
- defn(`_NARG2_'), `', `_ARG2_', `_NARG2_')
|
|
+ `_ARG2_')
|