1.1 --- a/conf/apache/imip-agent.conf Sun Apr 10 02:34:00 2016 +0200
1.2 +++ b/conf/apache/imip-agent.conf Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
2.2 +++ b/conf/apache/imip-manager.conf Sun Apr 17 23:47:19 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 23:47:19 2016 +0200
3.3 @@ -0,0 +1,88 @@
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 a special lmtp group will be used even with local SMTP.
3.19 +# See the SystemUsers document.
3.20 +# Choices: yes, no
3.21 +
3.22 +MAILBOX_DELIVERY_LMTP_GROUP=no
3.23 +
3.24 +# The location of the LMTP socket used to communicate with a mail
3.25 +# storage solution.
3.26 +
3.27 +LMTP_SOCKET=/var/run/cyrus/socket/lmtp
3.28 +
3.29 +# Whether local system users are supported.
3.30 +# See the MailIntegration/LocalSMTP document.
3.31 +# Choices: yes, no
3.32 +
3.33 +LOCAL_SYSTEM_USERS=no
3.34 +
3.35 +# How the users are managed.
3.36 +# See the MailIntegration/Simple and MailIntegration/LDAP documents.
3.37 +# Choices: Simple, LDAP
3.38 +
3.39 +USER_DATABASE=Simple
3.40 +
3.41 +# LDAP-specific details.
3.42 +# See the MailIntegration/LDAP document.
3.43 +# Choices: ldap, ldaps
3.44 +
3.45 +LDAP_SCHEME=ldap
3.46 +LDAP_HOST=localhost
3.47 +LDAP_PORT=
3.48 +LDAP_BASE_DN="dc=example,dc=com"
3.49 +LDAP_SERVICE_BIND_DN="uid=imip-agent,ou=Special Users,dc=example,dc=com"
3.50 +LDAP_SERVICE_PASSWORD=
3.51 +
3.52 +
3.53 +
3.54 +# Computed values. Do not edit!
3.55 +
3.56 +MAIL_DOMAIN_QUOTED=`echo $MAIL_DOMAIN | sed 's/\./\\\./g'`
3.57 +
3.58 +if [ "$MAILBOX_DELIVERY" = 'LocalSMTP' ]; then
3.59 + MAILBOX_DELIVERY_OPTIONS="-L"
3.60 + if [ "$MAILBOX_DELIVERY_LMTP_GROUP" = 'yes' ]; then
3.61 + MAILBOX_DELIVERY_GROUP=lmtp
3.62 + else
3.63 + MAILBOX_DELIVERY_GROUP=www-data
3.64 + fi
3.65 +else
3.66 + MAILBOX_DELIVERY_OPTIONS="-l $LMTP_SOCKET"
3.67 + MAILBOX_DELIVERY_GROUP=lmtp
3.68 +fi
3.69 +
3.70 +if [ "$LOCAL_SYSTEM_USERS" = 'yes' ]; then
3.71 + POSTFIX_LOCAL_SYSTEM_ENABLE=
3.72 +else
3.73 + POSTFIX_LOCAL_SYSTEM_ENABLE=#
3.74 +fi
3.75 +
3.76 +if [ ! "$LDAP_PORT" ]; then
3.77 + if [ "$LDAP_SCHEME" = 'ldaps' ]; then
3.78 + LDAP_PORT=636
3.79 + else
3.80 + LDAP_PORT=389
3.81 + fi
3.82 +fi
3.83 +
3.84 +
3.85 +
3.86 +# Substituted variables.
3.87 +
3.88 +SUBSTITUTED='$MAIL_DOMAIN $MAIL_DOMAIN_QUOTED \
3.89 + $MAILBOX_DELIVERY_OPTIONS $MAILBOX_DELIVERY_GROUP \
3.90 + $POSTFIX_LOCAL_SYSTEM_ENABLE \
3.91 + $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 10 02:34:00 2016 +0200
4.2 +++ b/conf/exim/30_exim4-config_people Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
5.2 +++ b/conf/exim/ldap/010_exim4-config_ldap_people_outgoing Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
6.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
7.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_local_system Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
8.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_people_outgoing_recipients Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
9.2 +++ b/conf/exim/ldap/020_exim4-config_ldap_resources Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
10.2 +++ b/conf/exim/ldap/890_exim4-config_cyrus_lmtp_local_lmtp Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
11.2 +++ b/conf/exim/ldap/890_exim4-config_dovecot_lmtp_local_lmtp Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
12.2 +++ b/conf/exim/simple/virtual_domains Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
13.2 +++ b/conf/ldap/example.ldif Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
14.2 +++ b/conf/postfix/ldap/virtual_alias_maps_people.cf Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
15.2 +++ b/conf/postfix/ldap/virtual_alias_maps_people_outgoing.cf Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
16.2 +++ b/conf/postfix/ldap/virtual_alias_maps_resources.cf Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
17.2 +++ b/conf/postfix/lmtp/lmtp_generic Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
18.2 +++ b/conf/postfix/lmtp/transport.items Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
19.2 +++ b/conf/postfix/master.cf.items Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
20.2 +++ b/conf/postfix/simple/main.cf.example Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
21.2 +++ b/conf/postfix/simple/virtual_alias_maps Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
22.2 +++ b/conf/postfix/simple/virtual_alias_maps_local_system Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
23.2 +++ b/conf/postfix/simple/virtual_alias_maps_people_outgoing Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
24.2 +++ b/conf/postfix/transport Sun Apr 17 23:47:19 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 10 02:34:00 2016 +0200
25.2 +++ b/conf/postfix/virtual Sun Apr 17 23:47:19 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 23:47:19 2016 +0200
26.3 @@ -0,0 +1,69 @@
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 + PARENTPATH="$OUTDIR/"`dirname "$FILENAME"`
26.53 +
26.54 + # Skip files not relevant for the chosen user database.
26.55 +
26.56 + PARENT=`basename "$PARENTPATH"`
26.57 + if ( [ "$USER_DATABASE" = 'Simple' ] && [ "$PARENT" = 'ldap' ] ) || \
26.58 + ( [ "$USER_DATABASE" = 'LDAP' ] && [ "$PARENT" = 'simple' ] ); then
26.59 + continue
26.60 + fi
26.61 +
26.62 + if [ ! -e "$PARENTPATH" ]; then
26.63 + mkdir -p "$PARENTPATH"
26.64 + fi
26.65 +
26.66 + envsubst "$SUBSTITUTED" < "$FILENAME" > "$OUTDIR/$FILENAME"
26.67 + done
26.68 +done
26.69 +
26.70 +# Copy other files.
26.71 +
26.72 +cp "$CONF/aliases.example" "$OUTDIR/$CONF/aliases"
27.1 --- a/docs/wiki/Configuration Sun Apr 10 02:34:00 2016 +0200
27.2 +++ b/docs/wiki/Configuration Sun Apr 17 23:47:19 2016 +0200
27.3 @@ -1,5 +1,89 @@
27.4 = Configuration =
27.5
27.6 +When deploying imip-agent, configuration of the way it integrates with
27.7 +other software components must be performed. Once this has been done,
27.8 +certain details are then carried forward into the configuration of imip-agent
27.9 +itself.
27.10 +
27.11 +== Configuring the Integration ==
27.12 +
27.13 +The `conf` directory provides a selection of template configuration files
27.14 +for different software components that may integrate with imip-agent. To
27.15 +simplify the process of customising these files, a helper tool is provided
27.16 +to apply configuration choices and to generate configuration files that may
27.17 +then be deployed within the configuration of these other components.
27.18 +
27.19 +Taking an example set of choices, the tool is run as follows:
27.20 +
27.21 +{{{
27.22 +conf/tools/configure.sh conf/configure.example outconf
27.23 +}}}
27.24 +
27.25 +This will generate parameterised versions of several files within `conf`
27.26 +and place them in a similar directory structure within the newly-created
27.27 +directory `outconf`, using the settings found in `conf/configure.example`.
27.28 +
27.29 +It is recommended that the example definitions file be copied and edited,
27.30 +and that each definition or choice in the new definitions file be adjusted
27.31 +according to the specific needs of the deployment. A summary of the choices
27.32 +are given below.
27.33 +
27.34 +{{{#!table
27.35 +'''Choice''' || '''Example Value''' || '''Description'''
27.36 +==
27.37 +`MAIL_DOMAIN` || `example.com`
27.38 +|| The mail domain for which imip-agent will be handling messages
27.39 +==
27.40 +`MAILBOX_DELIVERY` || `LocalSMTP`
27.41 +|| How messages are delivered to mailboxes, either using `LocalSMTP`
27.42 +.. ([[../MailIntegration/LocalSMTP|local SMTP]]) or `LMTP`
27.43 +.. ([[../MailIntegration/LMTP|LMTP]]) mechanisms
27.44 +==
27.45 +`MAILBOX_DELIVERY_LMTP_GROUP` || `no`
27.46 +|| Whether a special lmtp group will be used even with local SMTP,
27.47 +.. as discussed in the [[../SystemUsers|system users and groups]]
27.48 +.. documentation
27.49 +==
27.50 +`LMTP_SOCKET` || `/var/run/cyrus/socket/lmtp`
27.51 +|| The location of the LMTP socket used to communicate with a mail
27.52 +.. storage solution (if LMTP is employed)
27.53 +==
27.54 +`LOCAL_SYSTEM_USERS` || `no`
27.55 +|| Whether local system users are supported, as described in the
27.56 +.. [[../MailIntegration/LocalSMTP|local SMTP]] documentation.
27.57 +==
27.58 +`USER_DATABASE` || `Simple`
27.59 +|| How the database of calendar users is managed, either using `Simple`
27.60 +.. ([[../MailIntegration/Simple|simple]]) or `LDAP`
27.61 +.. ([[../MailIntegration/LDAP|LDAP]]) mechanisms
27.62 +==
27.63 +<colspan="3"> ''LDAP-specific choices (for when calendar users are managed
27.64 +using [[../MailIntegration/LDAP|LDAP]])''
27.65 +==
27.66 +`LDAP_SCHEME` || `ldap`
27.67 +|| LDAP access mechanism, either using `ldap` or `ldaps`
27.68 +==
27.69 +`LDAP_HOST` || `localhost`
27.70 +||<rowspan="2"> LDAP server connection details, with the port being omitted
27.71 +.. unless a non-standard port has been chosen
27.72 +==
27.73 +`LDAP_PORT` ||
27.74 +==
27.75 +`LDAP_BASE_DN` || `"dc=example,dc=com"`
27.76 +|| Search criteria used in the selection of calendar users
27.77 +==
27.78 +`LDAP_SERVICE_BIND_DN` || `"uid=imip-agent,ou=Special Users,dc=example,dc=com"`
27.79 +||<rowspan="2"> Credentials for the identity employed by imip-agent to connect
27.80 +.. to the LDAP server
27.81 +==
27.82 +`LDAP_SERVICE_PASSWORD` ||
27.83 +}}}
27.84 +
27.85 +The eventual destination of each of the customised files obviously depends on
27.86 +the nature of the component such files will be configuring.
27.87 +
27.88 +== Configuring the Software Itself ==
27.89 +
27.90 There are three levels of configuration in imip-agent:
27.91
27.92 * `config.sh` provides system-level and tool configuration
27.93 @@ -9,12 +93,7 @@
27.94 These files are by default installed into the `/etc/imip-agent` directory
27.95 and they can be changed in that location once the system is installed.
27.96
27.97 -{{{#!wiki tip
27.98 -=== Text Encoding ===
27.99 -The textual encoding employed by the preferences files is UTF-8.
27.100 -}}}
27.101 -
27.102 -== System-Level and Tool Configuration ==
27.103 +=== System-Level and Tool Configuration ===
27.104
27.105 The `config.sh` file must indicate choices in the following areas:
27.106
27.107 @@ -27,7 +106,26 @@
27.108 must be made to the file in the `tools/config.sh` location before installation
27.109 can occur.
27.110
27.111 -== Software Configuration ==
27.112 +{{{#!table
27.113 +'''Setting''' || '''Example Value''' || '''Description'''
27.114 +==
27.115 +`IMIP_AGENT_USER` || `imip-agent`
27.116 +||<rowspan="2"> Indicates the system user and group identity that is used
27.117 +.. to run the software and access resources, decided when choosing a
27.118 +.. strategy for [[../SystemUsers|system users and groups]]
27.119 +==
27.120 +`IMIP_AGENT_GROUP` || `lmtp`
27.121 +==
27.122 +`INSTALL_DIR` || `/var/lib/imip-agent`
27.123 +||<rowspan="3"> Installation locations for data, Web resources and
27.124 +.. configuration respectively
27.125 +==
27.126 +`WEB_INSTALL_DIR` || `/var/www/imip-agent`
27.127 +==
27.128 +`CONFIG_DIR` || `/etc/imip-agent`
27.129 +}}}
27.130 +
27.131 +=== Software Configuration ===
27.132
27.133 Any changes to filesystem locations may need to be incorporated into the
27.134 `config.py` file, which is found in the `imiptools/config.py` location of
27.135 @@ -40,7 +138,7 @@
27.136 and file permissions), service-level settings (e-mail address and Web site
27.137 choices), and default policies for users of the software.
27.138
27.139 -== User Preferences ==
27.140 +=== User Preferences ===
27.141
27.142 Although the software configuration in `config.py` provides default policies,
27.143 users can choose to override these defaults by editing their own preferences.
28.1 --- a/docs/wiki/GettingStarted Sun Apr 10 02:34:00 2016 +0200
28.2 +++ b/docs/wiki/GettingStarted Sun Apr 17 23:47:19 2016 +0200
28.3 @@ -29,6 +29,10 @@
28.4 If you already use mail storage solutions that employ LMTP, you may decide
28.5 to choose the [[../MailIntegration/LMTP|LMTP delivery]] approach.
28.6
28.7 +Once you have decided which approach is the most preferable, you will be
28.8 +able to use this choice to influence the configuration process mentioned
28.9 +below.
28.10 +
28.11 == Installing the Software ==
28.12
28.13 Ideally, an operating system distribution package should be used to
28.14 @@ -103,6 +107,16 @@
28.15 || [[../DatabaseStore|Database Store]]
28.16 }}}
28.17
28.18 +In addition, a `tools` directory provides a configuration helper tool
28.19 +that can be used to quickly customise the above resources and produce
28.20 +files that, after review, may be deployed.
28.21 +
28.22 +{{{
28.23 +conf/tools/configure.sh --help
28.24 +}}}
28.25 +
28.26 +Use of this tool is covered in the [[../Configuration|configuration guide]].
28.27 +
28.28 == Configuring the Software ==
28.29
28.30 The behaviour of the imip-agent software itself can be configured using
29.1 --- a/docs/wiki/Preferences Sun Apr 10 02:34:00 2016 +0200
29.2 +++ b/docs/wiki/Preferences Sun Apr 17 23:47:19 2016 +0200
29.3 @@ -20,6 +20,11 @@
29.4 See the [[../Configuration|configuration guide]] for more information about
29.5 the `config.py` file.
29.6
29.7 +{{{#!wiki tip
29.8 +=== Text Encoding ===
29.9 +The textual encoding employed by all preferences files is UTF-8.
29.10 +}}}
29.11 +
29.12 == User Preference Settings ==
29.13
29.14 <<TableOfContents(3,3)>>
30.1 --- a/docs/wiki/Prerequisites Sun Apr 10 02:34:00 2016 +0200
30.2 +++ b/docs/wiki/Prerequisites Sun Apr 17 23:47:19 2016 +0200
30.3 @@ -37,6 +37,7 @@
30.4 Cyrus:: cyrus-imapd
30.5 Dovecot:: dovecot-imapd dovecot-ldap dovecot-lmtpd
30.6
30.7 -Some test programs need additional programs provided by other packages:
30.8 +Some test programs and the configuration helper tool need additional programs
30.9 +provided by other packages:
30.10
30.11 envsubst:: gettext-base
31.1 --- a/tools/fix.sh Sun Apr 10 02:34:00 2016 +0200
31.2 +++ b/tools/fix.sh Sun Apr 17 23:47:19 2016 +0200
31.3 @@ -1,6 +1,6 @@
31.4 #!/bin/sh
31.5
31.6 -DIRNAME=`dirname $0`
31.7 +DIRNAME=`dirname "$0"`
31.8
31.9 if [ -e "$DIRNAME/config.sh" ]; then
31.10 CONFIG="$DIRNAME/config.sh"
31.11 @@ -10,7 +10,7 @@
31.12 . "$CONFIG"
31.13 fi
31.14
31.15 -PROGNAME=`basename $0`
31.16 +PROGNAME=`basename "$0"`
31.17
31.18 if [ "$1" = "--help" ]; then
31.19 cat 1>&2 <<EOF
32.1 --- a/tools/init.sh Sun Apr 10 02:34:00 2016 +0200
32.2 +++ b/tools/init.sh Sun Apr 17 23:47:19 2016 +0200
32.3 @@ -1,6 +1,6 @@
32.4 #!/bin/sh
32.5
32.6 -DIRNAME=`dirname $0`
32.7 +DIRNAME=`dirname "$0"`
32.8 CONFIG="$DIRNAME/config.sh"
32.9
32.10 if [ -e "$CONFIG" ]; then
32.11 @@ -16,7 +16,7 @@
32.12 SCHEMA=/etc/imip-agent/postgresql/schema.sql
32.13 fi
32.14
32.15 -PROGNAME=`basename $0`
32.16 +PROGNAME=`basename "$0"`
32.17
32.18 if [ "$1" = "--help" ]; then
32.19 cat 1>&2 <<EOF
33.1 --- a/tools/init_user.sh Sun Apr 10 02:34:00 2016 +0200
33.2 +++ b/tools/init_user.sh Sun Apr 17 23:47:19 2016 +0200
33.3 @@ -1,6 +1,6 @@
33.4 #!/bin/sh
33.5
33.6 -DIRNAME=`dirname $0`
33.7 +DIRNAME=`dirname "$0"`
33.8
33.9 if [ -e "$DIRNAME/config.sh" ]; then
33.10 CONFIG="$DIRNAME/config.sh"
33.11 @@ -10,9 +10,9 @@
33.12 . "$CONFIG"
33.13 fi
33.14
33.15 -PROGNAME=`basename $0`
33.16 +PROGNAME=`basename "$0"`
33.17
33.18 -if [ "$1" = "--help" ]; then
33.19 +if [ "$1" = "--help" ] || [ ! "$1" ]; then
33.20 cat 1>&2 <<EOF
33.21 Usage: $PROGNAME <calendar user>
33.22
34.1 --- a/tools/install.sh Sun Apr 10 02:34:00 2016 +0200
34.2 +++ b/tools/install.sh Sun Apr 17 23:47:19 2016 +0200
34.3 @@ -1,6 +1,6 @@
34.4 #!/bin/sh
34.5
34.6 -DIRNAME=`dirname $0`
34.7 +DIRNAME=`dirname "$0"`
34.8
34.9 if [ -e "$DIRNAME/config.sh" ]; then
34.10 . "$DIRNAME/config.sh"