summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-06-15 21:23:27 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-06-15 21:23:27 +0000
commit79bc9e115b37f9ea35ecbedbb62b71f61a2129bf (patch)
tree9fd4bdf4fc6b75d645ec5c4fd64c698ed136eeb8
parent90e27cc42fd410bd4cc28693214be37c1484aad6 (diff)
Process the other outbox too
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@130 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xoftc-listmod-process-outbox11
1 files changed, 11 insertions, 0 deletions
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