From d8328246652565dbac5c92ddd9ee495bbc9ffd0f Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 5 Jun 2006 01:02:08 +0000 Subject: Handle mail approving git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@117 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- split-mailman-mails-and-discard-and-save | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/split-mailman-mails-and-discard-and-save b/split-mailman-mails-and-discard-and-save index aae4932..5f2a60c 100755 --- a/split-mailman-mails-and-discard-and-save +++ b/split-mailman-mails-and-discard-and-save @@ -6,12 +6,13 @@ if ARGV[0] == "spam" MAILIN="mail/spam-in" MAILLEARN="mail/spam-learn" OUTBOX="mail/outbox" - SEND_DISCARD_MAIL = true + SEND_CONFIRM_MAIL = true elsif ARGV[0] == "ham" MAILIN="mail/ham-in" MAILLEARN="mail/ham-learn" OUTBOX="mail/outbox" - SEND_DISCARD_MAIL = false + SEND_CONFIRM_MAIL = true + APPROVE_PASSWORD = File.open('mailman-site-password').readline.chomp else STDERR.puts "Usage: #{$0} ham|spam" exit 1 @@ -80,11 +81,12 @@ def process_mail(filename) store_in_maildir(MAILLEARN, held_part) - if SEND_DISCARD_MAIL + if SEND_CONFIRM_MAIL mail_request = RMail::Message.new() mail_request.header['From'] = FROM mail_request.header['To'] = request_address mail_request.header['Subject'] = "Re: confirm #{cookie}" + mail_request.header['Approved'] = APPROVE_PASSWORD if APPROVE_PASSWORD mail_request.body = '' store_in_maildir(OUTBOX, mail_request) end -- cgit v1.2.3