[opendmarc-users] Postgres Schema?
Jean-Paul Ladage
j.ladage at zestsoftware.nl
Mon Feb 16 09:57:22 PST 2015
Hi Patrick,
I converted the mysql schema and managed to get opendmarc running on postgresql.
createdb opendmarc
# import the postgres dump in database
psql -d opendmarc -f dmarc.psql
# create a role and grant privileges
# use these credentials in your opendmarc.conf
#
create user opendmarc with password 'pwxrC8Np2H';
grant all privileges on database opendmarc to opendmarc;
CREATE ROLE opendmarc_dbowner NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL '2020-10-06 00:00:00';
COMMENT ON ROLE opendmarc_dbowner IS 'owns all tables of opendmarc';
# Set ownership to role 'opendmarc_dbowner' for all tables and sequences van db 'opendmarc':
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" opendmarc` ; do psql -c "alter table $tbl owner to opendmarc_dbowner" opendmarc ; done
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" opendmarc` ; do psql -c "alter table $tbl owner to opendmarc_dbowner" opendmarc ; done
# Add role 'opendmarc_dbowner' to role 'opendmarc' (the actual user )
psql -d opendmarc
GRANT opendmarc_dbowner TO opendmarc;
Hope this helps...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmarc.psql
Type: application/octet-stream
Size: 3202 bytes
Desc: not available
URL: <http://www.trusteddomain.org/pipermail/opendmarc-users/attachments/20150216/5b0ab55c/attachment.obj>
-------------- next part --------------
Kind regards,
Jean-Paul Ladage
More information about the opendmarc-users
mailing list