2 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
3 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
4 # This is the command-line mail delivery agent for servers.
5 # Try to keep this small as it may be invoked frequently for each message
7 my $usage = "ssoma-mda [-1] /path/to/git/repo < /path/to/rfc2822_message";
13 my $once = $ARGV[0] eq "-1";
14 my $repo = pop @ARGV or die "Usage: $usage\n";
15 my $git = Ssoma
::Git
->new($repo);
16 my $mda = Ssoma
::MDA
->new($git);
20 $simple = Email
::Simple
->new(<STDIN
>);
22 $mda->deliver($simple, $once);