Server IP : 85.214.239.14 / Your IP : 3.145.103.119 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/2/root/proc/2/cwd/bin/ |
Upload File : |
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Getopt::Long; use Pod::Usage; use lib 'lib'; use Mail::DMARC::Report::Receive; $|++; my %command_line_options = ( 'file:s' => \my $file, 'imap' => \my $imap, 'mbox' => \my $mbox, 'verbose+' => \my $verbose, ); GetOptions (%command_line_options); pod2usage(0) if ! $imap && ! $mbox && ! $file; ## no critic (Carp) my $recv = Mail::DMARC::Report::Receive->new() or die; $recv->verbose($verbose) if $verbose; $recv->from_imap if $imap; $recv->from_mbox($mbox) if $mbox; $recv->from_file($file) if $file; exit; __END__ =head1 NAME dmarc_receive - receive aggregate reports via IMAP, mbox, or message file(s) =head1 USAGE dmarc_receive [ --imap | --mbox | --file ] =head1 DESCRIPTION This script processes incoming DMARC reports from IMAP, files, or a mbox formatted file. =head2 IMAP To process reports with IMAP, you must configure the [imap] settings in mail-dmarc.ini. This program will: * log into the IMAP account * select the specified folder (INBOX, dmarc, etc) * for every unread (Unseen) message, search for DMARC reports =head3 IMAP Aggregate report IMAP aggregate reports are detected by the presence of zip or gzip attachments. When an aggregate report is detected: * the attachment is decompressed * the XML is parsed * the report is saved to the report store * the message is marked as read/seen * move message to [imap][a_done] folder (if defined) =head3 IMAP Forensic report IMAP forensic reports are detected by the presence of the content-types message/feedback-report and text/rfc822-headers. When a forensic report is detected it is moved to the [imap][f_done] IMAP folder. =head2 File as message Accepts the filename of a file containing a mail message. The message is parsed and stored. =head2 Mbox Accepts the filename of a mbox format file containing mail messages. The messages are parsed and stored. =cut