I've figured it out by myself.
This is the line that needs to be there
headers['X-MC-Metadata'] = { "user_id" => user.id}.to_json
Here are the further details: http://help.mandrill.com/entries/21786413-Using-Custom-Message-Metadata
Hope it helps someone since it cost me several hours.