keltia/dmarc-cat

Accept files on STDIN

Closed this issue · 3 comments

It would be useful if dmac-cat accepted input on STDIN so that it could be used in a pipe.

This would allow dmarc reports to be read directly from an e-mail message without having to perform busy work with temporary files.

I'd like to be able to do this:

mhstore -noverbose -outfile - | funzip | dmarc-cat

You can use stdin mode, specify - as the file name and -t for the file type.

Thanks for the tip!

could this also be tweaked so that ZIP files are handled as well? right now if you pipe a ZIP file into dmarc-cat, it fails:

    $ cat report.zip | dmarc-cat -t .zip -
    2022/11/09 12:34:38 Error: file -:: unmarshall: XML syntax error on line 2: illegal character code U+0003

dixit https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999578#24