summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-07-15 13:27:00 +0000
committeruckelman <uckelman@nomic.net>2010-07-15 13:27:00 +0000
commit51699f241883605b588609844f35d1e96c905330 (patch)
tree45412621663a3b0f8ecf5f8b6a8af84d8a7e7a28
parentca20fcce0798ebd6300722d5e9f7100551f47c99 (diff)
Added script which bridges postfix_local to apache.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6991 67b53d14-2c14-4ace-a08f-0dab2b34000c
-rwxr-xr-xsrc/postfix_handoff.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/postfix_handoff.pl b/src/postfix_handoff.pl
new file mode 100755
index 0000000..88c6675
--- /dev/null
+++ b/src/postfix_handoff.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+use LWP::UserAgent;
+use HTTP::Request::Common qw(POST);
+
+local $/;
+my $msg = <STDIN>;
+
+my $url = 'http://www.test2.nomic.net/list_post_receive.php';
+
+my $ua = LWP::UserAgent->new;
+my $req = POST $url, [ message => $msg ];
+
+my $res = $ua->request($req);
+
+unless ($res->is_success()) {
+ die 'POST failed: ' . $res->status_line . ' ' . $res->content;
+}