trusteddomainproject / OpenDMARC

This is the Trusted Domain Project's impementation of the DMARC protocol libary and mail filter, called OpenDMARC. A "milter" connects to unix-based mailers (originally, sendmail, but now many) and provides a standard filtering API.
Other
103 stars 55 forks source link

feature: PostgreSQL support #246

Open r10r opened 1 year ago

r10r commented 1 year ago

Hi there,

we want to run OpenDMARC with PostgreSQL instead of MySQL because of licensing issues. Is anyone out there who has done this already ?

Thanks Ruben

tuxmaster5000 commented 1 year ago

It looks like the source code can support multiple back end's, but I only find an schema definition for MySQL/MariaDB.

sparked435 commented 11 months ago

I also would prefer something other than MySQL. I'm already running Postgres; SQLite would be more than enough for a small site like mine (just a few hundred inbound emails/day.)

Converting the schema file to Postgres looks near trivial, I could probably do that within an hour or so. The bigger problem is the utilities: despite using the database-agnostic DBI library, they appear to stick exclusively to the MySQL dialect for the SQL calls themselves. Sorting this out is a lot heavier lift and my Perl is rusty.

randolf commented 10 months ago

I also would prefer something other than MySQL. I'm already running Postgres; SQLite would be more than enough for a small site like mine (just a few hundred inbound emails/day.)

Converting the schema file to Postgres looks near trivial, I could probably do that within an hour or so. The bigger problem is the utilities: despite using the database-agnostic DBI library, they appear to stick exclusively to the MySQL dialect for the SQL calls themselves. Sorting this out is a lot heavier lift and my Perl is rusty.

I may be able to help with this. I work with Perl's DBI and PostgreSQL almost every day, so please let me know what you've got so far so that I can just focus on what's left without re-inventing what you've already done.

sparked435 commented 10 months ago

so please let me know what you've got so far so that I can just focus on what's left without re-inventing what you've already done.

I've done nothing but look at the code, don't let me stop you from proceeding.

randolf commented 10 months ago

I've done nothing but look at the code, don't let me stop you from proceeding.

Thanks! I just finished writing my PostgreSQL code, and I submitted it as a pull request: https://github.com/trusteddomainproject/OpenDMARC/pull/251

Since you've been looking at the code, if you could take a look at what I've written I'd appreciate it -- I tried my best to get everything the way it needs to be, but I won't be surprised if improvements will be contributed by others. Also, a few columns are in need of documentation.

randolf commented 9 months ago

Many Pull Requests over the past 12+ months have been submitted by many different contributors, but it appears they haven't been dealt with, and I'm feeling concerned. Does anyone know if the original organizers are intending to continue work on this project?

I recently started an issue regarding my concern: https://github.com/trusteddomainproject/OpenDMARC/issues/253

Hopefully further development can continue in the near future. (Thanks.)