Skip to content
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

[Bug] Postfix not working with debian-master #323

Open
ciscoqid opened this issue Dec 20, 2021 · 3 comments
Open

[Bug] Postfix not working with debian-master #323

ciscoqid opened this issue Dec 20, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ciscoqid
Copy link
Contributor

Describe the bug
Postfix is not working in debian-master image. After some troubleshooting, I found several issues and was finally able to manually get it working:

  • rsyslog is not operational (keeps postfix from starting)
  • postfix is running in a chroot environment with no access to resolv.conf (needs to be copied to /var/spool/postfix/etc/)
  • (not sure on this one) relayhost is generated without surrounding square brackets, so postfix tries to resolve as an MX not A record (this may be more of an input change, though before it worked with just a hostname)

To Reproduce
Steps to reproduce the behavior:
On a fresh image, run supervisorctl start postfix (or postfix start) and observe daemon will not startup properly.
After applying initial workaround (adding and starting rsyslog), mailq shows messages stuck due to resolution failure.

Expected behavior
Postfix should start and successfully deliver email via the relay specified in the environment.

Screenshots
If applicable, add screenshots to help explain your problem.

Host Device:

  • OS: Rocky Linux
  • Version: 8.5

Image in use:

  • Self build? No
  • Output from docker image inspect <image> :
    [
    {
    "Id": "sha256:9ee5cb8c19772dc468949ea99aa5639c1f5db0fc0af53cec79ea9a1d6716b5ec",
    "RepoTags": [
    "securecompliance/gvm:debian-master"
    ],
    "RepoDigests": [
    "securecompliance/gvm@sha256:9ef1dee40bcc58fd07ba292ee7ce0d28796183689a61927881144d89dc1f6c78"
    ],
    "Parent": "",
    "Comment": "buildkit.dockerfile.v0",
    "Created": "2021-11-27T06:41:42.425053245Z",
    "Container": "",
    "ContainerConfig": {
    "Hostname": "",
    "Domainname": "",
    "User": "",
    "AttachStdin": false,
    "AttachStdout": false,
    "AttachStderr": false,
    "Tty": false,
    "OpenStdin": false,
    "StdinOnce": false,
    "Env": null,
    "Cmd": null,
    "Image": "",
    "Volumes": null,
    "WorkingDir": "",
    "Entrypoint": null,
    "OnBuild": null,
    "Labels": null
    },
    "DockerVersion": "",
    "Author": "",
    "Config": {
    "Hostname": "",
    "Domainname": "",
    "User": "",
    "AttachStdin": false,
    "AttachStdout": false,
    "AttachStderr": false,
    "Tty": false,
    "OpenStdin": false,
    "StdinOnce": false,
    "Env": [
    "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
    "DEBIAN_FRONTEND=noninteractive",
    "LANG=en_US.UTF-8",
    "gvm_libs_version=21.4.3",
    "openvas_scanner_version=21.4.3",
    "pggvm_version=da7bef426089e63da80fe85b723ce01714810871",
    "gvmd_version=21.4.4",
    "gsa_version=21.4.3",
    "gvm_tools_version=21.6.1",
    "openvas_smb_version=21.4.0",
    "open_scanner_protocol_daemon=21.4.4",
    "ospd_openvas=21.4.3",
    "python_gvm_version=21.10.0",
    "SYSTEM_DIST=debian",
    "SUPVISD=supervisorctl",
    "USERNAME=admin",
    "PASSWORD=adminpassword",
    "PASSWORD_FILE=none",
    "TIMEOUT=15",
    "DEBUG=N",
    "RELAYHOST=smtp",
    "SMTPPORT=25",
    "AUTO_SYNC=true",
    "HTTPS=true",
    "CERTIFICATE=none",
    "CERTIFICATE_KEY=none",
    "TZ=Etc/UTC",
    "SSHD=false",
    "DB_PASSWORD=none",
    "DB_PASSWORD_FILE=none",
    "LANGUAGE=en_US.UTF-8",
    "LC_ALL=en_US.UTF-8",
    "SETUP=0",
    "OPT_PDF=0"
    ],
    "Cmd": [
    "/usr/bin/supervisord",
    "-n",
    "-c",
    "/etc/supervisord.conf"
    ],
    "ArgsEscaped": true,
    "Image": "",
    "Volumes": {
    "/etc/ssh": {},
    "/opt/database": {},
    "/var/lib/gvm": {},
    "/var/lib/openvas/plugins": {}
    },
    "WorkingDir": "",
    "Entrypoint": [
    "/opt/setup/scripts/entrypoint.sh"
    ],
    "OnBuild": null,
    "Labels": {
    "org.opencontainers.image.created": "2021-11-27T06:29:16.112Z",
    "org.opencontainers.image.description": "Greenbone Vulnerability Management Docker Image with OpenVAS",
    "org.opencontainers.image.licenses": "MIT",
    "org.opencontainers.image.revision": "38ecf9c8d67716c3e4229350741f85bc22dfdad8",
    "org.opencontainers.image.source": "https://github.com/Secure-Compliance-Solutions-LLC/GVM-Docker",
    "org.opencontainers.image.title": "GVM-Docker",
    "org.opencontainers.image.url": "https://github.com/Secure-Compliance-Solutions-LLC/GVM-Docker",
    "org.opencontainers.image.version": "debian-master"
    }
    },
    "Architecture": "amd64",
    "Os": "linux",
    "Size": 990546238,
    "VirtualSize": 990546238,
    "GraphDriver": {
    "Data": {
    "LowerDir": "/var/lib/docker/overlay2/102eac632ac6f93be99a4dd5046747201da5130327b3718730d67854a57e843f/diff:/var/lib/docker/overlay2/0a249342220232ec9b4a87364c0ee6d99ab02fe7d0720a4fb5ae3f7eb2e16c2e/diff:/var/lib/docker/overlay2/12e8410c9d18d842affce67cdc0e9723e9110ed743f7a9bc3600b35666849a37/diff:/var/lib/docker/overlay2/ca7b7137cb8f29fb0325368355bb1fdbf935504d6ce979bd3c9629521ce4ccf3/diff:/var/lib/docker/overlay2/1c847bf7172eaf6a9960208653eec039a3b4090512cb6df1d0254c70d4662c47/diff",
    "MergedDir": "/var/lib/docker/overlay2/f1cd5f15ea5dad7b6f54d6337ca47eadfa9e10a01ad4fb63bfa399e987fd4043/merged",
    "UpperDir": "/var/lib/docker/overlay2/f1cd5f15ea5dad7b6f54d6337ca47eadfa9e10a01ad4fb63bfa399e987fd4043/diff",
    "WorkDir": "/var/lib/docker/overlay2/f1cd5f15ea5dad7b6f54d6337ca47eadfa9e10a01ad4fb63bfa399e987fd4043/work"
    },
    "Name": "overlay2"
    },
    "RootFS": {
    "Type": "layers",
    "Layers": [
    "sha256:77b323d4ec74aad770337f99a60e862a64ccc53f4775b5f4945df0e606f78b90",
    "sha256:c32c3a64907fac6928fb5c42a707e3695320cf7fff171b75c6ae32bfafff93f1",
    "sha256:3acc47a057714290becffc5faa7c12aa560773ec2efe830236605403373899df",
    "sha256:9f97dbca8154378c249eb23129920ebb24bc33bf1e0fe9d3abc7224d22fced2e",
    "sha256:47116152985cd37d90ad0be450087a2225ba4135dfb4380e9c3d10cf8179a038",
    "sha256:3cbdfd927df990785abf0affe856dbbed8200b8d3d72ac3d04b7e510223b9f2e"
    ]
    },
    "Metadata": {
    "LastTagTime": "0001-01-01T00:00:00Z"
    }
    }
    ]
@ciscoqid ciscoqid added the bug Something isn't working label Dec 20, 2021
@ciscoqid ciscoqid changed the title [Bug] [Bug] Postfix not working with debian-master Dec 29, 2021
@markdesilva
Copy link

Hi All and Happy 2022!

Just want to ask the devs if the documentation and OpenVAS Scanner containers are going to be updated anytime soon and if it is going to be planned to have PGSQL at v13 (instead of currently moving back to v11)?

Hoping to upgrade gvm and scanners all in one go, but I'm not sure if the scanners have been updated cos the documentation is still the previous.

Thank you.

@markdesilva
Copy link

markdesilva commented Jan 4, 2022

Postfix is not working in debian-master image.

I ususally get rid of postfix and just apt install sendmail as I've been having issues with the postfix on the container even from before.

As long as you add the container hostname to the /etc/hosts file

ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
<docker container ip>      <docker container hostname> <docker container hostname>.localdomain

sendmail works straight away.

@Dexus
Copy link
Contributor

Dexus commented Mar 14, 2022

You can now use the https://hub.docker.com/r/deineagenturug/gvm images, which are using the latest gvmd and components releases.

It use POSTGRESQL 13.

What are meaning the tags:

docker pull deineagenturug/gvm:latest               # is an not initialized basic image, that first start its initialization on the first start (short: no db & no PDF report support)
docker pull deineagenturug/gvm:latest-full          # is an not initialized basic image, that first start its initialization on the first start (short: no db, PDF report is support)
docker pull deineagenturug/gvm:latest-data          # is an initialized basic image, that can run directly without extra VOLUMES added (short: included db, but no PDF report support)
docker pull deineagenturug/gvm:latest-data-full     # is an initialized basic image, that can run directly without extra VOLUMES added (short: included db & PDF report is support)

It can be used as direct replacement for the here provided image, with the same arguments on docker run.


I can't see any problems with the Postfix, but maybe I have a different setup process, need to check this. But I think the @markdesilva option will work also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants