[opendmarc-users] opendmarc-reports: can't create report file for domain

Jonathan Sélea jonathan at selea.se
Wed Apr 18 12:52:52 PDT 2018


>> TemporaryDirectory /var/tmp
> 
> Are you sure that this option was parsed by opendmarc-reports at any 
> time
> in the past? Looking through some old versions I can't find any hint 
> that
> the behaviour of the reports script was changed in this respect.
> 

I am not sure if it was parsed or not, OpenDMARC did atleast not 
complain about when the "TemporaryDirectory" directive was in the 
opendmarc.conf

> 
> Opendmarc-reports creates temporary files in the current directory. It
> seems the user which is used to run opendmarc-reports cannot write to 
> the
> directory where you are starting the script. In your Cron script you 
> need
> to change to a directory where the user has write permissions, e.g. the
> same place where the history file is written, or one of the temporary
> directories.
> 

I am not really sure where "the current directory" is in my case. I do 
run a small script that run following:

/usr/sbin/opendmarc-import -dbhost=${DBHOST} -dbuser=${DBUSER} 
-dbpasswd=${DBPASS} -dbname=${DBNAME} -verbose < /tmp/${HISTFILE}.$$
/usr/sbin/opendmarc-reports -dbhost=${DBHOST} -dbuser=${DBUSER} 
-dbpasswd=${DBPASS} -dbname=${DBNAME} -verbose -interval=86400 
-report-email 'reports at dmarc.domain.tld' -report-org 'domain.tld'
/usr/sbin/opendmarc-expire -dbhost=${DBHOST} -dbuser=${DBUSER} 
-dbpasswd=${DBPASS} -dbname=${DBNAME} -verbose

I run the cronjob as the user "opendmarc", and this small script is 
located here: /usr/local/bin/opendmarc-x.sh¨
Is it not possible to define where temporary files to other directories, 
like /var/tmp?

/ Jonathan


More information about the opendmarc-users mailing list