From 79bc9e115b37f9ea35ecbedbb62b71f61a2129bf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 15 Jun 2006 21:23:27 +0000 Subject: Process the other outbox too git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@130 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- oftc-listmod-process-outbox | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'oftc-listmod-process-outbox') diff --git a/oftc-listmod-process-outbox b/oftc-listmod-process-outbox index 032c88b..a0b634d 100755 --- a/oftc-listmod-process-outbox +++ b/oftc-listmod-process-outbox @@ -1,6 +1,8 @@ #!/usr/bin/ruby OUTBOX="mail/outbox" +HUMANS="mail/outbox-tolistmods" +HUMAN="listmoderators@lists.oftc.net" def check_maildir(d) throw "#{d} is not a maildir" unless FileTest.directory?(d) @@ -11,6 +13,7 @@ def check_maildir(d) end check_maildir OUTBOX +check_maildir HUMANS Dir[OUTBOX+"/new/*"].each do |filename| if system("/usr/sbin/sendmail -t -oi < #{filename}") @@ -19,3 +22,11 @@ Dir[OUTBOX+"/new/*"].each do |filename| STDERR.puts "Mailing of #{filename} failed." end end + +Dir[HUMANS+"/new/*"].each do |filename| + if system("/usr/sbin/sendmail -oi #{HUMAN} < #{filename}") + File.unlink(filename) + else + STDERR.puts "Mailing of #{filename} failed." + end +end -- cgit v1.2.3