Revision 8ac6d200
Added by Marc Dequènes almost 16 years ago
- ID 8ac6d2004f4f00e40a0964aae45edd72fed10498
TODO | ||
---|---|---|
- handle incoming encrypted messages from user to receive sensitive data, and to sign replies -> postman would need a GPG key too
|
||
- ban keys from unknow users flooding -> counter, reseted when key added in DB
|
||
- protect against replay (foo resending eavesdropped mail) -> store message IDs, but how to limit to a reasonnable timeframe ?
|
||
- protect against intercepted mail with falsified headers (From/Reply-To/... could be tampered to get replies, reply tampered too, and then resent to avoid being detected)
|
||
- protect against intercepted mail with falsified headers (From/Reply-To/... could be tampered to get replies, reply tampered too, and then resent to avoid being detected)
|
lib/cyborghood/mail.rb | ||
---|---|---|
smtp_from = @mail.from_addrs.collect{|a| a.address}.join(", ")
|
||
smtp_to = @mail.to_addrs.collect{|a| a.address}
|
||
Net::SMTP.start(smtp_server, smtp_port) do |smtp|
|
||
p @mail.to_s
|
||
#smtp.send_message(@mail.to_s, smtp_from, smtp_to)
|
||
#p @mail.to_s
|
||
smtp.send_message(@mail.to_s, smtp_from, smtp_to)
|
||
end
|
||
end
|
||
|
postman | ||
---|---|---|
result_list = CommandParser.run(order)
|
||
|
||
# create reply
|
||
logger.info "Sending reply"
|
||
mail_reply = mail.create_reply
|
||
reply_txt = "Hello #{order.user.cn},\n\nFollows the transcript of your commands:\n"
|
||
reply_attachments = []
|
||
... | ... | |
mail_reply.crypt(order.user.keyFingerPrint)
|
||
mail_reply.deliver
|
||
|
||
logguer.debug "Message processed completely"
|
||
msg.delete
|
||
end
|
||
end
|
Also available in: Unified diff
[evol] activate outgoing mails