Commit eb45c1bd5bd41ec4b62b649db4900f16ce868a19 breaks reading DMARC reports from STDIN
twesterhever opened this issue · 1 comments
twesterhever commented
On several setups, I (ab?)use /etc/aliases
to deliver incoming DMARC reports to the dmarcts-report-parser
:
# DMARC Reports
dmarcreports: "| /etc/postfix/dmarcts-report-parser.pl -e -"
In /etc/postfix/virtual
, this destination is defined for mail addresses handling DMARC reports:
# DMARC reports
postmaster+dmarc@example.com dmarcreports
postmaster+dmarc@example.net dmarcreports
To the best of my understanding, this setup worked fine until commit eb45c1b, which now causes STDIN not to be a processable file anymore.
Is there another way to continue reading DMARC reports directly from STDIN? If so, I would be happy to be pointed into the right direction. Thank you in advance.
wolfgangkarall commented
I guess something like changing this line
should work, replace
} elsif (open(FILE, "<", $f)) {
with
} elsif (open(FILE, "<", $f) or (($f eq '-') and (*FILE = *STDIN))) {
This is not tested at all, but fits the "to be pointed into the right direction" I guess. :)