# HG changeset patch # User Paul Boddie # Date 1414702436 -3600 # Node ID ac41c8e7b3adf822e9aab6a46ccc69c14ea55f1b # Parent 9dedbc0dddbd81f31fed9366e2f5406ad20751b7 Added Postfix support for inspecting outgoing messages, fixing LMTP access for the special user, and making sure that files can be read/written by groups. diff -r 9dedbc0dddbd -r ac41c8e7b3ad conf/postfix/main.cf.example --- a/conf/postfix/main.cf.example Thu Oct 30 19:35:40 2014 +0100 +++ b/conf/postfix/main.cf.example Thu Oct 30 21:53:56 2014 +0100 @@ -1,1 +1,2 @@ -virtual_alias_maps = $alias_maps, ..., ldap:/etc/postfix/ldap/virtual_alias_maps_resources.cf, ldap:/etc/postfix/ldap/virtual_alias_maps_people.cf +virtual_alias_maps = $alias_maps, ldap:/etc/postfix/ldap/virtual_alias_maps_resources.cf, ldap:/etc/postfix/ldap/virtual_alias_maps_people.cf +sender_bcc_maps = ldap:/etc/postfix/ldap/virtual_alias_maps_people_outgoing.cf diff -r 9dedbc0dddbd -r ac41c8e7b3ad conf/postfix/master.cf.items --- a/conf/postfix/master.cf.items Thu Oct 30 19:35:40 2014 +0100 +++ b/conf/postfix/master.cf.items Thu Oct 30 21:53:56 2014 +0100 @@ -2,5 +2,8 @@ flags=FR user=imip-agent argv=/var/lib/imip-agent/imip_resource.py -o ${original_recipient} -r ${recipient} -s imip-agent@example.com imip_people unix - n n - - pipe - flags=FR user=imip-agent argv=/var/lib/imip-agent/imip_person.py + flags=FR user=imip-agent:lmtp argv=/var/lib/imip-agent/imip_person.py -o ${original_recipient} -r ${recipient} -s imip-agent@example.com -l $lmtp_socket +imip_people_outgoing unix - n n - - pipe + flags=FR user=imip-agent argv=/var/lib/imip-agent/imip_person_outgoing.py + -O diff -r 9dedbc0dddbd -r ac41c8e7b3ad conf/postfix/transport --- a/conf/postfix/transport Thu Oct 30 19:35:40 2014 +0100 +++ b/conf/postfix/transport Thu Oct 30 21:53:56 2014 +0100 @@ -2,3 +2,5 @@ resources@example.com imip_resources: # iMIP content handling for example.com via the people address: people@example.com imip_people: +# iMIP content handling for example.com via the people-outgoing address: +people-outgoing@example.com imip_people_outgoing: diff -r 9dedbc0dddbd -r ac41c8e7b3ad imip_store.py --- a/imip_store.py Thu Oct 30 19:35:40 2014 +0100 +++ b/imip_store.py Thu Oct 30 21:53:56 2014 +0100 @@ -3,7 +3,7 @@ from datetime import datetime from imiptools.config import STORE_DIR, PUBLISH_DIR from os.path import abspath, commonprefix, exists, join, split -from os import makedirs +from os import chmod, makedirs from vCalendar import iterwrite def check_dir(base, dir): @@ -80,6 +80,7 @@ to_stream(f, node) finally: f.close() + chmod(filename, 0660) return True @@ -114,6 +115,7 @@ f.write("\t".join(item) + "\n") finally: f.close() + chmod(filename, 0660) return True @@ -145,6 +147,7 @@ print >>f, request finally: f.close() + chmod(filename, 0660) return True @@ -161,6 +164,7 @@ print >>f, request finally: f.close() + chmod(filename, 0660) return True @@ -205,6 +209,7 @@ to_stream(f, make_calendar([("VFREEBUSY", {}, record)], "PUBLISH")) finally: f.close() + chmod(filename, 0660) return True