crawlab-team / crawlab

Distributed web crawler admin platform for spiders management regardless of languages and frameworks. 分布式爬虫管理平台,支持任何语言和框架
https://www.crawlab.cn
BSD 3-Clause "New" or "Revised" License
11.38k stars 1.8k forks source link

crawlab does not send mail in k8s deployment #840

Closed sickcrow closed 1 year ago

sickcrow commented 4 years ago

Describe the bug crawlab does not send mail in k8s deployment

To Reproduce I configure config.yml and add the lines of my relay server

Expected behavior I configure the sending to my mail through the gui for when a task finishes send mail

Screenshots image Config map (config.yml in kubernetes) image

sorry for my english

tikazyq commented 4 years ago

Would you check your log if crawlab backend failed to send mails.

sickcrow commented 4 years ago

Would you check your log if crawlab backend failed to send mails.

image my relay is without authentication. authenticate by ip

tikazyq commented 4 years ago

I guess your SMTP server config in your system environment variables are not configured correctly. Please refer to https://docs.crawlab.cn/en/Config/ for more detail.

sickcrow commented 4 years ago

I guess your SMTP server config in your system environment variables are not configured correctly. Please refer to https://docs.crawlab.cn/en/Config/ for more detail.

thank you very much for your help setting it by variables, now I see this "error" image image

our mail server authenticates by ip, not by user (relay)

tikazyq commented 4 years ago

I think even if you don't authenticate by user, you still need to set it as an environment variable, otherwise Crawlab will complain it is empty.

sickcrow commented 4 years ago

I think even if you don't authenticate by user, you still need to set it as an environment variable, otherwise Crawlab will complain it is empty.

now the error is another image image I am not sure if I am filling in the variable correctly or why it is not taking it

tikazyq commented 4 years ago

Alright, I think the documentation has a typo here. It should be CRAWLAB_NOTIFICATION_MAIL_SENDERIDENTITY instead of CRAWLAB_NOTIFICATION_MAIL_SENDEREIDENTITY.

sickcrow commented 4 years ago

Alright, I think the documentation has a typo here. It should be CRAWLAB_NOTIFICATION_MAIL_SENDERIDENTITY instead of CRAWLAB_NOTIFICATION_MAIL_SENDEREIDENTITY.

Thanks. error now is: 2020/09/10 23:58:09 info process received signal: finish 2020/09/10 23:58:09 info [Worker 15] task (id:a2f0e389-22bc-41bf-8a31-eb334c5c4a04) finished. elapsed:537.708455 sec 2020/09/10 23:58:09 error unencrypted connection my smtp relay (mailserver) run on port 25 and is no user auth only client private ip thank you very much for your help. I hope it can be solved. It is the only thing that remains pending, everything else works wonderfully

tikazyq commented 4 years ago

I think "unencrypted connection" may indicate that smtp module won't allow plain-text communication. Instead, it requires some sort of encryption mechanisms such as HTTPS or authentication involved. I would suggest you consult with your mail server provider and ask for the guidance.

sickcrow commented 4 years ago

I think "unencrypted connection" may indicate that smtp module won't allow plain-text communication. Instead, it requires some sort of encryption mechanisms such as HTTPS or authentication involved. I would suggest you consult with your mail server provider and ask for the guidance.

As an example in rancher I configure my mailserver to port 25 and disable the TLS option. There is no option to do the same with some variable? The mail server is exchange and is used as a relay without authentication only by private ip thanks!

sickcrow commented 4 years ago

probably configure mailu on cluster k8s to test this. If you solve this problem please let me know thanks for your help