1.1 --- a/conf/exim/ldap/020_exim4-config_ldap_people_local Sat Oct 31 14:31:44 2015 +0100 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,16 +0,0 @@ 1.4 -LOCAL_RECIPIENT = ${strlen:local+} 1.5 - 1.6 -LDAP_LOCAL_PERSON_QUERY = (&(|(mail=${quote_ldap:${substr{LOCAL_RECIPIENT}{${local_part}}}@${domain}})\ 1.7 - (alias=${quote_ldap:${substr{LOCAL_RECIPIENT}{${local_part}}}@${domain}}))\ 1.8 - (&(objectclass=posixAccount)(objectclass=inetorgperson))) 1.9 - 1.10 -ldap_local_person: 1.11 - debug_print = "R: ldap_local_person for $local_part@$domain" 1.12 - driver = redirect 1.13 - condition = ${if eq {local+}{${substr{0}{LOCAL_RECIPIENT}{${local_part}}}}} 1.14 - data = ${lookup ldap{ \ 1.15 - user="LDAP_SERVICE_BIND_DN" \ 1.16 - pass=LDAP_SERVICE_PASSWORD \ 1.17 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?uid?sub?LDAP_LOCAL_PERSON_QUERY} \ 1.18 - } 1.19 - cannot_route_message = Unknown user
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_local_system Sat Oct 31 17:52:24 2015 +0100 2.3 @@ -0,0 +1,14 @@ 2.4 +LDAP_LOCAL_PERSON_SYSTEM_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})\ 2.5 + (alias=${quote_ldap:${local_part}}@${domain}))\ 2.6 + (&(objectclass=posixAccount)(objectclass=inetorgperson))) 2.7 + 2.8 +ldap_local_person_system: 2.9 + debug_print = "R: ldap_local_person_system for $local_part@$domain" 2.10 + driver = redirect 2.11 + local_part_prefix = local+ 2.12 + data = ${lookup ldap{ \ 2.13 + user="LDAP_SERVICE_BIND_DN" \ 2.14 + pass=LDAP_SERVICE_PASSWORD \ 2.15 + ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?uid?sub?LDAP_LOCAL_PERSON_SYSTEM_QUERY} \ 2.16 + } 2.17 + cannot_route_message = Unknown user
3.1 --- a/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Sat Oct 31 14:31:44 2015 +0100 3.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Sat Oct 31 17:52:24 2015 +0100 3.3 @@ -1,18 +1,15 @@ 3.4 -PEOPLE_OUTGOING = ${strlen:people-outgoing+} 3.5 - 3.6 -LDAP_PERSON_OUTGOING_RECIPIENT_QUERY = (&(|(mail=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain}})\ 3.7 - (alias=${quote_ldap:${substr{PEOPLE_OUTGOING}{${local_part}}}@${domain}}))\ 3.8 +LDAP_PERSON_OUTGOING_RECIPIENT_QUERY = (&(|(mail=${quote_ldap:${local_part}}@${domain})\ 3.9 + (alias=${quote_ldap:${local_part}}@${domain}))\ 3.10 (objectclass=inetorgperson)) 3.11 3.12 ldap_person_outgoing_recipient: 3.13 debug_print = "R: ldap_person_outgoing_recipient for $local_part@$domain" 3.14 driver = accept 3.15 - condition = ${if and { \ 3.16 - {eq {people-outgoing+}{${substr{0}{PEOPLE_OUTGOING}{${local_part}}}}} \ 3.17 - {!eq {}{${lookup ldap{ \ 3.18 + local_part_prefix = people-outgoing+ 3.19 + condition = ${if !eq {} \ 3.20 + {${lookup ldap{ \ 3.21 user="LDAP_SERVICE_BIND_DN" \ 3.22 pass=LDAP_SERVICE_PASSWORD \ 3.23 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY} \ 3.24 - }}} \ 3.25 - }} 3.26 + ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY}}} \ 3.27 + } 3.28 transport = people_outgoing_transport
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/conf/exim/ldap/890_exim4-config_cyrus_lmtp_local_lmtp Sat Oct 31 17:52:24 2015 +0100 4.3 @@ -0,0 +1,16 @@ 4.4 +LDAP_LOCAL_LMTP_QUERY = (&(|(mail=${quote_ldap:${local_part}@${domain}})\ 4.5 + (alias=${quote_ldap:${local_part}@${domain}}))\ 4.6 + (objectclass=inetorgperson)) 4.7 + 4.8 +cyrus_lmtp_local_lmtp: 4.9 + debug_print = "R: cyrus_lmtp_local_lmtp for $local_part@$domain" 4.10 + driver = accept 4.11 + local_part_prefix = local+ 4.12 + condition = ${if !eq {} \ 4.13 + {${lookup ldap{ \ 4.14 + user="LDAP_SERVICE_BIND_DN" \ 4.15 + pass=LDAP_SERVICE_PASSWORD \ 4.16 + ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 4.17 + } 4.18 + transport = cyrus_lmtp 4.19 + cannot_route_message = Unknown user
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/conf/exim/ldap/890_exim4-config_dovecot_lmtp_local_lmtp Sat Oct 31 17:52:24 2015 +0100 5.3 @@ -0,0 +1,16 @@ 5.4 +LDAP_LOCAL_LMTP_QUERY = (&(|(mail=${quote_ldap:${local_part}@${domain}})\ 5.5 + (alias=${quote_ldap:${local_part}@${domain}}))\ 5.6 + (objectclass=inetorgperson)) 5.7 + 5.8 +dovecot_lmtp_local_lmtp: 5.9 + debug_print = "R: dovecot_lmtp_local_lmtp for $local_part@$domain" 5.10 + driver = accept 5.11 + local_part_prefix = local+ 5.12 + condition = ${if !eq {} \ 5.13 + {${lookup ldap{ \ 5.14 + user="LDAP_SERVICE_BIND_DN" \ 5.15 + pass=LDAP_SERVICE_PASSWORD \ 5.16 + ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 5.17 + } 5.18 + transport = dovecot_lmtp 5.19 + cannot_route_message = Unknown user
6.1 --- a/conf/exim/lmtp/890_exim4-config_cyrus_lmtp_local_lmtp Sat Oct 31 14:31:44 2015 +0100 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,8 +0,0 @@ 6.4 -cyrus_lmtp_local_lmtp: 6.5 - debug_print = "R: cyrus_lmtp_local_lmtp for $local_part@$domain" 6.6 - driver = accept 6.7 - domains = lsearch;/etc/exim4/virtual_domains 6.8 - local_part_prefix = local+ 6.9 - local_parts = lsearch;/etc/exim4/virtual_people 6.10 - transport = cyrus_lmtp 6.11 - cannot_route_message = Unknown user
7.1 --- a/conf/exim/lmtp/890_exim4-config_dovecot_lmtp_local_lmtp Sat Oct 31 14:31:44 2015 +0100 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,8 +0,0 @@ 7.4 -dovecot_lmtp_local_lmtp: 7.5 - debug_print = "R: dovecot_lmtp_local_lmtp for $local_part@$domain" 7.6 - driver = accept 7.7 - domains = lsearch;/etc/exim4/virtual_domains 7.8 - local_part_prefix = local+ 7.9 - local_parts = lsearch;/etc/exim4/virtual_people 7.10 - transport = dovecot_lmtp 7.11 - cannot_route_message = Unknown user
8.1 --- a/conf/exim/simple/020_exim4-config_people_outgoing_recipients Sat Oct 31 14:31:44 2015 +0100 8.2 +++ b/conf/exim/simple/020_exim4-config_people_outgoing_recipients Sat Oct 31 17:52:24 2015 +0100 8.3 @@ -2,6 +2,7 @@ 8.4 debug_print = "R: simple_person_outgoing_recipient for $local_part@$domain" 8.5 driver = accept 8.6 domains = lsearch;/etc/exim4/virtual_domains 8.7 - local_parts = lsearch;/etc/exim4/virtual_people_outgoing_recipients 8.8 + local_part_prefix = people-outgoing+ 8.9 + local_parts = lsearch;/etc/exim4/virtual_people 8.10 transport = people_outgoing_transport 8.11 cannot_route_message = Unknown user
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/conf/exim/simple/890_exim4-config_cyrus_lmtp_local_lmtp Sat Oct 31 17:52:24 2015 +0100 9.3 @@ -0,0 +1,8 @@ 9.4 +cyrus_lmtp_local_lmtp: 9.5 + debug_print = "R: cyrus_lmtp_local_lmtp for $local_part@$domain" 9.6 + driver = accept 9.7 + domains = lsearch;/etc/exim4/virtual_domains 9.8 + local_part_prefix = local+ 9.9 + local_parts = lsearch;/etc/exim4/virtual_people 9.10 + transport = cyrus_lmtp 9.11 + cannot_route_message = Unknown user
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/conf/exim/simple/890_exim4-config_dovecot_lmtp_local_lmtp Sat Oct 31 17:52:24 2015 +0100 10.3 @@ -0,0 +1,8 @@ 10.4 +dovecot_lmtp_local_lmtp: 10.5 + debug_print = "R: dovecot_lmtp_local_lmtp for $local_part@$domain" 10.6 + driver = accept 10.7 + domains = lsearch;/etc/exim4/virtual_domains 10.8 + local_part_prefix = local+ 10.9 + local_parts = lsearch;/etc/exim4/virtual_people 10.10 + transport = dovecot_lmtp 10.11 + cannot_route_message = Unknown user
11.1 --- a/conf/exim/simple/virtual_people_outgoing_recipients Sat Oct 31 14:31:44 2015 +0100 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,2 +0,0 @@ 11.4 -people-outgoing+paul.boddie: 11.5 -people-outgoing+vincent.vole:
12.1 --- a/conf/postfix/simple/main.cf.example Sat Oct 31 14:31:44 2015 +0100 12.2 +++ b/conf/postfix/simple/main.cf.example Sat Oct 31 17:52:24 2015 +0100 12.3 @@ -1,7 +1,7 @@ 12.4 -# Uncomment the virtual_alias_maps_local entry to support local user delivery. 12.5 +# Uncomment the virtual_alias_maps_local_system entry to support local system user delivery. 12.6 12.7 virtual_alias_maps = $alias_maps, hash:/etc/postfix/virtual, 12.8 hash:/etc/postfix/simple/virtual_alias_maps 12.9 - #, hash:/etc/postfix/simple/virtual_alias_maps_local 12.10 + #, hash:/etc/postfix/simple/virtual_alias_maps_local_system 12.11 12.12 sender_bcc_maps = hash:/etc/postfix/simple/virtual_alias_maps_people_outgoing
13.1 --- a/conf/postfix/simple/virtual_alias_maps_local Sat Oct 31 14:31:44 2015 +0100 13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 13.3 @@ -1,2 +0,0 @@ 13.4 -local+paul.boddie@example.com paulb 13.5 -local+vincent.vole@example.com vole
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/conf/postfix/simple/virtual_alias_maps_local_system Sat Oct 31 17:52:24 2015 +0100 14.3 @@ -0,0 +1,2 @@ 14.4 +local+paul.boddie@example.com paulb 14.5 +local+vincent.vole@example.com vole
15.1 --- a/docs/wiki/MailIntegration--LDAP Sat Oct 31 14:31:44 2015 +0100 15.2 +++ b/docs/wiki/MailIntegration--LDAP Sat Oct 31 17:52:24 2015 +0100 15.3 @@ -29,13 +29,13 @@ 15.4 `020_exim4-config_ldap_people_outgoing_recipients` 15.5 }}} 15.6 15.7 -Where [[../LocalSMTP|local SMTP routing]] is being performed, the following 15.8 -file is also useful: 15.9 +Where [[../LocalSMTP|local SMTP routing]] is being performed ''and'' the 15.10 +recipients are local system users, the following file is also useful: 15.11 15.12 {{{#!table 15.13 '''File''' || '''Purpose''' 15.14 == 15.15 -`020_exim4-config_ldap_people_local` 15.16 +`020_exim4-config_ldap_people_local_system` 15.17 || Defines routing for local recipients for delivery to local system 15.18 .. mailboxes 15.19 }}}
16.1 --- a/docs/wiki/MailIntegration--LMTP Sat Oct 31 14:31:44 2015 +0100 16.2 +++ b/docs/wiki/MailIntegration--LMTP Sat Oct 31 17:52:24 2015 +0100 16.3 @@ -6,11 +6,42 @@ 16.4 such solutions is avoided, but then those solutions must expose their LMTP 16.5 interface appropriately. 16.6 16.7 +{{{#!graphviz 16.8 +//format=svg 16.9 +//transform=notugly 16.10 +digraph lmtp { 16.11 + node [shape=box,fontsize="16.0",fontname="sans-serif",tooltip="LMTP delivery"]; 16.12 + edge [tooltip="LMTP delivery"]; 16.13 + rankdir=LR; 16.14 + 16.15 + mail [label="Incoming mail",shape=folder,style=filled,fillcolor=cyan]; 16.16 + 16.17 + subgraph { 16.18 + rank=same; 16.19 + personrouter [label="Person router"]; 16.20 + recipients [label="Recipient database",shape=folder]; 16.21 + } 16.22 + 16.23 + subgraph { 16.24 + rank=same; 16.25 + personhandler [label="Person handler",style=filled,fillcolor=gold]; 16.26 + } 16.27 + 16.28 + mailbox [label="Mailboxes\n(Cyrus, Dovecot, ...)",tooltip="Mailboxes"]; 16.29 + 16.30 + mail -> personrouter -> personhandler -> mailbox; 16.31 + 16.32 + recipients -> personrouter; 16.33 +} 16.34 +}}} 16.35 + 16.36 Although this topic is largely beyond the scope of this documentation, 16.37 systems such as Cyrus and Dovecot can be configured to provide a Unix domain 16.38 socket offering support for LMTP connections. 16.39 16.40 -For Cyrus, the following bug report is pertinent: 16.41 +== Cyrus == 16.42 + 16.43 +For Cyrus on Debian, the following bug report is pertinent: 16.44 16.45 * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494746 16.46
17.1 --- a/docs/wiki/MailIntegration--LocalSMTP Sat Oct 31 14:31:44 2015 +0100 17.2 +++ b/docs/wiki/MailIntegration--LocalSMTP Sat Oct 31 17:52:24 2015 +0100 17.3 @@ -1,22 +1,7 @@ 17.4 = Local SMTP Delivery = 17.5 17.6 By employing local SMTP, the burden of routing messages to suitable storage 17.7 -becomes a configuration problem within the mail system itself. Here, imip-agent 17.8 -connects to the mail transport agent (MTA) and sends a message to an 17.9 -explicitly-indicated local user such as, for example: 17.10 - 17.11 -{{{ 17.12 -local+vincent.vole@example.com 17.13 -}}} 17.14 - 17.15 -The message is then routed to a mail delivery mechanism, perhaps by converting 17.16 -the local address to a local user identity: 17.17 - 17.18 -{{{ 17.19 -vole 17.20 -}}} 17.21 - 17.22 -The local delivery mechanism would then deposit the message in the user's mailbox. 17.23 +becomes a configuration problem within the mail system itself. 17.24 17.25 {{{#!graphviz 17.26 //format=svg 17.27 @@ -52,7 +37,25 @@ 17.28 } 17.29 }}} 17.30 17.31 -MTAs typically provide delivery routing for local user mailboxes. Where the 17.32 +Here, imip-agent connects to the mail transport agent (MTA) and sends a 17.33 +message to an explicitly-indicated local user. For example: 17.34 + 17.35 +{{{ 17.36 +local+vincent.vole@example.com 17.37 +}}} 17.38 + 17.39 +The message is then routed to a mail delivery mechanism, perhaps by converting 17.40 +the local address to a local system user identity: 17.41 + 17.42 +{{{ 17.43 +vole 17.44 +}}} 17.45 + 17.46 +The local delivery mechanism would then deposit the message in the user's mailbox. 17.47 +Alternatively, routing for a mail storage solution would accept the message for 17.48 +the local user and deliver it to that user's mailbox. 17.49 + 17.50 +MTAs typically provide routing for local system users by default. Where the 17.51 mail system must instead route messages to mailbox providers employing LMTP, 17.52 some more effort may be required. See the 17.53 [[../../MailboxIntegration|mailbox integration guide]] for more details.
18.1 --- a/docs/wiki/MailIntegration--Simple Sat Oct 31 14:31:44 2015 +0100 18.2 +++ b/docs/wiki/MailIntegration--Simple Sat Oct 31 17:52:24 2015 +0100 18.3 @@ -25,9 +25,7 @@ 18.4 `020_exim4-config_people_outgoing_recipients` 18.5 == 18.6 `virtual_people` 18.7 -||<rowspan="3"> Defines recipient identities belonging to known domains 18.8 -== 18.9 -`virtual_people_outgoing_recipients` 18.10 +||<rowspan="2"> Defines recipient identities belonging to known domains 18.11 == 18.12 `virtual_resources` 18.13 == 18.14 @@ -75,8 +73,8 @@ 18.15 {{{#!table 18.16 '''File''' || '''Purpose''' 18.17 == 18.18 -`virtual_alias_maps_local` 18.19 -|| Defines recipients and local users for delivery to local mailboxes 18.20 +`virtual_alias_maps_local_system` 18.21 +|| Defines recipients for delivery to mailboxes for local system users 18.22 }}} 18.23 18.24 These files can be incorporated into the Postfix configuration. On Debian
19.1 --- a/docs/wiki/MailboxIntegration Sat Oct 31 14:31:44 2015 +0100 19.2 +++ b/docs/wiki/MailboxIntegration Sat Oct 31 17:52:24 2015 +0100 19.3 @@ -44,18 +44,29 @@ 19.4 On Debian systems, these files would be copied into the `/etc/exim4/conf.d/transport` 19.5 directory. 19.6 19.7 +The mailbox integration for local system users is also found in the 19.8 +`conf/exim/lmtp` directory: 19.9 + 19.10 {{{#!table 19.11 '''File''' || '''Purpose''' 19.12 == 19.13 `890_exim4-config_cyrus_lmtp_local_system` 19.14 || Routes messages for local system users to Cyrus 19.15 == 19.16 +`890_exim4-config_dovecot_lmtp_local_system` 19.17 +|| Routes messages for local system users to Dovecot 19.18 +}}} 19.19 + 19.20 +Meanwhile, both the `conf/exim/ldap` and `conf/exim/simple` directories 19.21 +provide the following files. The appropriate file for the chosen configuration 19.22 +should be used: 19.23 + 19.24 +{{{#!table 19.25 +'''File''' || '''Purpose''' 19.26 +== 19.27 `890_exim4-config_cyrus_lmtp_local_lmtp` 19.28 || Routes messages for local virtual users to Cyrus 19.29 == 19.30 -`890_exim4-config_dovecot_lmtp_local_system` 19.31 -|| Routes messages for local system users to Dovecot 19.32 -== 19.33 `890_exim4-config_dovecot_lmtp_local_lmtp` 19.34 || Routes messages for local virtual users to Dovecot 19.35 }}}