{"id":20772695,"url":"https://github.com/byteflux/mta-sts","last_synced_at":"2025-06-20T05:34:58.985Z","repository":{"id":83902828,"uuid":"418300636","full_name":"Byteflux/mta-sts","owner":"Byteflux","description":"A simple PHP script for generating a MTA-STS policy file.","archived":false,"fork":false,"pushed_at":"2021-10-18T01:37:38.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T20:46:10.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Byteflux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-18T01:18:40.000Z","updated_at":"2021-10-18T01:37:41.000Z","dependencies_parsed_at":"2023-04-28T10:33:24.665Z","dependency_job_id":null,"html_url":"https://github.com/Byteflux/mta-sts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Byteflux/mta-sts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byteflux%2Fmta-sts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byteflux%2Fmta-sts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byteflux%2Fmta-sts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byteflux%2Fmta-sts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Byteflux","download_url":"https://codeload.github.com/Byteflux/mta-sts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Byteflux%2Fmta-sts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260889963,"owners_count":23077857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T12:22:37.989Z","updated_at":"2025-06-20T05:34:53.960Z","avatar_url":"https://github.com/Byteflux.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mta-sts.php\n\nA simple PHP script for generating a MTA-STS policy file.\n\nThe main purpose of this project is to build and deploy a policy file on [Cloudflare Pages](https://pages.cloudflare.com/).\n\n## Configuration\n\nThe policy file is configured using environment variables.\n\nEnvironment Variable | Description | Example\n-------------------- | ----------- | -------\n`POLICY_MODE` | The policy enforcement mode. Valid values are: `testing`, `enforce` or `none` | `testing`\n`POLICY_MX` | List of MX hostnames separated by `,`, `:`, `;` or line feed | `mx1.example.com,mx2.example.com`\n`POLICY_MAX_AGE` | The duration in seconds that the policy should be cached by senders. Should be `\u003e= 86400` and `\u003c= 31557600` | `86400`\n\n## Generating the policy file\n\nOnce the environment variables have been configured, the policy file is ready to be generated.\n\nRun the `mta-sts.php` script to generate a new policy file:\n\n```console\n$ export POLICY_MODE=testing\n$ export POLICY_MX=mx1.example.com,mx2.example.com\n$ export POLICY_MAX_AGE=86400\n$ php mta-sts.php\nWriting policy file...\n\n    version: STSv1\n    mode: testing\n    mx: mx1.example.com\n    mx: mx2.example.com\n    max_age: 86400\n\nPolicy file generated at dist/.well-known/mta-sts.txt\n\nRemember to update the policy ID in your '_mta-sts' TXT records.\nExample record using the current date and time:\n\n    v=STSv1; id=20211018010409\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteflux%2Fmta-sts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteflux%2Fmta-sts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteflux%2Fmta-sts/lists"}