thinkst / opencanary

Modular and decentralised honeypot
http://opencanary.org
BSD 3-Clause "New" or "Revised" License
2.27k stars 355 forks source link

not receiving mails please help #238

Closed gkakar08 closed 1 year ago

gkakar08 commented 1 year ago

not receiving emails alert on my Gmail account please help

steve-to-the-n commented 1 year ago

not sure how your gmail is setup, but if you have multi-factor auth on gmail, you need to make an App Password https://support.google.com/accounts/answer/185833?hl=en further below is the mail config. NOTE: don't forget the little comma ',' after the last curly brace...it was NOT in the example doc, and I had to figure it out from error messages...just like the SMB config example is wrong too and in the smb.conf you need to have samba-audit.log path like below [global] workgroup = WORKGROUP server string = NBDocs netbios name = SRV01 dns proxy = no log file = /var/log/samba-audit.log


 "SMTP": {
                        "class": "logging.handlers.SMTPHandler",
                        "mailhost": ["smtp.gmail.com", 587],
                        "fromaddr": "yourGmailName@gmail.com",
                        "toaddrs" : ["yourGmailName@gmail.com"],
                        "subject" : "OpenCanary Alert",
                        "credentials" : ["yourGmailName", "theCrazyAppPassword"],
                        "secure" : []
                          },
gkakar08 commented 1 year ago

not sure how your gmail is setup, but if you have multi-factor auth on gmail, you need to make an App Password https://support.google.com/accounts/answer/185833?hl=en further below is the mail config. NOTE: don't forget the little comma ',' after the last curly brace...it was NOT in the example doc, and I had to figure it out from error messages...just like the SMB config example is wrong too and in the smb.conf you need to have samba-audit.log path like below [global] workgroup = WORKGROUP server string = NBDocs netbios name = SRV01 dns proxy = no log file = /var/log/samba-audit.log

 "SMTP": {
                        "class": "logging.handlers.SMTPHandler",
                        "mailhost": ["smtp.gmail.com", 587],
                        "fromaddr": "yourGmailName@gmail.com",
                        "toaddrs" : ["yourGmailName@gmail.com"],
                        "subject" : "OpenCanary Alert",
                        "credentials" : ["yourGmailName", "theCrazyAppPassword"],
                        "secure" : []
                          },

hey tysm for the reply really appreciated the credentials should be for the "from" gmail address or "to" gmail address ?

gkakar08 commented 1 year ago

not sure how your gmail is setup, but if you have multi-factor auth on gmail, you need to make an App Password https://support.google.com/accounts/answer/185833?hl=en further below is the mail config. NOTE: don't forget the little comma ',' after the last curly brace...it was NOT in the example doc, and I had to figure it out from error messages...just like the SMB config example is wrong too and in the smb.conf you need to have samba-audit.log path like below [global] workgroup = WORKGROUP server string = NBDocs netbios name = SRV01 dns proxy = no log file = /var/log/samba-audit.log

 "SMTP": {
                        "class": "logging.handlers.SMTPHandler",
                        "mailhost": ["smtp.gmail.com", 587],
                        "fromaddr": "yourGmailName@gmail.com",
                        "toaddrs" : ["yourGmailName@gmail.com"],
                        "subject" : "OpenCanary Alert",
                        "credentials" : ["yourGmailName", "theCrazyAppPassword"],
                        "secure" : []
                          },

still not working :( do you mind connecting with me on instagram my ig is gautamkakar_ that might resolve the issue quickly thanks

jayjb commented 1 year ago

Hi @gkakar08,

The credentials for SMTP would be for the fromaddr address.

If you run Opencanary in dev mode: opencanaryd --dev. Hopefully if you trigger an alert now, you will see a message telling you what the issue is.

gkakar08 commented 1 year ago

Hi @gkakar08,

The credentials for SMTP would be for the fromaddr address.

If you run Opencanary in dev mode: opencanaryd --dev. Hopefully if you trigger an alert now, you will see a message telling you what the issue is.

error this is what it shows any idea what is this?

can someone help me please

jayjb commented 1 year ago

Hi @gkakar08,

Sorry for the delay in the response here (and thanks for sending through the screenshot with more information). It looks like you may have enabled a service on OpenCanary that is using a port that is already in use by some other service running on the machine.

Which services are you trying to use for OpenCanary? The check here would be to make sure that any services you enable for OpenCanary are going to use ports are that are currently unused. You should be able to check which ports are being used on your machine using something like netstat -pant. If you let me know which OS you are using we can try debug further?

jayjb commented 1 year ago

Closing this issue due to inactivity. Please feel free to reopen if you continue to have this issue.