Revision d5a19360
Added by Marc Dequènes almost 16 years ago
- ID d5a1936012f558d396acd3cff82b7c9ba393dd53
postman | ||
---|---|---|
break
|
||
end
|
||
|
||
mail = Mail.new(msg)
|
||
mail = Mail.new(msg.content)
|
||
logger.info "Received mail with ID '#{mail.message_id}': #{mail.from_addrs} -> #{mail.to_addrs} (#{mail.subject})"
|
||
|
||
# ignore mails not signed
|
||
unless mail.is_pgp_signed?
|
||
logger.info "Mail not signed or not RFC3156 compliant, ignoring..."
|
||
msg.delete
|
||
next
|
||
end
|
||
|
||
... | ... | |
end
|
||
if order.nil?
|
||
logger.info "Mail is invalid, ignoring..."
|
||
msg.delete
|
||
next
|
||
elsif not order.ok
|
||
mail_reply = mail.create_reply
|
||
mail_reply.quoted_printable_body = "A message (ID: #{mail.message_id}) apparently from you was rejected for the following reason:\n #{order.msg}"
|
||
mail_reply.deliver
|
||
msg.delete
|
||
next
|
||
end
|
||
|
||
result_list = CommandParser.run(order)
|
||
|
||
# create reply
|
||
mail_reply = mail.create_reply
|
||
reply_txt = "Hello #{order.user.cn},\n\nFollows the transcript of your commands:\n"
|
||
reply_attachments = []
|
||
... | ... | |
end
|
||
mail_reply.crypt(order.user.keyFingerPrint)
|
||
mail_reply.deliver
|
||
|
||
msg.delete
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
[evol] improved IMAP message handling, and properly delete ignored or processed messages