My requirement is to create a docker container for email server, the main task of email container is to send an email with an attachment.
I’ve created a container , in that installed postfix, but unable to start the postfix service, getting the following error, please help me to fix this issue.
224a09c3e2e6 built on rockylinux 9 version and the rhel8 is the base machine
[root@test1 docker-project]# docker exec -it 224a09c3e2e6 /bin/bash
bash-4.4# systemctl status postfix
System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
Thank you in advance.
Have you looked into containerized full self-hosted mail services like mailu, iredmail and postal?
I’ve installed postfix using Dockerfile
RUN yum install postfix -y
Post that unable to start the postfix service
Well, error says postfix needs
Systemd is now included in the rockylinux/rockylinux:latest base containers, but it is not active by default.
You can’t install everything in containers that you would normally use on your host, so @bluepuma77 is right. You need to choose a mailserver optimized for containers.
Hi @bluepuma77 and @rimelek,
Thank you so much for you time and response.
Actually, I’m struggling to configure the mail agent on one of the AWX container.
I’ve installed AWX version 17 on one of RHEL8 server
Here, awx_task container is responsible to send a email notification when playbook started/success/failure.
But, in one of our requirement is that the playbook itself is having an requirement to send an email with an attachment, playbook is executed successfully but not received an email with an attachment, where all the tasks are performed by awx_task container
But, not getting how awx_task container is sending a email notification when playbook started/failed or success
I’m attaching the docker-compose.yml file for reference, please review and help me to fulfill the above requirement (to send an email with an attachment)
[root@lenltrain1d01 awxcompose]# cat docker-compose.yml
Thank you, Ramachandra
I edited your post. Please, next time format your post according to the following guide: How to format your forum posts
In short: please, use
</> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
Regarding your issue, the original problem was postfix not starting in a container which ws answered by @bluepuma77. How AWX work I think is a different issue and I’m not even sure that this is the best forum to ask about that just because it is running in a container. AWX 17.1.0 is a pretty old version by the way. Is that still supported? I guess you stil use it because latest versions require Kubernetes if I remember correctly.
Generally you would need log messages to see why certain features don’t work. I checked your compose file and all I can see is a variabale that I can’t find in the documentation of AWX and not even in the sourcecode:
Please, explain why you think it is Docker-related (besides what we already discussed about postfix and systemd) so we can focus on your real issue to help you.
You can also find some links about the Ansible community to find forums where you can ask about Ansible or AWX