Catch Exception?
This should catch the exception... And log based on that (it won't but maybe I can see better where my error is).
This commit is contained in:
parent
66c37c2af6
commit
d451cc0920
|
@ -30,4 +30,5 @@ This is our current version trying to communicate between courier and mailman3.
|
||||||
* Logging host and port on same line.
|
* Logging host and port on same line.
|
||||||
* OK, parsing port number, and setting default.
|
* OK, parsing port number, and setting default.
|
||||||
* Logging error (I hope), when lmtp fails to be created.
|
* Logging error (I hope), when lmtp fails to be created.
|
||||||
* Maybe this is better?
|
* Maybe this is better?
|
||||||
|
* Catch exception, log based on that?
|
|
@ -65,7 +65,7 @@ try:
|
||||||
# 5xx error
|
# 5xx error
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
except:
|
except smtplib.SMTPException as e:
|
||||||
logger.error('lmtp error')
|
logger.error('lmtp error')
|
||||||
#logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror)
|
logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror)
|
||||||
exit(100)
|
exit(100)
|
Loading…
Reference in New Issue