Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit eb45c1bd5bd41ec4b62b649db4900f16ce868a19 breaks reading DMARC reports from STDIN #105

Open
twesterhever opened this issue Dec 10, 2021 · 1 comment

Comments

@twesterhever
Copy link

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
Copy link
Contributor

I guess something like changing this line

} elsif (open(FILE, "<", $f)) {

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants