Comments (11)
Hi,
my setup is something like this
ExecStart=/usr/bin/podman run --name get-mail \
--ip 192.168.88.xx \
-v /var/containers/zammad/data:/opt/zammad \
-e MAILGUN_API_KEY=xx \
localhost/get-mail
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
from zammad-get-mailgun.
Thanks for the quick reply,
I got a bit further by doing this,
cat docker-compose.override.yml
version: '2'
services:
zammad-nginx:
ports:
- "5002:80"
zammad-getmail:
image: get-mail
ports:
- "5003:1337"
environment:
- MAILGUN_API_KEY=MYMAILGUN_KEY
volumes:
- zammad-data:/opt/zammad
Now the following error happens,
new message
token ok
----------------------------------------
Exception happened during processing of request from ('172.21.0.1', 40416)
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'
----------------------------------------
bundler: failed to load command: rails (/usr/local/bundle/bin/rails)
Bundler::GemNotFound: Could not find rake-12.3.2 in any of the sources
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:91:in `block in materialize'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/definition.rb:171:in `specs'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/definition.rb:238:in `specs_for'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/definition.rb:227:in `requested_specs'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:108:in `block in definition_method'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:20:in `setup'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler.rb:107:in `setup'
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.16.6/lib/bundler/setup.rb:20:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
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?
I'd like to see if I can get this working without using podman
from zammad-get-mailgun.
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 :)
from zammad-get-mailgun.
If I try to enter "zammad-nginx" and run "bundle" inside /opt/zammad it runs fine.
However, if I run the same thing inside "zammad-getmail" it instead tries to download bundles but fails.
Did I miss adding some volumes to getmail?
from zammad-get-mailgun.
Keep trying till you get "bundle exec rails" running from there :)
Will do thanks!
from zammad-get-mailgun.
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.
from zammad-get-mailgun.
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
from zammad-get-mailgun.
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'
from zammad-get-mailgun.
from zammad-get-mailgun.
Did you get it to run? :)
from zammad-get-mailgun.
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.
However, I never got it to run in its own container. So I ended up fetching email via IMAP instead.
Maybe I will try to get "get-mail" working again again in the future ;)
Thanks
from zammad-get-mailgun.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zammad-get-mailgun.