Skip to content


Subversion checkout URL

You can clone with
Download ZIP


RFC allows up to 254 character from addresses #27

merged 2 commits into from

2 participants


We noticed that mixpanel can't send messages to our gen_smtp server, and traced it down to length. This patch upgrades the parse limit from 129 chars to 254.


Got a link to the relevant RFC piece?


though sorry, i was mistaken - it's 320... and technically, the local part can only be 64 but i think that enforcing that literally would cause problems. Here's the "valid in the real world" address that tripped up the server (i just changed the sensitive part w/foobar and left the replacement the same length):


So should we just allow 320 overall length and call it good?


Wanna amend your commit so I can be lazy and just hit the merge button? ;)



@Vagabond Vagabond merged commit f5eed6a into Vagabond:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2012
  1. @cbd
Commits on Aug 21, 2012
  1. @cbd

    320 max smtp address length

    cbd authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/gen_smtp_server_session.erl
2  src/gen_smtp_server_session.erl
@@ -635,7 +635,7 @@ parse_encoded_address(<<>>, Acc, {_Quotes, false}) ->
{list_to_binary(lists:reverse(Acc)), <<>>};
parse_encoded_address(<<>>, _Acc, {_Quotes, true}) ->
error; % began with angle brackets but didn't end with them
-parse_encoded_address(_, Acc, _) when length(Acc) > 129 ->
+parse_encoded_address(_, Acc, _) when length(Acc) > 320 ->
error; % too long
parse_encoded_address(<<"\\", Tail/binary>>, Acc, Flags) ->
<<H, NewTail/binary>> = Tail,
Something went wrong with that request. Please try again.