I will try to get a grip on uid namespaces then...
2017-11-13 10:49 GMT+01:00 Abhilash Raj <maxking@asynchronous.in>:
On Nov 13 2017, at 1:34 am, Thor Atle Rustad <thor.rustad@gmail.com> wrote:
There is a way around it!
I have had two issues with the the maxking docker image. One is that the regexp is not working properly. I reported that, and it has been fixed in newer code. My other problem is that the docker image creates a user, mailman, that receives uid 103. Well, uid 103 on my system is already taken by systemd-bus-proxy (grep 103 /etc/passwd returns "systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/ false").
Containers usually run with uid namespace, so it doesn't really matter what uid is used outside of container.
Unless, you mount /etc/shadow from host in to the container, which isn't really needed for the images.
My solution includes downloading the corrected postfix.py, and replacing the Dockerfile. I put the postfix.py in <docker-mailman>/core/assets/.
My Dockerfile: FROM maxking/mailman-core
RUN grep mailman /etc/passwd && grep mailman /etc/group
&& deluser mailman
&& addgroup -S -g900 mailman
&& adduser -S -u900 mailman mailman
&& grep mailman /etc/passwd && grep mailman /etc/group COPY assets/postfix.py /usr/local/lib/python3.6/site- packages/mailman/mta/postfix.pyI then run docker build (with -t parameter, you must look up that yourself). I use a different name for my images, so I end up with (note, there are two tags per image): root@mailer:/home/mailman/docker/docker-mailman_mods/core# docker images REPOSITORY TAG IMAGE ID CREATED SIZE local/mailman_core_900 20171110_2 9649e84767e1 2 days ago 176MB local/mailman_core_900 latest 9649e84767e1 2 days ago 176MB local/mailman_web_900 20171110_2 07a9b3d7ddd6 2 days ago 247MB local/mailman_web_900 latest 07a9b3d7ddd6 2 days ago 247MB
I do the same with the web image, as I need to change the user there, too.
Then, in docker-compose.yaml, I change the line(s) referring to the image name(s):
services: mailman-core: image: local/mailman_core_900 container_name: mailman-core hostname: mailman-core
mailman-web: image: local/mailman_web_900 container_name: mailman-web hostname: mailman-web
I don't know if this is a good solution, but at least it fixes some serious issues with the 3.1's postfix integration that wouldn't otherwise be fixed until the 3.2 release. The bottom line is that it works for me, but it adds an additional layer of complication.
2017-11-03 19:40 GMT+01:00 Abhilash Raj <maxking@asynchronous.in>:
On Fri, Nov 3, 2017, at 08:29 AM, Fabian A. Santiago wrote:
October 26, 2017 11:07 PM, "Mark Sapiro" <mark@msapiro.net> wrote:
On October 26, 2017 7:30:35 PM PDT, "Fabian A. Santiago" < fsantiago@garbage-juice.com> wrote:
That was it. Perfect. I manually modified my regexp map and it works now. Excellent and Thank you. You're the man. Does mm3 ever refresh those maps or only as I add new domains / lists?
Only when you make changes to domains or lists.
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
Mark,
I've noticed that even simply restarting the mm3 components those alias maps get rewritten and the problem returns until I can manually edit it.
Yeah, that is true. Transport maps are re-generated everytime the container restarts.
I don't think think there is any way around this right now :(
-- Abhilash Raj maxking@asynchronous.in
Mailman-users mailing list mailman-users@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/