links were much larger than our old limit (which was already 4x the RFC limit).
New limit is 16x the RFC limit.
Bumped the version of dnsq and expiringdict.
Moved mock and nose from install_requires to tests_require.
"Additional post processing checks to ensure mailbox is valid."
parts = address.split('@')
- # check if local part is less than 256 octets, the actual
- # limit is 64 octets but we quadruple the size here because
+ # check if local part is less than 1024 octets, the actual
+ # limit is 64 octets but we allow 16x that size here because
# unsubscribe links are frequently longer
lpart = parts[0]
- if len(lpart) > 256:
+ if len(lpart) > 1024:
return False
# check if the domain is less than 255 octets
-MAX_ADDRESS_LENGTH = 512
+MAX_ADDRESS_LENGTH = 1280
MAX_ADDRESS_NUMBER = 1024
MAX_ADDRESS_LIST_LENGTH = MAX_ADDRESS_LENGTH * MAX_ADDRESS_NUMBER
setup(name='flanker',
- version='0.4.14',
+ version='0.4.15',
description='Mailgun Parsing Tools',
long_description=open('README.rst').read(),
classifiers=[],
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=True,
+ tests_require=[
+ 'nose',
+ 'mock'
+ ],
install_requires=[
'chardet>=1.0.1',
- 'dnsq>=1.1',
- 'expiringdict>=1.1',
- 'mock>=1.0.1',
- 'nose>=1.2.1',
+ 'dnsq>=1.1.3',
+ 'expiringdict>=1.1.2',
'Paste>=1.7.5',
'redis>=2.7.1',
# IMPORTANT! Newer regex versions are a lot slower for
# test length limits
run_mailbox_test(''.join(['a'*128, '@b']), ''.join(['a'*128, '@b']))
- run_mailbox_test(''.join(['a'*257, '@b']), None)
+ run_mailbox_test(''.join(['a'*1025, '@b']), None)
# because qtext and quoted-pair are longer than 64 bytes (limit on local-part)
# we use a sample in testing, every other for qtext and every fifth for quoted-pair
first.last@sub.do,com
first\@last@iana.org
first.last
-12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912@iana.org
+01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234@example.com
.first.last@iana.org
first.last.@iana.org
first..last@iana.org