gotthardp/rabbitmq-email

Error in Rabbit when passing emails

Opened this issue · 1 comments

Hi

I've compiled and enabled the rabbitmq_email plugin and set up postfix to pass emails to it using sasl authentication and I have email_filter set to false as I need the entire email body. Auth works fine but I get an error in the Rabbit log like this:

=ERROR REPORT==== 8-Dec-2015::11:41:18 ===
** Generic server <0.1821.0> terminating
** Last message in was {'EXIT',<0.1841.0>,normal}
** When Server state == {state,#Port<0.12051>,rabbit_email_handler,
{envelope,undefined,[],<<>>,0,{<<>>,<<>>}},
[{"AUTH","PLAIN LOGIN"},
{"STARTTLS",true},
{"SIZE","10485670"},
{"8BITMIME",true},
{"PIPELINING",true}],
false,undefined,false,false,
{state,
{user,<<"XXXXXXX">>,
[administrator],
[{rabbit_auth_backend_internal,none}]},
<0.1822.0>,[]},
[{hostname,"MYDOMAIN"},{sessioncount,1}]}

** Reason for termination ==
** {badarg,[{erlang,byte_size,[normal],[]},
{binstr,strip,3,[{file,"src/binstr.erl"},{line,189}]},
{gen_smtp_server_session,parse_request,1,
[{file,"src/gen_smtp_server_session.erl"},
{line,248}]},
{gen_smtp_server_session,handle_info,2,
[{file,"src/gen_smtp_server_session.erl"},
{line,196}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,604}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}

Is this an error in the plugin or the way the email is being passed?

I have no knowledge of the erlang language so any help with what is going wrong would be very much appreciated.

Thanks

Rob

Forked and patched gen_smtp must be used. When building manually, the following steps should be used:

$ git clone https://github.com/rabbitmq/rabbitmq-public-umbrella.git
$ cd rabbitmq-public-umbrella
$ git checkout rabbitmq_v3_5_6
$ make co
$ ./foreachrepo git checkout rabbitmq_v3_5_6
$ git clone https://github.com/gotthardp/rabbitmq-gen-smtp.git
$ git clone https://github.com/gotthardp/rabbitmq-eiconv.git
$ git clone https://github.com/gotthardp/rabbitmq-email.git
$ cd rabbitmq-email
$ git checkout v0.0.2
$ make