|
| 1 | +--- |
| 2 | +title: Configure DNS for Intake Email |
| 3 | +sidebarTitle: DNS for Intake Email |
| 4 | +description: Configure DNS records to enable automatic conversion of incoming emails into work items in your project's Intake section. |
| 5 | +--- |
| 6 | + |
| 7 | +This guide explains how to configure DNS settings to enable the [Intake Email](https://docs.plane.so/intake/intake-email) feature for your self-hosted Plane instance. These configurations enable your server to accept messages sent to your project's dedicated Intake address, which are then converted into work items in your project's Intake section. |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +Ensure that the Plane server allows outbound traffic on the following email-related ports: 25, 465, and 587. |
| 12 | + |
| 13 | +If any of these ports are currently in use, you can free them by running: |
| 14 | + |
| 15 | + ```bash |
| 16 | + fuser -k 25/tcp 465/tcp 587/tcp |
| 17 | + ``` |
| 18 | + |
| 19 | +This is necessary for email functionality (e.g., sending invites, notifications) to work properly. |
| 20 | + |
| 21 | +## Generate SSL/TLS Certificate for Email Domain |
| 22 | +<Warning> |
| 23 | +For Docker Compose deployments only |
| 24 | +</Warning> |
| 25 | +Before configuring DNS records for Intake Email, secure your email domain with an SSL/TLS certificate. This ensures encrypted communication between mail servers and improves email trust and deliverability. |
| 26 | + |
| 27 | +1. **Install Certbot** |
| 28 | +Update your system and install Certbot. |
| 29 | + ```bash |
| 30 | + sudo apt update && sudo apt install certbot |
| 31 | + ``` |
| 32 | + For NGINX: |
| 33 | + ```bash |
| 34 | + sudo apt install python3-certbot-nginx |
| 35 | + ``` |
| 36 | + For Apache: |
| 37 | + ```bash |
| 38 | + sudo apt install python3-certbot-apache |
| 39 | + ``` |
| 40 | + |
| 41 | +2. **Generate SSL Certificate** |
| 42 | +Choose the method that matches your web server setup: |
| 43 | + |
| 44 | + For NGINX: |
| 45 | + ```bash |
| 46 | + sudo certbot --nginx -d <mail-domain> |
| 47 | + ``` |
| 48 | + |
| 49 | + For Apache: |
| 50 | + ```bash |
| 51 | + sudo certbot --apache -d <mail-domain> |
| 52 | + ``` |
| 53 | + |
| 54 | + For standalone (no web server): |
| 55 | + ```bash |
| 56 | + sudo certbot certonly --standalone -d <mail-domain> |
| 57 | + ``` |
| 58 | + |
| 59 | +3. **Copy Certificate Files** |
| 60 | +Copy the generated certificate files to Plane's expected directory: |
| 61 | + |
| 62 | + ```bash |
| 63 | + sudo cp /etc/letsencrypt/live/<mail-domain>/fullchain.pem /opt/plane/data/email/tls/cert.pem |
| 64 | + sudo cp /etc/letsencrypt/live/<mail-domain>/privkey.pem /opt/plane/data/email/tls/key.pem |
| 65 | + ``` |
| 66 | + |
| 67 | +4. **Configure Environment Variables** |
| 68 | +Add the following settings to your plane.env file: |
| 69 | + |
| 70 | + ```bash |
| 71 | + # If using SMTP_DOMAIN as FQDN (e.g., intake.example.com), |
| 72 | + # generate a valid SSL certificate and set these paths accordingly. |
| 73 | + SMTP_DOMAIN=intake.example.com |
| 74 | + TLS_CERT_PATH=tls/cert.pem |
| 75 | + TLS_PRIV_KEY_PATH=tls/key.pem |
| 76 | + INTAKE_EMAIL_DOMAIN=intake.example.com |
| 77 | + ``` |
| 78 | + |
| 79 | + <Warning> |
| 80 | + Important: `SMTP_DOMAIN` and `INTAKE_EMAIL_DOMAIN` must be identical. |
| 81 | + </Warning> |
| 82 | + |
| 83 | + |
| 84 | +## Configure DNS records |
| 85 | + |
| 86 | +1. **Create an A Record** |
| 87 | +This record points to the server running your email service. |
| 88 | + |
| 89 | + ```bash |
| 90 | + Type: A |
| 91 | + Host: <host-domain> # Example: plane.example.com |
| 92 | + Value: <public-ip-address> # Your server's public IP address |
| 93 | + TTL: Auto | 3600 |
| 94 | + ``` |
| 95 | + |
| 96 | + <Tip> |
| 97 | + You can alternatively use a CNAME record if you're using a cloud load balancer. |
| 98 | + </Tip> |
| 99 | + |
| 100 | +2. **Add an MX Record** |
| 101 | +This record directs email traffic to your mail server. |
| 102 | + ```bash |
| 103 | + Type: MX |
| 104 | + Host: <mail-domain> # Example: intake.example.com |
| 105 | + Value: <host-domain> # Same as your A record host |
| 106 | + Priority: 10 |
| 107 | + TTL: Auto | 3600 |
| 108 | + ``` |
| 109 | + |
| 110 | +3. **Configure an SPF Record** |
| 111 | +This record helps prevent email spoofing. |
| 112 | + |
| 113 | + ```bash |
| 114 | + Type: TXT |
| 115 | + Host: <mail-domain> # Example: intake.example.com |
| 116 | + Value: "v=spf1 ip4:<A-record-ip-host-domain> -all" |
| 117 | + TTL: Auto | 3600 |
| 118 | + ``` |
| 119 | +4. **Set Up a DMARC record** |
| 120 | +This record specifies how receiving mail servers should handle authentication failures. |
| 121 | + |
| 122 | + ```bash |
| 123 | + Type: TXT |
| 124 | + Host: _dmarc.<mail-domain> # Example: _dmarc.intake.example.com |
| 125 | + Value: "v=DMARC1; p=reject; rua=mailto:<valid-email-addr>" |
| 126 | + TTL: Auto | 3600 |
| 127 | + ``` |
| 128 | +## Verify your configuration |
| 129 | +After setting up your DNS records, verify that they're correctly configured: |
| 130 | + |
| 131 | + ```bash |
| 132 | + # Verify A record |
| 133 | + dig A <mail-domain> |
| 134 | + |
| 135 | + # Verify MX record |
| 136 | + dig MX <mail-domain> |
| 137 | + |
| 138 | + # Verify SPF record |
| 139 | + dig TXT <mail-domain> |
| 140 | + |
| 141 | + # Verify DMARC record |
| 142 | + dig TXT _dmarc.<mail-domain> |
| 143 | + ``` |
| 144 | + |
| 145 | + You can also use [MXToolbox](https://mxtoolbox.com) to check for any issues with your DNS configuration. |
| 146 | + |
| 147 | +## Test your mail server |
| 148 | +Once your DNS records have propagated, test your SMTP connections: |
| 149 | + |
| 150 | + ```bash |
| 151 | + # Test SMTP connection on standard ports |
| 152 | + telnet <host-domain> 25 |
| 153 | + telnet <host-domain> 465 |
| 154 | + telnet <host-domain> 587 |
| 155 | + ``` |
| 156 | + |
| 157 | +## Troubleshooting |
| 158 | + |
| 159 | +- MX Record issues |
| 160 | + |
| 161 | + - Ensure there's a proper dot at the end of the domain. |
| 162 | + - Check that the priority number is correct (lower = higher priority). |
| 163 | + - Allow 24-48 hours for DNS changes to fully propagate. |
| 164 | + |
| 165 | +- A Record issues |
| 166 | + |
| 167 | + - Verify that the IP address is correct. |
| 168 | + - Ensure your mail subdomain matches the MX record. |
| 169 | + |
| 170 | +## See also |
| 171 | + |
| 172 | +[Intake Email](https://docs.plane.so/intake/intake-email) |
0 commit comments