tempmail
tempmail copied to clipboard
Cannot receive mail for same username of different domains
After I sent a mail to my [email protected], and send another mail to [email protected], smtpd raise a sqlobject.dberrors.DuplicateEntryError
.
And the traceback:
2016-05-17 15:05:04-0400 [ESMTP,6,<myip>] Receiving message for delivery: from=<host> to=['[email protected]']
2016-05-17 15:05:22-0400 [ESMTP,7,<myip>] Receiving message for delivery: from=<host> to=['[email protected]']
2016-05-17 15:05:23-0400 [ESMTP,7,<myip>] Unhandled Error
Traceback (most recent call last):
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/log.py", line 88, i
n callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/log.py", line 73, i
n callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/context.py", line 1
18, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in doRead
return self._dataReceived(data)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/tcp.py", line 221, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/protocols/basic.py", line 464, in dataReceived
self.lineReceived(line)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/mail/smtp.py", line 566, in lineReceived
return getattr(self, 'state_' + self.mode)(line)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/mail/smtp.py", line 793, in dataLineReceived
m.eomReceived() for m in self.__messages
File "smtpd.py", line 73, in eomReceived
user = get_or_create_user(self.user.dest.local, domain)
File "/opt/tempmail/__init__.py", line 16, in get_or_create_user
user = models.User(name=name, domain=domain)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1226, in __init__
self._create(id, **kw)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1274, in _create
self._SO_finishCreate(id)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1298, in _SO_finishCreate
id, names, values)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 468, in queryInsertID
return self._runWithConnection(self._queryInsertID, soInstance, id, names, values)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 3
27, in _runWithConnection
val = meth(conn, *args)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/sqlite/sqliteconnection.py", line 238, in _queryInsertID
self._executeRetry(conn, c, q)
File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/sqlite/sqliteconnection.py", line 208, in _executeRetry
raise DuplicateEntryError(msg)
sqlobject.dberrors.DuplicateEntryError: column name is not unique
Any idea?
Follow the instruction in the readme. Beware that this app won't work with gunicorn(after all kinds of efforts). just use python -m app
to deploy the Flask app, and follow the rest as it said.😁
I worked in bare Python shell. Any IDE should be okay. Have you noticed any ImportError
in error message? Or would you post what PyCharm complain about?
PS: I didn't have any experience with IDE either...😅
Ahh, you should use python2, print statement doesn't have parentheses around.
Have you installed twistd through pip for python 2?
Notice that you have just installed python 2, and you may not added python2 and pip2 into your %PATH%.
Simply mail to the one in my github info :-p I'm on my holiday as well.. so i may not reply timely,, maybe just occationally look at my push notifications😅