Invitation problem [Seafile Pro 7.1.7]

We had the same issue which was caused by being rate limited by our SMTP relay server which leads to Seafile not being able to immediately and successfully send out the invitation e-mail. We worked around this by using a local postfix installation on each Seafile server to queue our mails until they can be delivered.

After this we discovered some more issues with guest invitations and e-mails which the Seafile Support Team is now investigating.

Unfortunately there is no logging for SMTP errors out of the box since the error never seems to be raised properly. If you want to gain more insight you could adapt the following file, restart seahub and check seahub.log afterwards. The example diff is from Seafile Pro 7.1.6:

seahub/thirdpart/django/core/mail/backends/smtp.py

7,8d6
< import logging
< 
15d12
< logger = logging.getLogger(__name__)
76,77c73
<         except (smtplib.SMTPException, socket.error) as e:
<             logger.error('SMTPLib Error open(): %s', e)
---
>         except (smtplib.SMTPException, socket.error):
93,94c89
<             except smtplib.SMTPException as e:
<                 logger.error('SMTPLib Error close(): %s', e)
---
>             except smtplib.SMTPException:
113d107
<                 logger.error('SMTPLib Error send_messages(): Could not open connection')
134,135c128
<         except smtplib.SMTPException as e:
<             logger.error('SMTPLib Error _send(): %s', e)
---
>         except smtplib.SMTPException:

The error messages show redundant information (the function name) but might enable you to gain more insight into which kind of SMTP error actually occurs when trying to send an e-mail.

1 Like