1.1 --- a/conf/apache/imip-agent.conf Sun Apr 17 18:55:51 2016 +0200 1.2 +++ b/conf/apache/imip-agent.conf Sun Apr 17 18:59:06 2016 +0200 1.3 @@ -10,7 +10,7 @@ 1.4 1.5 # LDAP authentication... 1.6 ##AuthBasicProvider ldap 1.7 - ##AuthLDAPUrl "ldap://localhost/ou=People,dc=example,dc=com?mail?sub" 1.8 + ##AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" 1.9 1.10 # Simple file-based authentication... 1.11 ##AuthUserFile /var/www/imip-agent/users
2.1 --- a/conf/apache/imip-manager.conf Sun Apr 17 18:55:51 2016 +0200 2.2 +++ b/conf/apache/imip-manager.conf Sun Apr 17 18:59:06 2016 +0200 2.3 @@ -9,7 +9,7 @@ 2.4 2.5 # LDAP authentication... 2.6 #AuthBasicProvider ldap 2.7 - #AuthLDAPUrl "ldap://localhost/ou=People,dc=example,dc=com?mail?sub" 2.8 + #AuthLDAPUrl "$LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub" 2.9 2.10 # Simple file-based authentication... 2.11 AuthUserFile /var/www/imip-agent/users
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/conf/configure.example Sun Apr 17 18:59:06 2016 +0200 3.3 @@ -0,0 +1,73 @@ 3.4 +#!/bin/sh 3.5 + 3.6 +set -a 3.7 + 3.8 +# The mail domain. 3.9 + 3.10 +MAIL_DOMAIN=example.com 3.11 + 3.12 +# How messages are delivered to mailboxes. 3.13 +# See the MailIntegration/LocalSMTP and MailIntegration/LMTP documents. 3.14 +# Choices: LocalSMTP, LMTP 3.15 + 3.16 +MAILBOX_DELIVERY=LocalSMTP 3.17 + 3.18 +# Whether local system users are supported. 3.19 +# See the MailIntegration/LocalSMTP document. 3.20 +# Choices: yes, no 3.21 + 3.22 +LOCAL_SYSTEM_USERS=no 3.23 + 3.24 +# How the users are managed. 3.25 +# See the MailIntegration/Simple and MailIntegration/LDAP documents. 3.26 +# Choices: Simple, LDAP 3.27 + 3.28 +USER_DATABASE=Simple 3.29 + 3.30 +# LDAP-specific details. 3.31 +# See the MailIntegration/LDAP document. 3.32 +# Choices: ldap, ldaps 3.33 + 3.34 +LDAP_SCHEME=ldap 3.35 +LDAP_HOST=localhost 3.36 +LDAP_PORT= 3.37 +LDAP_BASE_DN="ou=People,dc=example,dc=com" 3.38 +LDAP_SERVICE_BIND_DN="uid=imip-agent,ou=Special Users,dc=example,dc=com" 3.39 +LDAP_SERVICE_PASSWORD= 3.40 + 3.41 + 3.42 + 3.43 +# Computed values. Do not edit! 3.44 + 3.45 +MAIL_DOMAIN_QUOTED=`echo $MAIL_DOMAIN | sed 's/\./\\\./g'` 3.46 + 3.47 +if [ "$MAILBOX_DELIVERY" = 'LocalSMTP' ]; then 3.48 + MAILBOX_DELIVERY_OPTIONS="-L" 3.49 + MAILBOX_DELIVERY_GROUP=www-data 3.50 +else 3.51 + MAILBOX_DELIVERY_OPTIONS="-l LMTP_SOCKET" 3.52 + MAILBOX_DELIVERY_GROUP=lmtp 3.53 +fi 3.54 + 3.55 +if [ "$LOCAL_SYSTEM_USERS" = 'yes' ]; then 3.56 + POSTFIX_LOCAL_SYSTEM_ENABLE= 3.57 +else 3.58 + POSTFIX_LOCAL_SYSTEM_ENABLE=# 3.59 +fi 3.60 + 3.61 +if [ ! "$LDAP_PORT" ]; then 3.62 + if [ "$LDAP_SCHEME" = 'ldaps' ]; then 3.63 + LDAP_PORT=636 3.64 + else 3.65 + LDAP_PORT=389 3.66 + fi 3.67 +fi 3.68 + 3.69 + 3.70 + 3.71 +# Substituted variables. 3.72 + 3.73 +SUBSTITUTED='$MAIL_DOMAIN $MAIL_DOMAIN_QUOTED \ 3.74 + $MAILBOX_DELIVERY_OPTIONS $MAILBOX_DELIVERY_GROUP \ 3.75 + $POSTFIX_LOCAL_SYSTEM_ENABLE \ 3.76 + $LDAP_SCHEME $LDAP_HOST $LDAP_PORT $LDAP_BASE_DN $LDAP_SERVICE_BIND_DN $LDAP_SERVICE_PASSWORD'
4.1 --- a/conf/exim/30_exim4-config_people Sun Apr 17 18:55:51 2016 +0200 4.2 +++ b/conf/exim/30_exim4-config_people Sun Apr 17 18:59:06 2016 +0200 4.3 @@ -1,8 +1,6 @@ 4.4 -# Replace "-l LMTP_SOCKET" with "-L" for local SMTP delivery. 4.5 - 4.6 people_transport: 4.7 debug_print = "T: people_transport for $local_part@$domain" 4.8 driver = pipe 4.9 - command = /var/lib/imip-agent/imip_person.py -l LMTP_SOCKET -o $pipe_addresses 4.10 + command = /var/lib/imip-agent/imip_person.py $MAILBOX_DELIVERY_OPTIONS -o $pipe_addresses 4.11 user = imip-agent 4.12 initgroups = true
5.1 --- a/conf/exim/ldap/010_exim4-config_ldap_people_outgoing Sun Apr 17 18:55:51 2016 +0200 5.2 +++ b/conf/exim/ldap/010_exim4-config_ldap_people_outgoing Sun Apr 17 18:59:06 2016 +0200 5.3 @@ -9,8 +9,8 @@ 5.4 no_expn 5.5 no_verify 5.6 condition = ${if eq {}{${lookup ldap{ \ 5.7 - user="LDAP_SERVICE_BIND_DN" \ 5.8 - pass=LDAP_SERVICE_PASSWORD \ 5.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_QUERY} \ 5.10 + user="$LDAP_SERVICE_BIND_DN" \ 5.11 + pass=$LDAP_SERVICE_PASSWORD \ 5.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_QUERY} \ 5.13 }}{no}{yes}} 5.14 transport = people_outgoing_transport
6.1 --- a/conf/exim/ldap/020_exim4-config_ldap_people Sun Apr 17 18:55:51 2016 +0200 6.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people Sun Apr 17 18:59:06 2016 +0200 6.3 @@ -6,9 +6,9 @@ 6.4 debug_print = "R: ldap_person for $local_part@$domain" 6.5 driver = accept 6.6 condition = ${if eq {}{${lookup ldap{ \ 6.7 - user="LDAP_SERVICE_BIND_DN" \ 6.8 - pass=LDAP_SERVICE_PASSWORD \ 6.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_QUERY} \ 6.10 + user="$LDAP_SERVICE_BIND_DN" \ 6.11 + pass=$LDAP_SERVICE_PASSWORD \ 6.12 + $LDAP_SCHEME://$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 --- a/conf/exim/ldap/020_exim4-config_ldap_people_local_system Sun Apr 17 18:55:51 2016 +0200 7.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_local_system Sun Apr 17 18:59:06 2016 +0200 7.3 @@ -7,8 +7,8 @@ 7.4 driver = redirect 7.5 local_part_prefix = local+ 7.6 data = ${lookup ldap{ \ 7.7 - user="LDAP_SERVICE_BIND_DN" \ 7.8 - pass=LDAP_SERVICE_PASSWORD \ 7.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?uid?sub?LDAP_LOCAL_PERSON_SYSTEM_QUERY} \ 7.10 + user="$LDAP_SERVICE_BIND_DN" \ 7.11 + pass=$LDAP_SERVICE_PASSWORD \ 7.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?uid?sub?LDAP_LOCAL_PERSON_SYSTEM_QUERY} \ 7.13 } 7.14 cannot_route_message = Unknown user
8.1 --- a/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Sun Apr 17 18:55:51 2016 +0200 8.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Sun Apr 17 18:59:06 2016 +0200 8.3 @@ -8,8 +8,8 @@ 8.4 local_part_prefix = people-outgoing+ 8.5 condition = ${if !eq {} \ 8.6 {${lookup ldap{ \ 8.7 - user="LDAP_SERVICE_BIND_DN" \ 8.8 - pass=LDAP_SERVICE_PASSWORD \ 8.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY}}} \ 8.10 + user="$LDAP_SERVICE_BIND_DN" \ 8.11 + pass=$LDAP_SERVICE_PASSWORD \ 8.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub?LDAP_PERSON_OUTGOING_RECIPIENT_QUERY}}} \ 8.13 } 8.14 transport = people_outgoing_transport
9.1 --- a/conf/exim/ldap/020_exim4-config_ldap_resources Sun Apr 17 18:55:51 2016 +0200 9.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_resources Sun Apr 17 18:59:06 2016 +0200 9.3 @@ -6,9 +6,9 @@ 9.4 debug_print = "R: ldap_resource for $local_part@$domain" 9.5 driver = accept 9.6 condition = ${if eq {}{${lookup ldap{ \ 9.7 - user="LDAP_SERVICE_BIND_DN" \ 9.8 - pass=LDAP_SERVICE_PASSWORD \ 9.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_RESOURCE_QUERY} \ 9.10 + user="$LDAP_SERVICE_BIND_DN" \ 9.11 + pass=$LDAP_SERVICE_PASSWORD \ 9.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub?LDAP_RESOURCE_QUERY} \ 9.13 }}{no}{yes}} 9.14 transport = resources_transport 9.15 cannot_route_message = Unknown user
10.1 --- a/conf/exim/ldap/890_exim4-config_cyrus_lmtp_local_lmtp Sun Apr 17 18:55:51 2016 +0200 10.2 +++ b/conf/exim/ldap/890_exim4-config_cyrus_lmtp_local_lmtp Sun Apr 17 18:59:06 2016 +0200 10.3 @@ -8,9 +8,9 @@ 10.4 local_part_prefix = local+ 10.5 condition = ${if !eq {} \ 10.6 {${lookup ldap{ \ 10.7 - user="LDAP_SERVICE_BIND_DN" \ 10.8 - pass=LDAP_SERVICE_PASSWORD \ 10.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 10.10 + user="$LDAP_SERVICE_BIND_DN" \ 10.11 + pass=$LDAP_SERVICE_PASSWORD \ 10.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 10.13 } 10.14 transport = cyrus_lmtp 10.15 cannot_route_message = Unknown user
11.1 --- a/conf/exim/ldap/890_exim4-config_dovecot_lmtp_local_lmtp Sun Apr 17 18:55:51 2016 +0200 11.2 +++ b/conf/exim/ldap/890_exim4-config_dovecot_lmtp_local_lmtp Sun Apr 17 18:59:06 2016 +0200 11.3 @@ -8,9 +8,9 @@ 11.4 local_part_prefix = local+ 11.5 condition = ${if !eq {} \ 11.6 {${lookup ldap{ \ 11.7 - user="LDAP_SERVICE_BIND_DN" \ 11.8 - pass=LDAP_SERVICE_PASSWORD \ 11.9 - ldap://LDAP_HOST:LDAP_PORT/LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 11.10 + user="$LDAP_SERVICE_BIND_DN" \ 11.11 + pass=$LDAP_SERVICE_PASSWORD \ 11.12 + $LDAP_SCHEME://$LDAP_HOST:$LDAP_PORT/$LDAP_BASE_DN?mail?sub?LDAP_LOCAL_LMTP_QUERY}}} \ 11.13 } 11.14 transport = dovecot_lmtp 11.15 cannot_route_message = Unknown user
12.1 --- a/conf/exim/simple/virtual_domains Sun Apr 17 18:55:51 2016 +0200 12.2 +++ b/conf/exim/simple/virtual_domains Sun Apr 17 18:59:06 2016 +0200 12.3 @@ -1,1 +1,1 @@ 12.4 -example.com: 12.5 +${MAIL_DOMAIN}:
13.1 --- a/conf/ldap/example.ldif Sun Apr 17 18:55:51 2016 +0200 13.2 +++ b/conf/ldap/example.ldif Sun Apr 17 18:59:06 2016 +0200 13.3 @@ -21,6 +21,11 @@ 13.4 objectClass: organizationalUnit 13.5 ou: Resources 13.6 13.7 +dn: ou=Special Users,dc=example,dc=com 13.8 +objectClass: top 13.9 +objectClass: organizationalUnit 13.10 +ou: Special Users 13.11 + 13.12 # People: 13.13 13.14 dn: uid=paulb,ou=People,dc=example,dc=com 13.15 @@ -74,3 +79,13 @@ 13.16 cn: Sauna 13.17 mail: resource-room-sauna@example.com 13.18 calFBURL: http://www.example.com/freebusy/mailto:resource-room-sauna@example.com/freebusy 13.19 + 13.20 +# Special Users: 13.21 + 13.22 +dn: uid=imip-agent,ou=Special Users,dc=example,dc=com 13.23 +objectClass: top 13.24 +objectClass: person 13.25 +objectClass: inetOrgPerson 13.26 +objectClass: organizationalPerson 13.27 +uid: imip-agent 13.28 +cn: imip-agent
14.1 --- a/conf/postfix/ldap/virtual_alias_maps_people.cf Sun Apr 17 18:55:51 2016 +0200 14.2 +++ b/conf/postfix/ldap/virtual_alias_maps_people.cf Sun Apr 17 18:59:06 2016 +0200 14.3 @@ -1,11 +1,11 @@ 14.4 -server_host = LDAP_HOST 14.5 -server_port = LDAP_PORT 14.6 +server_host = $LDAP_HOST 14.7 +server_port = $LDAP_PORT 14.8 version = 3 14.9 -search_base = LDAP_BASE_DN 14.10 +search_base = $LDAP_BASE_DN 14.11 scope = sub 14.12 14.13 -bind_dn = LDAP_SERVICE_BIND_DN 14.14 -bind_pw = LDAP_SERVICE_PASSWORD 14.15 +bind_dn = $LDAP_SERVICE_BIND_DN 14.16 +bind_pw = $LDAP_SERVICE_PASSWORD 14.17 14.18 query_filter = (&(|(mail=%s)(alias=%s))(objectclass=inetorgperson)) 14.19 result_attribute = mail
15.1 --- a/conf/postfix/ldap/virtual_alias_maps_people_outgoing.cf Sun Apr 17 18:55:51 2016 +0200 15.2 +++ b/conf/postfix/ldap/virtual_alias_maps_people_outgoing.cf Sun Apr 17 18:59:06 2016 +0200 15.3 @@ -1,11 +1,11 @@ 15.4 -server_host = LDAP_HOST 15.5 -server_port = LDAP_PORT 15.6 +server_host = $LDAP_HOST 15.7 +server_port = $LDAP_PORT 15.8 version = 3 15.9 -search_base = LDAP_BASE_DN 15.10 +search_base = $LDAP_BASE_DN 15.11 scope = sub 15.12 15.13 -bind_dn = LDAP_SERVICE_BIND_DN 15.14 -bind_pw = LDAP_SERVICE_PASSWORD 15.15 +bind_dn = $LDAP_SERVICE_BIND_DN 15.16 +bind_pw = $LDAP_SERVICE_PASSWORD 15.17 15.18 query_filter = (&(|(mail=%s)(alias=%s))(objectclass=inetorgperson)) 15.19 result_attribute = mail
16.1 --- a/conf/postfix/ldap/virtual_alias_maps_resources.cf Sun Apr 17 18:55:51 2016 +0200 16.2 +++ b/conf/postfix/ldap/virtual_alias_maps_resources.cf Sun Apr 17 18:59:06 2016 +0200 16.3 @@ -1,11 +1,11 @@ 16.4 -server_host = LDAP_HOST 16.5 -server_port = LDAP_PORT 16.6 +server_host = $LDAP_HOST 16.7 +server_port = $LDAP_PORT 16.8 version = 3 16.9 -search_base = LDAP_BASE_DN 16.10 +search_base = $LDAP_BASE_DN 16.11 scope = sub 16.12 16.13 -bind_dn = LDAP_SERVICE_BIND_DN 16.14 -bind_pw = LDAP_SERVICE_PASSWORD 16.15 +bind_dn = $LDAP_SERVICE_BIND_DN 16.16 +bind_pw = $LDAP_SERVICE_PASSWORD 16.17 16.18 query_filter = (&(|(mail=%s)(alias=%s))(&(!(objectclass=inetOrgPerson))(objectclass=mailRecipient))) 16.19 result_attribute = mail
17.1 --- a/conf/postfix/lmtp/lmtp_generic Sun Apr 17 18:55:51 2016 +0200 17.2 +++ b/conf/postfix/lmtp/lmtp_generic Sun Apr 17 18:59:06 2016 +0200 17.3 @@ -1,1 +1,1 @@ 17.4 -/^local+(.*)@example\.com$/ ${1}@example.com 17.5 +/^local+(.*)@${MAIL_DOMAIN_QUOTED}$/ ${1}@${MAIL_DOMAIN}
18.1 --- a/conf/postfix/lmtp/transport.items Sun Apr 17 18:55:51 2016 +0200 18.2 +++ b/conf/postfix/lmtp/transport.items Sun Apr 17 18:59:06 2016 +0200 18.3 @@ -1,4 +1,4 @@ 18.4 # Local delivery to Cyrus: 18.5 -#local@example.com lmtp:unix:/var/run/cyrus/socket/lmtp 18.6 +#local@$MAIL_DOMAIN lmtp:unix:/var/run/cyrus/socket/lmtp 18.7 # Local delivery to Dovecot: 18.8 -#local@example.com lmtp:unix:/var/run/dovecot/lmtp 18.9 +#local@$MAIL_DOMAIN lmtp:unix:/var/run/dovecot/lmtp
19.1 --- a/conf/postfix/master.cf.items Sun Apr 17 18:55:51 2016 +0200 19.2 +++ b/conf/postfix/master.cf.items Sun Apr 17 18:59:06 2016 +0200 19.3 @@ -1,14 +1,10 @@ 19.4 -# Replace lmtp with www-data if operating in local SMTP mode. 19.5 - 19.6 imip_resources unix - n n - - pipe 19.7 - flags=FR user=imip-agent:lmtp argv=/var/lib/imip-agent/imip_resource.py 19.8 + flags=FR user=imip-agent:$MAILBOX_DELIVERY_GROUP argv=/var/lib/imip-agent/imip_resource.py 19.9 -o ${original_recipient} 19.10 19.11 -# Replace "-l LMTP_SOCKET" with "-L" for local SMTP delivery. 19.12 - 19.13 imip_people unix - n n - - pipe 19.14 - flags=FR user=imip-agent:lmtp argv=/var/lib/imip-agent/imip_person.py 19.15 - -o ${original_recipient} -l LMTP_SOCKET 19.16 + flags=FR user=imip-agent:$MAILBOX_DELIVERY_GROUP argv=/var/lib/imip-agent/imip_person.py 19.17 + -o ${original_recipient} $MAILBOX_DELIVERY_OPTIONS 19.18 19.19 imip_people_outgoing unix - n n - - pipe 19.20 - flags=FR user=imip-agent:lmtp argv=/var/lib/imip-agent/imip_person_outgoing.py 19.21 + flags=FR user=imip-agent:$MAILBOX_DELIVERY_GROUP argv=/var/lib/imip-agent/imip_person_outgoing.py
20.1 --- a/conf/postfix/simple/main.cf.example Sun Apr 17 18:55:51 2016 +0200 20.2 +++ b/conf/postfix/simple/main.cf.example Sun Apr 17 18:59:06 2016 +0200 20.3 @@ -3,6 +3,6 @@ 20.4 20.5 virtual_alias_maps = $alias_maps, hash:/etc/postfix/virtual, 20.6 hash:/etc/postfix/simple/virtual_alias_maps 20.7 - #, hash:/etc/postfix/simple/virtual_alias_maps_local_system 20.8 + $POSTFIX_LOCAL_SYSTEM_ENABLE, hash:/etc/postfix/simple/virtual_alias_maps_local_system 20.9 20.10 sender_bcc_maps = hash:/etc/postfix/simple/virtual_alias_maps_people_outgoing
21.1 --- a/conf/postfix/simple/virtual_alias_maps Sun Apr 17 18:55:51 2016 +0200 21.2 +++ b/conf/postfix/simple/virtual_alias_maps Sun Apr 17 18:59:06 2016 +0200 21.3 @@ -1,5 +1,5 @@ 21.4 -paul.boddie@example.com people+paul.boddie@example.com 21.5 -vincent.vole@example.com people+vincent.vole@example.com 21.6 -resource-car-porsche911@example.com resources+resource-car-porsche911@example.com 21.7 -resource-room-confroom@example.com resources+resource-room-confroom@example.com 21.8 -resource-room-sauna@example.com resources+resource-room-sauna@example.com 21.9 +paul.boddie@$MAIL_DOMAIN people+paul.boddie@$MAIL_DOMAIN 21.10 +vincent.vole@$MAIL_DOMAIN people+vincent.vole@$MAIL_DOMAIN 21.11 +resource-car-porsche911@$MAIL_DOMAIN resources+resource-car-porsche911@$MAIL_DOMAIN 21.12 +resource-room-confroom@$MAIL_DOMAIN resources+resource-room-confroom@$MAIL_DOMAIN 21.13 +resource-room-sauna@$MAIL_DOMAIN resources+resource-room-sauna@$MAIL_DOMAIN
22.1 --- a/conf/postfix/simple/virtual_alias_maps_local_system Sun Apr 17 18:55:51 2016 +0200 22.2 +++ b/conf/postfix/simple/virtual_alias_maps_local_system Sun Apr 17 18:59:06 2016 +0200 22.3 @@ -1,2 +1,2 @@ 22.4 -local+paul.boddie@example.com paulb 22.5 -local+vincent.vole@example.com vole 22.6 +local+paul.boddie@$MAIL_DOMAIN paulb 22.7 +local+vincent.vole@$MAIL_DOMAIN vole
23.1 --- a/conf/postfix/simple/virtual_alias_maps_people_outgoing Sun Apr 17 18:55:51 2016 +0200 23.2 +++ b/conf/postfix/simple/virtual_alias_maps_people_outgoing Sun Apr 17 18:59:06 2016 +0200 23.3 @@ -1,2 +1,2 @@ 23.4 -paul.boddie@example.com people-outgoing+paul.boddie@example.com 23.5 -vincent.vole@example.com people-outgoing+vincent.vole@example.com 23.6 +paul.boddie@$MAIL_DOMAIN people-outgoing+paul.boddie@$MAIL_DOMAIN 23.7 +vincent.vole@$MAIL_DOMAIN people-outgoing+vincent.vole@$MAIL_DOMAIN
24.1 --- a/conf/postfix/transport Sun Apr 17 18:55:51 2016 +0200 24.2 +++ b/conf/postfix/transport Sun Apr 17 18:59:06 2016 +0200 24.3 @@ -1,6 +1,6 @@ 24.4 -# iMIP content handling for example.com via the resources address: 24.5 -resources@example.com imip_resources: 24.6 -# iMIP content handling for example.com via the people address: 24.7 -people@example.com imip_people: 24.8 -# iMIP content handling for example.com via the people-outgoing address: 24.9 -people-outgoing@example.com imip_people_outgoing: 24.10 +# iMIP content handling for $MAIL_DOMAIN via the resources address: 24.11 +resources@$MAIL_DOMAIN imip_resources: 24.12 +# iMIP content handling for $MAIL_DOMAIN via the people address: 24.13 +people@$MAIL_DOMAIN imip_people: 24.14 +# iMIP content handling for $MAIL_DOMAIN via the people-outgoing address: 24.15 +people-outgoing@$MAIL_DOMAIN imip_people_outgoing:
25.1 --- a/conf/postfix/virtual Sun Apr 17 18:55:51 2016 +0200 25.2 +++ b/conf/postfix/virtual Sun Apr 17 18:59:06 2016 +0200 25.3 @@ -1,1 +1,1 @@ 25.4 -people-outgoing@example.com people-outgoing@example.com 25.5 +people-outgoing@$MAIL_DOMAIN people-outgoing@$MAIL_DOMAIN
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/conf/tools/configure.sh Sun Apr 17 18:59:06 2016 +0200 26.3 @@ -0,0 +1,56 @@ 26.4 +#!/bin/sh 26.5 + 26.6 +DIRNAME=`dirname "$0"` 26.7 +PROGNAME=`basename "$0"` 26.8 + 26.9 +if [ "$1" = '--help' ] || [ ! "$1" ] || [ ! "$2" ]; then 26.10 + cat 1>&2 <<EOF 26.11 +Usage: $PROGNAME <definitions file> <output directory> [ <configuration> ] 26.12 + 26.13 +Produce files to configure imip-agent using the definitions in the specified 26.14 +file, storing the configuration files in the given output directory. This 26.15 +utility is intended to make the customisation of the example configuration files 26.16 +easier. 26.17 + 26.18 +Once the files have been generated, they may be reviewed and copied into the 26.19 +appropriate locations. 26.20 +EOF 26.21 + exit 1 26.22 +fi 26.23 + 26.24 +DEFSFILE=$1 26.25 +OUTDIR=$2 26.26 +CONF=${3:-"conf"} 26.27 + 26.28 +if [ ! -e "$DEFSFILE" ]; then 26.29 + cat 1>&2 <<EOF 26.30 +The specified definitions file $DEFSFILE does not exist. 26.31 +EOF 26.32 + exit 1 26.33 +fi 26.34 + 26.35 +if [ ! -e "$CONF" ]; then 26.36 + cat 1>&2 <<EOF 26.37 +The conf directory cannot be found. 26.38 +EOF 26.39 + exit 1 26.40 +fi 26.41 + 26.42 +# Obtain the definitions. 26.43 + 26.44 +. "$DEFSFILE" 26.45 + 26.46 +# Configure the components. 26.47 + 26.48 +for COMPONENT in apache exim postfix ; do 26.49 + CONFDIR="$CONF/$COMPONENT" 26.50 + 26.51 + for FILENAME in `find "$CONFDIR" -type f` ; do 26.52 + PARENT="$OUTDIR/"`dirname "$FILENAME"` 26.53 + if [ ! -e "$PARENT" ]; then 26.54 + mkdir -p "$PARENT" 26.55 + fi 26.56 + 26.57 + envsubst "$SUBSTITUTED" < "$FILENAME" > "$OUTDIR/$FILENAME" 26.58 + done 26.59 +done