Skip to content

Add mailcow_relayhost resource#149

Open
j6s wants to merge 1 commit intol-with:mainfrom
j6s:feature/relayhost-resource
Open

Add mailcow_relayhost resource#149
j6s wants to merge 1 commit intol-with:mainfrom
j6s:feature/relayhost-resource

Conversation

@j6s
Copy link

@j6s j6s commented Feb 8, 2026

Adds a new mailcow_relayhost resource in order to manage relayhosts / sender dependent transport in mailcow.

resource mailcow_relayhost "test_relayhost" {
  hostname = "prod-mta-06.swg-srv.net:2525"
  username = "MY_SWEEGO_SMTP_USERNAME"
  password = "MY_SWEEGO_SMTP_PASSWORD"
}

I will create a second PR that allows setting a relayhost for domains and mailboxes, which is ultimately what I am after.

NOTE: I currently only have my production mailcow instance, so I did not feel entirely comfortable running the tests, which, as I understand, modify the state of my instance. I did, however, verify creating, updating and importing of the resource.

@l-with
Copy link
Owner

l-with commented Feb 8, 2026

Dear @j6s, thank you very much for your pull request. I like to inform you that the values for secrets I use for the tests in
.github/workflows/go.yml, e.g.
MAILCOW_HOST_NAME, MAILCOW_API_KEY,
are from the official mailcow test instance, as documented in the last line of the README.md.
The test seldom fail, when the mailcow test instance is not available.
You can also use this instance for testing.

@l-with l-with self-assigned this Feb 16, 2026
@l-with
Copy link
Owner

l-with commented Feb 16, 2026

The test cannot be executed because of build errors, please fix them and rund the test as described in the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants