1 #!/bin/sh 2 3 set -a 4 5 # The mail domain. 6 7 MAIL_DOMAIN=example.com 8 9 # How messages are delivered to mailboxes. 10 # See the MailIntegration/LocalSMTP and MailIntegration/LMTP documents. 11 # Choices: LocalSMTP, LMTP 12 13 MAILBOX_DELIVERY=LocalSMTP 14 15 # Whether a special lmtp group will be used even with local SMTP. 16 # See the SystemUsers document. 17 # Choices: yes, no 18 19 MAILBOX_DELIVERY_LMTP_GROUP=no 20 21 # The location of the LMTP socket used to communicate with a mail 22 # storage solution. 23 24 LMTP_SOCKET=/var/run/cyrus/socket/lmtp 25 26 # Whether local system users are supported. 27 # See the MailIntegration/LocalSMTP document. 28 # Choices: yes, no 29 30 LOCAL_SYSTEM_USERS=no 31 32 # How the users are managed. 33 # See the MailIntegration/Simple and MailIntegration/LDAP documents. 34 # Choices: Simple, LDAP 35 36 USER_DATABASE=Simple 37 38 # LDAP-specific details. 39 # See the MailIntegration/LDAP document. 40 # Choices: ldap, ldaps 41 42 LDAP_SCHEME=ldap 43 LDAP_HOST=localhost 44 LDAP_PORT= 45 LDAP_BASE_DN="dc=example,dc=com" 46 LDAP_SERVICE_BIND_DN="uid=imip-agent,ou=Special Users,dc=example,dc=com" 47 LDAP_SERVICE_PASSWORD= 48 49 50 51 # Computed values. Do not edit! 52 53 MAIL_DOMAIN_QUOTED=`echo $MAIL_DOMAIN | sed 's/\./\\\./g'` 54 55 if [ "$MAILBOX_DELIVERY" = 'LocalSMTP' ]; then 56 MAILBOX_DELIVERY_OPTIONS="-L" 57 if [ "$MAILBOX_DELIVERY_LMTP_GROUP" = 'yes' ]; then 58 MAILBOX_DELIVERY_GROUP=lmtp 59 else 60 MAILBOX_DELIVERY_GROUP=www-data 61 fi 62 else 63 MAILBOX_DELIVERY_OPTIONS="-l $LMTP_SOCKET" 64 MAILBOX_DELIVERY_GROUP=lmtp 65 fi 66 67 if [ "$LOCAL_SYSTEM_USERS" = 'yes' ]; then 68 POSTFIX_LOCAL_SYSTEM_ENABLE= 69 else 70 POSTFIX_LOCAL_SYSTEM_ENABLE=# 71 fi 72 73 if [ ! "$LDAP_PORT" ]; then 74 if [ "$LDAP_SCHEME" = 'ldaps' ]; then 75 LDAP_PORT=636 76 else 77 LDAP_PORT=389 78 fi 79 fi 80 81 if [ "$USER_DATABASE" = 'Simple' ]; then 82 APACHE_LDAP_ENABLE=# 83 APACHE_SIMPLE_ENABLE= 84 else 85 APACHE_LDAP_ENABLE= 86 APACHE_SIMPLE_ENABLE=# 87 fi 88 89 90 91 # Substituted variables. 92 93 SUBSTITUTED='$MAIL_DOMAIN $MAIL_DOMAIN_QUOTED \ 94 $MAILBOX_DELIVERY_OPTIONS $MAILBOX_DELIVERY_GROUP \ 95 $APACHE_LDAP_ENABLE $APACHE_SIMPLE_ENABLE \ 96 $POSTFIX_LOCAL_SYSTEM_ENABLE \ 97 $LDAP_SCHEME $LDAP_HOST $LDAP_PORT $LDAP_BASE_DN $LDAP_SERVICE_BIND_DN $LDAP_SERVICE_PASSWORD'