Better install documentation #1
Comments
Hi, my setup is something like this
What's happening there is you're sharing the entire zammad folder into this image and then mails get piped in by running the bundle command from that folder in https://github.com/TomHetmer/get-mail/blob/master/server.py#L45 |
Thanks for the quick reply, I got a bit further by doing this,
Now the following error happens,
Doesn't seem like it likes it when I run https://github.com/TomHetmer/get-mail/blob/master/server.py#L45 from inside the get-email docker. Any idea? |
It's nothing to do with podman, for some reason your rails isn't working the same way. I don't remember if I had to do 'bundle install' or something like that. It was a lot of experimenting when I was writing the script. Maybe https://stackoverflow.com/questions/23801899/bundlergemnotfound-could-not-find-rake-10-3-2-in-any-of-the-sources can help? If you run it from zammad console to try to fix the dependency issues with rake. Keep trying till you get "bundle exec rails" running from there :) |
If I try to enter "zammad-nginx" and run "bundle" inside /opt/zammad it runs fine. |
Will do thanks! |
Strange. Especially since my script is not much different from https://github.com/mraerino/zammad-smtp-receiver that uses the same method and it says it works with docker-compose. Here "bundle" from get-mail gives me
and there's no other volumes mounted. |
What if you removed "bundle exec" and ran rails directly? Like here mraerino/zammad-smtp-receiver@2e55401#diff-168726dbe96b3ce427e7fedce31bb0bcL30 either with just rails or bin/rails |
ok, so I tried something different this time.
Still doesnt work, unsure what this is,
|
Aah. I think you need to use a special URL for the endpoint. Mailgun uses
JSON but we want raw data.
- Raw MIME: message is posted as-is. In this case you are responsible
for parsing MIME. To receive raw MIME messages, the destination URL must
end with mime.
čt 18. 4. 2019 v 1:35 odesílatel barhom <notifications@github.com> napsal:
Strange. Especially since my script is not much different from
https://github.com/mraerino/zammad-smtp-receiver that uses the same
method and it says it works with docker-compose.
Here "bundle" from get-mail gives me
Bundle complete! 93 Gemfile dependencies, 139 gems now installed.
Gems in the groups test, development and mysql were not installed.
Bundled gems are installed into /usr/local/bundle
and there's no other volumes mounted.
Are you running the latest do zammad-docker-compose?
ok, so I tried something different this time.
I added server.py inside the container that does work with "bundle".
python3 server.py
Starting get-mail...
new message
token ok
----------------------------------------
Exception happened during processing of request from ('172.21.0.1', 51050)
Traceback (most recent call last):
File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
self.handle()
File "/usr/lib/python3.5/http/server.py", line 422, in handle
self.handle_one_request()
File "/usr/lib/python3.5/http/server.py", line 410, in handle_one_request
method()
File "server.py", line 48, in do_POST
pipe.write(message.encode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'encode'
----------------------------------------
I, [2019-04-17T23:34:00.318367 #679-46965672136540] INFO -- : Setting.set('product_logo', "c6ade61974c60e27bb42bd2fc238bc2a.png")
I, [2019-04-17T23:34:02.662115 #679-46965672136540] INFO -- : read main from STDIN
Still doesnt work, unsure what this is,
AttributeError: 'NoneType' object has no attribute 'encode'
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABIR5GTRKEVQ47PLK4TLV3TPQ6X35ANCNFSM4HGYB22A>
.
--
Best
Tom Hetmer
|
Did you get it to run? :) |
I did actually! Thanks. I was able to get it to run by adding ".mime" to mailgun POST url. Maybe I will try to get "get-mail" working again again in the future ;) Thanks |
I'm assuming this is supposed to be run as a separate docker from zammad.
Its running now and I can see that emails are arriving from mailgun.
But since it is a different docker how do I make sure it goes to the correct folder/installation of zammad?
Maybe you can share your docker-compose.yml?
The text was updated successfully, but these errors were encountered: