1.1 --- a/README.txt Wed Oct 21 18:35:22 2015 +0200
1.2 +++ b/README.txt Thu Oct 22 14:59:59 2015 +0200
1.3 @@ -140,10 +140,11 @@
1.4
1.5 For Exim with LDAP (in conf/exim/ldap)...
1.6
1.7 - 010_exim4-config_people_outgoing Defines recipients and outgoing
1.8 + 010_exim4-config_ldap_people_outgoing Defines recipients and outgoing
1.9 mail routing
1.10 - 010_exim4-config_ldap_people ...
1.11 - 010_exim4-config_ldap_resources ...
1.12 + 020_exim4-config_ldap_people ...
1.13 + 020_exim4-config_ldap_resources ...
1.14 + 020_exim4-config_ldap_people_outgoing_recipients
1.15
1.16 For Postfix with LDAP (in conf/postfix/ldap)...
1.17
1.18 @@ -163,14 +164,22 @@
1.19
1.20 010_exim4-config_people_outgoing Defines recipients and outgoing
1.21 mail routing
1.22 - 010_exim4-config_ldap_people ...
1.23 - 010_exim4-config_ldap_resources ...
1.24 + 020_exim4-config_people ...
1.25 + 020_exim4-config_resources ...
1.26 + 020_exim4-config_people_outgoing_recipients
1.27
1.28 virtual_people Defines recipient identities
1.29 - virtual_resources belonging to known domains
1.30 + virtual_people_outgoing_recipients belonging to known domains
1.31 + virtual_resources ...
1.32
1.33 virtual_domains Defines recipient domains
1.34 - virtual_people_outgoing Defines sender addresses
1.35 +
1.36 +In this simpler environment, recipient details must be manually edited in the
1.37 +virtual files, but this permits a very transparent way of administering the
1.38 +system. To add support for delivery to local mailboxes, the following
1.39 +additional file is provided as an example:
1.40 +
1.41 + virtual_people_local Defines recipients and local users
1.42
1.43 For Postfix without LDAP (in conf/postfix/simple)...
1.44
2.1 --- a/conf/exim/ldap/010_exim4-config_ldap_people Wed Oct 21 18:35:22 2015 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,12 +0,0 @@
2.4 -LDAP_PERSON_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})(alias=${quote_ldap:${local_part}}@${domain}))(objectclass=inetorgperson))
2.5 -
2.6 -ldap_person:
2.7 - debug_print = "R: ldap_person for $local_part@$domain"
2.8 - driver = accept
2.9 - condition = ${if eq {}{${lookup ldap{ \
2.10 - user="$ldap_service_bind_dn" \
2.11 - pass=$ldap_service_password \
2.12 - ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_PERSON_QUERY} \
2.13 - }}{no}{yes}}
2.14 - transport = people_transport
2.15 - cannot_route_message = Unknown user
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/conf/exim/ldap/010_exim4-config_ldap_people_outgoing Thu Oct 22 14:59:59 2015 +0200
3.3 @@ -0,0 +1,14 @@
3.4 +LDAP_PERSON_OUTGOING_QUERY = (&(|(mail=${quote_ldap:${sender_address_local_part}}@${sender_address_domain})(alias=${quote_ldap:${sender_address_local_part}}@${sender_address_domain}))(objectclass=inetorgperson))
3.5 +
3.6 +ldap_person_outgoing:
3.7 + debug_print = "R: ldap_person_outgoing for $sender_address_local_part@$sender_address_domain"
3.8 + driver = accept
3.9 + unseen
3.10 + no_expn
3.11 + no_verify
3.12 + condition = ${if eq {}{${lookup ldap{ \
3.13 + user="$ldap_service_bind_dn" \
3.14 + pass=$ldap_service_password \
3.15 + ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_PERSON_OUTGOING_QUERY} \
3.16 + }}{no}{yes}}
3.17 + transport = people_outgoing_transport
4.1 --- a/conf/exim/ldap/010_exim4-config_ldap_resources Wed Oct 21 18:35:22 2015 +0200
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,12 +0,0 @@
4.4 -LDAP_RESOURCE_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})(alias=${quote_ldap:${local_part}}@${domain}))(&(!(objectclass=inetOrgPerson))(objectclass=mailRecipient)))
4.5 -
4.6 -ldap_resource:
4.7 - debug_print = "R: ldap_resource for $local_part@$domain"
4.8 - driver = accept
4.9 - condition = ${if eq {}{${lookup ldap{ \
4.10 - user="$ldap_service_bind_dn" \
4.11 - pass=$ldap_service_password \
4.12 - ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_RESOURCE_QUERY} \
4.13 - }}{no}{yes}}
4.14 - transport = resources_transport
4.15 - cannot_route_message = Unknown user
5.1 --- a/conf/exim/ldap/010_exim4-config_people_outgoing Wed Oct 21 18:35:22 2015 +0200
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,14 +0,0 @@
5.4 -LDAP_PERSON_OUTGOING_QUERY = (&(|(mail=${quote_ldap:${sender_address_local_part}}@${sender_address_domain})(alias=${quote_ldap:${sender_address_local_part}}@${sender_address_domain}))(objectclass=inetorgperson))
5.5 -
5.6 -people_outgoing:
5.7 - debug_print = "R: person_outgoing for $sender_address_local_part@$sender_address_domain"
5.8 - driver = accept
5.9 - unseen
5.10 - no_expn
5.11 - no_verify
5.12 - condition = ${if eq {}{${lookup ldap{ \
5.13 - user="$ldap_service_bind_dn" \
5.14 - pass=$ldap_service_password \
5.15 - ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_PERSON_OUTGOING_QUERY} \
5.16 - }}{no}{yes}}
5.17 - transport = people_outgoing_transport
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people Thu Oct 22 14:59:59 2015 +0200
6.3 @@ -0,0 +1,12 @@
6.4 +LDAP_PERSON_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})(alias=${quote_ldap:${local_part}}@${domain}))(objectclass=inetorgperson))
6.5 +
6.6 +ldap_person:
6.7 + debug_print = "R: ldap_person for $local_part@$domain"
6.8 + driver = accept
6.9 + condition = ${if eq {}{${lookup ldap{ \
6.10 + user="$ldap_service_bind_dn" \
6.11 + pass=$ldap_service_password \
6.12 + ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_PERSON_QUERY} \
6.13 + }}{no}{yes}}
6.14 + transport = people_transport
6.15 + cannot_route_message = Unknown user
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Thu Oct 22 14:59:59 2015 +0200
7.3 @@ -0,0 +1,19 @@
7.4 +PEOPLE_OUTGOING = ${strlen:people-outgoing:}
7.5 +
7.6 +LDAP_PERSON_OUTGOING_RECIPIENT_QUERY = (&(|(mail=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain})(alias=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain}))(objectclass=inetorgperson))
7.7 +
7.8 +ldap_person_outgoing_recipient:
7.9 + debug_print = "R: ldap_person_outgoing_recipient for $local_part@$domain"
7.10 + driver = accept
7.11 + unseen
7.12 + no_expn
7.13 + no_verify
7.14 + condition = ${if and { \
7.15 + {eq {people-outgoing:}{${substr{0}{PEOPLE_OUTGOING}{${local_part}}}}} \
7.16 + {!eq {}{${lookup ldap{ \
7.17 + user="$ldap_service_bind_dn" \
7.18 + pass=$ldap_service_password \
7.19 + ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY} \
7.20 + }}} \
7.21 + }}
7.22 + transport = people_outgoing_transport
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_resources Thu Oct 22 14:59:59 2015 +0200
8.3 @@ -0,0 +1,12 @@
8.4 +LDAP_RESOURCE_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})(alias=${quote_ldap:${local_part}}@${domain}))(&(!(objectclass=inetOrgPerson))(objectclass=mailRecipient)))
8.5 +
8.6 +ldap_resource:
8.7 + debug_print = "R: ldap_resource for $local_part@$domain"
8.8 + driver = accept
8.9 + condition = ${if eq {}{${lookup ldap{ \
8.10 + user="$ldap_service_bind_dn" \
8.11 + pass=$ldap_service_password \
8.12 + ldap://$ldap_host:$ldap_port/$ldap_base_dn?mail?sub?LDAP_RESOURCE_QUERY} \
8.13 + }}{no}{yes}}
8.14 + transport = resources_transport
8.15 + cannot_route_message = Unknown user
9.1 --- a/conf/exim/simple/010_exim4-config_people Wed Oct 21 18:35:22 2015 +0200
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,7 +0,0 @@
9.4 -simple_person:
9.5 - debug_print = "R: simple_person for $local_part@$domain"
9.6 - driver = accept
9.7 - domains = lsearch;/etc/exim4/virtual_domains
9.8 - local_parts = lsearch;/etc/exim4/virtual_people
9.9 - transport = people_transport
9.10 - cannot_route_message = Unknown user
10.1 --- a/conf/exim/simple/010_exim4-config_people_local Wed Oct 21 18:35:22 2015 +0200
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,6 +0,0 @@
10.4 -simple_local_person:
10.5 - debug_print = "R: simple_local_person for $local_part@$domain"
10.6 - driver = redirect
10.7 - domains = lsearch;/etc/exim4/virtual_domains
10.8 - data = ${lookup{$local_part}lsearch{/etc/exim4/virtual_people_local}}
10.9 - cannot_route_message = Unknown user
11.1 --- a/conf/exim/simple/010_exim4-config_people_outgoing Wed Oct 21 18:35:22 2015 +0200
11.2 +++ b/conf/exim/simple/010_exim4-config_people_outgoing Thu Oct 22 14:59:59 2015 +0200
11.3 @@ -1,8 +1,11 @@
11.4 -people_outgoing:
11.5 - debug_print = "R: people_outgoing for $sender_address_local_part@$sender_address_domain"
11.6 +simple_person_outgoing:
11.7 + debug_print = "R: simple_person_outgoing for $sender_address_local_part@$sender_address_domain"
11.8 driver = accept
11.9 unseen
11.10 no_expn
11.11 no_verify
11.12 - senders = lsearch;/etc/exim4/virtual_people_outgoing
11.13 + condition = ${if and { \
11.14 + {bool {${lookup {$sender_address_local_part} lsearch {/etc/exim4/virtual_people} {true} {false}}}} \
11.15 + {bool {${lookup {$sender_address_domain} lsearch {/etc/exim4/virtual_domains} {true} {false}}}} \
11.16 + }}
11.17 transport = people_outgoing_transport
12.1 --- a/conf/exim/simple/010_exim4-config_people_outgoing_recipients Wed Oct 21 18:35:22 2015 +0200
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,7 +0,0 @@
12.4 -simple_person_outgoing_recipient:
12.5 - debug_print = "R: simple_person_outgoing_recipient for $local_part@$domain"
12.6 - driver = accept
12.7 - domains = lsearch;/etc/exim4/virtual_domains
12.8 - local_parts = lsearch;/etc/exim4/virtual_people_outgoing_recipients
12.9 - transport = people_outgoing_transport
12.10 - cannot_route_message = Unknown user
13.1 --- a/conf/exim/simple/010_exim4-config_resources Wed Oct 21 18:35:22 2015 +0200
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,7 +0,0 @@
13.4 -simple_resource:
13.5 - debug_print = "R: simple_resource for $local_part@$domain"
13.6 - driver = accept
13.7 - domains = lsearch;/etc/exim4/virtual_domains
13.8 - local_parts = lsearch;/etc/exim4/virtual_resources
13.9 - transport = resources_transport
13.10 - cannot_route_message = Unknown user
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/conf/exim/simple/020_exim4-config_people Thu Oct 22 14:59:59 2015 +0200
14.3 @@ -0,0 +1,7 @@
14.4 +simple_person:
14.5 + debug_print = "R: simple_person for $local_part@$domain"
14.6 + driver = accept
14.7 + domains = lsearch;/etc/exim4/virtual_domains
14.8 + local_parts = lsearch;/etc/exim4/virtual_people
14.9 + transport = people_transport
14.10 + cannot_route_message = Unknown user
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/conf/exim/simple/020_exim4-config_people_local Thu Oct 22 14:59:59 2015 +0200
15.3 @@ -0,0 +1,6 @@
15.4 +simple_local_person:
15.5 + debug_print = "R: simple_local_person for $local_part@$domain"
15.6 + driver = redirect
15.7 + domains = lsearch;/etc/exim4/virtual_domains
15.8 + data = ${lookup{$local_part}lsearch{/etc/exim4/virtual_people_local}}
15.9 + cannot_route_message = Unknown user
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/conf/exim/simple/020_exim4-config_people_outgoing_recipients Thu Oct 22 14:59:59 2015 +0200
16.3 @@ -0,0 +1,7 @@
16.4 +simple_person_outgoing_recipient:
16.5 + debug_print = "R: simple_person_outgoing_recipient for $local_part@$domain"
16.6 + driver = accept
16.7 + domains = lsearch;/etc/exim4/virtual_domains
16.8 + local_parts = lsearch;/etc/exim4/virtual_people_outgoing_recipients
16.9 + transport = people_outgoing_transport
16.10 + cannot_route_message = Unknown user
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/conf/exim/simple/020_exim4-config_resources Thu Oct 22 14:59:59 2015 +0200
17.3 @@ -0,0 +1,7 @@
17.4 +simple_resource:
17.5 + debug_print = "R: simple_resource for $local_part@$domain"
17.6 + driver = accept
17.7 + domains = lsearch;/etc/exim4/virtual_domains
17.8 + local_parts = lsearch;/etc/exim4/virtual_resources
17.9 + transport = resources_transport
17.10 + cannot_route_message = Unknown user
18.1 --- a/conf/exim/simple/virtual_people_outgoing Wed Oct 21 18:35:22 2015 +0200
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,2 +0,0 @@
18.4 -paul.boddie@example.com:
18.5 -vincent.vole@example.com: