diff options
author | Mario Preksavec <mario at slackware dot hr> | 2019-05-17 23:20:52 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-05-17 23:20:52 +0700 |
commit | fe01e850a8271f3dc25a72e2143fef816623d03b (patch) | |
tree | c9301b38b0e998240048507289294a95cb2dd1a3 /network/opendmarc/patches/ticket159.patch | |
parent | 39262ecf08a2b14804e4c2bd488790ff6ded6e72 (diff) | |
download | slackbuilds-fe01e850a8271f3dc25a72e2143fef816623d03b.tar.gz |
network/opendmarc: Added (DMARC milter and library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/opendmarc/patches/ticket159.patch')
-rw-r--r-- | network/opendmarc/patches/ticket159.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/network/opendmarc/patches/ticket159.patch b/network/opendmarc/patches/ticket159.patch new file mode 100644 index 0000000000..13a9043614 --- /dev/null +++ b/network/opendmarc/patches/ticket159.patch @@ -0,0 +1,77 @@ +diff --git a/configure.ac b/configure.ac +index 255c449..27d7cd4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -492,6 +492,7 @@ AC_OUTPUT([ Makefile + reports/opendmarc-expire.8 + reports/opendmarc-import + reports/opendmarc-import.8 ++ reports/opendmarc-importstats + reports/opendmarc-importstats.8 + reports/opendmarc-params + reports/opendmarc-params.8 +diff --git a/reports/opendmarc-importstats b/reports/opendmarc-importstats +deleted file mode 100755 +index 839a871..0000000 +--- a/reports/opendmarc-importstats ++++ /dev/null +@@ -1,26 +0,0 @@ +-#!/bin/sh +-## +-## Copyright (c) 2012, The Trusted Domain Project. All rights reserved. +-## +-## opendmarc-importstats -- import opendmarc output to MySQL +-## +-## This is intended to be used via a crontab. If import is successful, +-## this code exits quietly so there's no output. If it fails, it does +-## "ls -l" on the temporary file, so that cron generates mail to whever +-## ran the job. +- +-## setup +-statsdb="/var/tmp/dmarc.dat" +-# OPENDMARC_PASSWORD="password"; export OPENDMARC_PASSWORD +- +-if [ -s $statsdb ] +-then +- mv $statsdb ${statsdb}.OLD.$$ +- +- if opendmarc-import < ${statsdb}.OLD.$$ +- then +- rm ${statsdb}.OLD.$$ +- else +- ls -l ${statsdb}.OLD.$$ +- fi +-fi +diff --git a/reports/opendmarc-importstats.in b/reports/opendmarc-importstats.in +new file mode 100755 +index 0000000..3a28ee3 +--- /dev/null ++++ b/reports/opendmarc-importstats.in +@@ -0,0 +1,27 @@ ++#!/bin/sh ++## ++## Copyright (c) 2012, The Trusted Domain Project. All rights reserved. ++## ++## opendmarc-importstats -- import opendmarc output to MySQL ++## ++## This is intended to be used via a crontab. If import is successful, ++## this code exits quietly so there's no output. If it fails, it does ++## "ls -l" on the temporary file, so that cron generates mail to whever ++## ran the job. ++ ++## setup ++statsdb="`grep ^HistoryFile @sysconfdir@/opendmarc.conf | sed 's/^HistoryFile\s\+//'`" ++[ -z "$statsdb" ] && exit 0 ++# OPENDMARC_PASSWORD="password"; export OPENDMARC_PASSWORD ++ ++if [ -s "$statsdb" ] ++then ++ mv "$statsdb" "${statsdb}.OLD.$$" ++ ++ if opendmarc-import < "${statsdb}.OLD.$$" ++ then ++ rm "${statsdb}.OLD.$$" ++ else ++ ls -l "${statsdb}.OLD.$$" ++ fi ++fi |