# HG changeset patch # User Paul Boddie # Date 1440103500 -7200 # Node ID 61c42a045c320ec3579876e573d48257e0beab02 # Parent eb0be8a744346e2fc5667f5a290a27992926e95e Changed the simple method of configuring Postfix to use explicit lists of recipients rather than plain regular expressions that are unable to identify invalid recipients. Added a collection of example LDAP schema definitions. diff -r eb0be8a74434 -r 61c42a045c32 README.txt --- a/README.txt Sun Aug 16 00:41:12 2015 +0200 +++ b/README.txt Thu Aug 20 22:45:00 2015 +0200 @@ -114,19 +114,26 @@ virtual_alias_maps_people_outgoing.cf mail routing virtual_alias_maps_resources.cf ... +Since the use of LDAP can be somewhat challenging and also excessive in some +situations, examples of maintaining recipient information using a simpler +approach are provided: + For Postfix without LDAP (in conf/postfix/simple)... main.cf.example Defines recipients and outgoing mail routing (for inclusion in main.cf) - virtual_alias_maps_people Defines recipients and outgoing + virtual_alias_maps Defines recipients and outgoing virtual_alias_maps_people_outgoing mail routing - virtual_alias_maps_resources ... -The above recipient identification configuration examples can be disregarded -in favour of other ways of defining mail recipients, subject to the needs of -any given environment. +In this simpler environment, recipient details must be manually edited in the +virtual alias map files, but this permits a very transparent way of +administering the system. + +Naturally, the above recipient identification configuration examples can be +disregarded in favour of other ways of defining mail recipients, subject to +the needs of any given environment. LDAP Representations for Mail Recipients ---------------------------------------- diff -r eb0be8a74434 -r 61c42a045c32 conf/ldap/example.ldif --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/ldap/example.ldif Thu Aug 20 22:45:00 2015 +0200 @@ -0,0 +1,78 @@ +# Example directory entries. +# +# To populate a schema, a command resembling the following can be used: +# +# ldapadd -D 'cn=Directory Manager' -W -f example.ldif + +# See: RFC 4519 (person, organizationalPerson, organizationalUnit) +# RFC 2798 (inetOrgPerson) +# RFC 2739 (calEntry) +# RFC 4512 (top) + +# Units: + +dn: ou=People,dc=example,dc=com +objectClass: top +objectClass: organizationalUnit +ou: People + +dn: ou=Resources,dc=example,dc=com +objectClass: top +objectClass: organizationalUnit +ou: Resources + +# People: + +dn: uid=pboddie,ou=People,dc=example,dc=com +objectClass: top +objectClass: person +objectClass: inetOrgPerson +objectClass: organizationalPerson +objectClass: calEntry +uid: pboddie +givenName: Paul +sn: Boddie +cn: Paul Boddie +mail: paul.boddie@example.com +alias: pboddie@example.com +calFBURL: http://www.example.com/freebusy/mailto:paul.boddie@example.com/freebusy + +dn: uid=vole,ou=People,dc=example,dc=com +objectClass: top +objectClass: person +objectClass: inetOrgPerson +objectClass: organizationalPerson +objectClass: calEntry +uid: vole +givenName: Vincent +sn: Vole +cn: Vincent Vole +mail: vincent.vole@example.com +alias: vole@example.com +calFBURL: http://www.example.com/freebusy/mailto:vincent.vole@example.com/freebusy + +# Resources: + +dn: cn=Porsche 911,ou=Resources,dc=example,dc=com +objectClass: top +objectClass: mailrecipient +objectClass: calEntry +cn: Porsche 911 +mail: resource-car-porsche911@example.com +calFBURL: http://www.example.com/freebusy/mailto:resource-car-porsche911@example.com/freebusy + +dn: cn=Conference Room,ou=Resources,dc=example,dc=com +objectClass: top +objectClass: mailrecipient +objectClass: calEntry +cn: Conference Room +mail: resource-room-confroom@example.com +calFBURL: http://www.example.com/freebusy/mailto:resource-room-confroom@example.com/freebusy + +dn: cn=Sauna,ou=Resources,dc=example,dc=com +objectClass: top +objectClass: mailrecipient +objectClass: calEntry +cn: Sauna +mail: resource-room-sauna@example.com +calFBURL: http://www.example.com/freebusy/mailto:resource-room-sauna@example.com/freebusy diff -r eb0be8a74434 -r 61c42a045c32 conf/postfix/simple/main.cf.example --- a/conf/postfix/simple/main.cf.example Sun Aug 16 00:41:12 2015 +0200 +++ b/conf/postfix/simple/main.cf.example Thu Aug 20 22:45:00 2015 +0200 @@ -1,4 +1,3 @@ virtual_alias_maps = $alias_maps, hash:/etc/postfix/virtual, - regexp:/etc/postfix/simple/virtual_alias_maps_resources, - regexp:/etc/postfix/simple/virtual_alias_maps_people -sender_bcc_maps = regexp:/etc/postfix/simple/virtual_alias_maps_people_outgoing + hash:/etc/postfix/simple/virtual_alias_maps +sender_bcc_maps = hash:/etc/postfix/simple/virtual_alias_maps_people_outgoing diff -r eb0be8a74434 -r 61c42a045c32 conf/postfix/simple/virtual_alias_maps --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/postfix/simple/virtual_alias_maps Thu Aug 20 22:45:00 2015 +0200 @@ -0,0 +1,5 @@ +paul.boddie@example.com people+paul.boddie@example.com +vincent.vole@example.com people+vincent.vole@example.com +resource-car-porsche911@example.com resources+resource-car-porsche911@example.com +resource-room-confroom@example.com resources+resource-room-confroom@example.com +resource-room-sauna@example.com resources+resource-room-sauna@example.com diff -r eb0be8a74434 -r 61c42a045c32 conf/postfix/simple/virtual_alias_maps_people --- a/conf/postfix/simple/virtual_alias_maps_people Sun Aug 16 00:41:12 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -if !/^((people+|people-outgoing+|resources+|resource-).*|calendar)@example\.com$/ -/^(.*)@(example\.com)$/ people+${1}@${2} -endif diff -r eb0be8a74434 -r 61c42a045c32 conf/postfix/simple/virtual_alias_maps_people_outgoing --- a/conf/postfix/simple/virtual_alias_maps_people_outgoing Sun Aug 16 00:41:12 2015 +0200 +++ b/conf/postfix/simple/virtual_alias_maps_people_outgoing Thu Aug 20 22:45:00 2015 +0200 @@ -1,3 +1,2 @@ -if !/^((people+|people-outgoing+|resources+|resource-).*|calendar)@example\.com$/ -/^(.*)@(example\.com)$/ people-outgoing+${1}@${2} -endif +paul.boddie@example.com people-outgoing+paul.boddie@example.com +vincent.vole@example.com people-outgoing+vincent.vole@example.com diff -r eb0be8a74434 -r 61c42a045c32 conf/postfix/simple/virtual_alias_maps_resources --- a/conf/postfix/simple/virtual_alias_maps_resources Sun Aug 16 00:41:12 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -if !/^((people+|people-outgoing+|resources+).*|calendar)@example\.com$/ -/^(resource-.*)@(example\.com)$/ resources+${1}@${2} -endif