-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HELP] can't make it work on docker-compose .. #14
Comments
Check that |
Thxs for the quick response. awesome.
this is my directory structure before running the container:
[image: image.png]
There is only 1 directory created called config.yml, but as far as I
understand, I should bind a directory locally to a container directory.
*is this case: * the directory /config.yml *inside of slacker folder* will
bind to */etc/slacker/config.yml* as stated on my docker-compose file:
[image: image.png]
Now, as I saw in the documentation, your app expects to have a config.yml
*file* instead of a directory... So, what's wrong with it?
should I map without config.yml declaration? (As follow)
volumes:
- ./*:*/etc/slacker
it means, in the host folder "slacker" bind the container folder
"/etc/slacker"
please help me and tryout from your side...
El vie, 1 sept 2023 a las 2:48, ont ***@***.***>) escribió:
… Check that ./config.yml path exists during startup. It very likely that
you mount inexistent path (or directory named config.yml) into docker
container.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BB7TLMRIBGUNTO6IW6LMH53XYFZJVANCNFSM6AAAAAA4G6BWKM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*Walter Altimora*
✉ ***@***.***
|
Finally, i did it work as follows: (and of course, config.yml has to be
copied to directory /config in host to make it works) - suggestion: update
github and include a docker-compose.yml for avoid further questions -
[image: image.png]
but, when I use my test mail sent from D'Link NAS box with those settings,
I've got tons of SSL errors... *see attached log...*
[image: image.png]
*even if i didn catchup the rules, the smtp process seems to be a mess...*
What are your recommendations for an email client *"clean and without any
SSL request"*, to verify at least messages are coming to the server on port
8025?
(i would like to test with proven email client instead of dlink box´s email)
El vie, 1 sept 2023 a las 9:43, Walter Altimora ***@***.***>)
escribió:
… Thxs for the quick response. awesome.
this is my directory structure before running the container:
[image: image.png]
There is only 1 directory created called config.yml, but as far as I
understand, I should bind a directory locally to a container directory.
*is this case: * the directory /config.yml *inside of slacker folder*
will bind to */etc/slacker/config.yml* as stated on my docker-compose
file:
[image: image.png]
Now, as I saw in the documentation, your app expects to have a config.yml
*file* instead of a directory... So, what's wrong with it?
should I map without config.yml declaration? (As follow)
volumes:
- ./*:*/etc/slacker
it means, in the host folder "slacker" bind the container folder
"/etc/slacker"
please help me and tryout from your side...
El vie, 1 sept 2023 a las 2:48, ont ***@***.***>) escribió:
> Check that ./config.yml path exists during startup. It very likely that
> you mount inexistent path (or directory named config.yml) into docker
> container.
>
> —
> Reply to this email directly, view it on GitHub
> <#14 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BB7TLMRIBGUNTO6IW6LMH53XYFZJVANCNFSM6AAAAAA4G6BWKM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
*Walter Altimora*
✉ ***@***.***
--
*Walter Altimora*
✉ ***@***.***
/usr/src/app/handler.py:19: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.config = yaml.load(open(config))
ERROR:mail.log:SMTP session exception
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/local/lib/python3.6/ssl.py", line 814, in __init__
self.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 621, in urlopen
raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/src/aiosmtpd/aiosmtpd/smtp.py", line 315, in _handle_client
await method(arg)
File "/usr/src/app/src/aiosmtpd/aiosmtpd/smtp.py", line 688, in smtp_DATA
status = await self._call_handler_hook('DATA')
File "/usr/src/app/src/aiosmtpd/aiosmtpd/smtp.py", line 122, in _call_handler_hook
status = await hook(self, self.session, self.envelope, *args)
File "/usr/src/app/src/aiosmtpd/aiosmtpd/handlers.py", line 156, in handle_DATA
self.handle_message(envelope)
File "/usr/src/app/handler.py", line 28, in handle_message
self.send_to_slack(self.extract_text(message), **options)
File "/usr/src/app/handler.py", line 75, in send_to_slack
icon_url=options['icon_url']
File "/usr/local/lib/python3.6/site-packages/slack/chat.py", line 49, in post_message
return slack.http_client.post('chat.postMessage', data)
File "/usr/local/lib/python3.6/site-packages/slack/http_client.py", line 41, in post
response = requests.post(url, data=data, verify=True)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 110, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 497, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)
|
Please update docker image with You always can connect with
Then enter this commands (server will respond on each command with
Note that pressing Full log of communication with server will be look like:
|
done. all looks pretty good from netcat:
[image: image.png]
but..... *no logs *from your app, even if debug enabled, and of course, no
message to slack has been sent...
[image: image.png]
[image: image.png]
and last but not least:, env info from portainer:
[image: image.png]
Any suggestions?
(attached my config.yml file to take a look)
Again, your help is so much appreciated!
B.R.
El vie, 1 sept 2023 a las 12:16, ont ***@***.***>) escribió:
… Please update image with docker pull ontrif/slacker then do tests again.
You always can connect with netcat, nc, ncat or similar tool to the 8025
port and do simple commands.
Connect with:
ncat --crlf localhost 8025
Then enter this commands (server will respond on each command with 250 OK
or similar:
HELO test.com
mail from: ***@***.***
rcpt to: ***@***.***
data
This is test email.
.
Note that pressing <enter> and . and then <enter> is important. Such
sequence will indicate end of data.
Full log of communication with server will be look like:
220 51d7d120dea8 Python SMTP 1.4.4.post2
HELO test.com
250 51d7d120dea8
mail from: ***@***.***
250 OK
rcpt to: ***@***.***
250 OK
data
354 End data with <CR><LF>.<CR><LF>
This is test email.
.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BB7TLMUDULWKGRTR2MNS26TXYH36FANCNFSM6AAAAAA4G6BWKM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*Walter Altimora*
✉ ***@***.***
|
@walteroa2023 I can't see any logs from you, only |
with this binding in compose:
from netcat commands:
from console log: docker compose up --force-recreate && docker compose logs -f [+] Running 1/1 |
If I change the bind in docker-compose to:
no errors at all, but , no logs, no debug info neither any slack message... config.yml:
|
@walteroa2023 first of all test that you image is latest:
Digest of image must be Then test it with this command:
Content of
After sending your commands to port 8025. I was able to see response from my service:
Response from my service in another console:
And message was successfully sent to slack.
|
Still not working... tested with this command: after running the ncat (in my case in the alpine environment: i can see this answer: 220 4d645d674471 Python SMTP 1.4.4.post2 So, first questions are:
(sorry for my questions, but i guess we are much closer to the end...) |
Hi @ont still not working.
B.R. |
@walteroa2023 sorry for late response.
|
Hi @ont
I think i have an issue in bind the directories... (below, docker-compose file)
version: '3.3'
services:
slacker:
container_name: slacker
volumes:
- ./config.yml:/etc/slacker/config.yml
ports:
- '8025:8025'
restart: unless-stopped
image: ontrif/slacker:latest
below: real syntax:
error appears in logs:
[+] Running 1/1
✔ Container slacker Recreated 1.3s
Attaching to slacker
slacker | /etc/slacker/config.yml
slacker | Traceback (most recent call last):
slacker | File "/usr/local/bin/aiosmtpd", line 11, in
slacker | load_entry_point('aiosmtpd', 'console_scripts', 'aiosmtpd')()
slacker | File "/usr/src/app/src/aiosmtpd/aiosmtpd/main.py", line 107, in main
slacker | parser, args = parseargs(args=args)
slacker | File "/usr/src/app/src/aiosmtpd/aiosmtpd/main.py", line 86, in parseargs
slacker | args.handler = handler_class()
slacker | File "/usr/src/app/handler.py", line 19, in init
slacker | self.config = yaml.load(open(config))
slacker | IsADirectoryError: [Errno 21] Is a directory: '/etc/slacker/config.yml'
slacker exited with code 0
any clue?
The text was updated successfully, but these errors were encountered: