Project

General

Profile

« Previous | Next » 

Revision 5425b3f0

Added by Marc Dequènes over 15 years ago

  • ID 5425b3f0470e93a44529f3100be771616135b530

[evol] separate signed mail processing from commands extracting, and improved order

View differences:

postman
when :ignorable
end
end
if order.nil?
logger.info "Mail is invalid, ignoring..."
msg.delete
next
elsif not order.ok
logger.info "Sending reply for rejected message (#{order.msg})"
mail_reply = mail.create_simple_reject_reply("A message (ID: #{mail.message_id}) apparently from you was rejected for the following reason:\n #{order.msg}")
mail_reply.crypt(order.user.keyFingerPrint) unless order.user.nil?
mail_reply.deliver
result_tag = order.ok ? "SUCCESS" : "FAILURE"
logger.info "Processing result: #{result_tag} (#{order.message})"
logger.info "Extra processing information: " + order.system_message if order.system_message
unless order.ok
if order.warn_sender
logger.info "Sending reply for rejected message"
mail_reply = mail.create_simple_reject_reply("A message (ID: #{mail.message_id}), apparently from you," +
" was rejected for the following reason:\n #{order.message}")
mail_reply.deliver
end
msg.delete
next
end
......
# create transcript
logger.debug "Preparing reply"
reply_txt = "Hello #{order.user.cn},\n\nFollows the transcript of your commands:\n"
reply_txt = "Hello #{order.user.cn},\n\n"
reply_txt += order.message + "\n\n" if order.message
reply_txt += "Follows the transcript of your commands:\n"
reply_attachments = []
result_list.each do |result|
reply_txt << "> #{result.cmd}\n"

Also available in: Unified diff