계획됨WardPane 2.5에 계획되어 있습니다. 이 기능은 현재 릴리스에 없으며, 이 페이지는 의도된 동작 방식을 설명합니다. 로드맵
WardPane 2.5 will run mail for your domains on the same server: addresses like [email protected] that receive and send mail, with spam filtering. Gmail, Outlook and other providers accept that mail only if the domain has the DNS records listed below.
The Mail section
In the panel, open Mail. It has four parts.
- Mail domains: a domain has to be added here before it can have addresses.
- Mailboxes: accounts with a password that store mail on the server. You read and send mail from them in any mail client, such as Thunderbird, Outlook or the mail app on a phone.
- Aliases: addresses without a mailbox of their own that forward mail to one or more other addresses, for example
[email protected]to the mailboxes of two people. - Spam: filtering settings for incoming mail.
Each mail domain also needs the DNS records below.
DNS records for mail
Mail depends on DNS more than any other part of hosting. Without these records your messages land in spam or are refused. Add them in the DNS of the domain, wherever it is hosted (see DNS).
| Record | What it does | Example |
|---|---|---|
| MX | Tells other servers where to deliver mail for the domain. | example.com. MX 10 mail.example.com. and mail.example.com. A 203.0.113.10 |
| SPF (TXT) | Lists the servers allowed to send mail for the domain. | example.com. TXT "v=spf1 mx -all" |
| DKIM (TXT) | A public key that lets receivers verify the signature your server puts on outgoing mail. The key comes from the server. | <selector>._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=..." |
| DMARC (TXT) | Tells receivers what to do with mail that fails SPF and DKIM, and where to send reports. | _dmarc.example.com. TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]" |
| PTR (reverse DNS) | Maps the server’s IP address back to a name, for example mail.example.com. Many providers refuse mail from an IP without a matching PTR. |
Set at your VPS provider, not in your zone. |
Some details to get right:
- The MX record must point to a name with an A (or AAAA) record, never directly to an IP address.
- Have only one SPF record per domain. If the domain also sends mail through another service (a newsletter tool, for example), add it to the same record.
- Start DMARC with
p=nonewhile you check the reports, then move toquarantineorreject. - The PTR record is set in the control panel of your VPS or hosting provider, usually in the network or IP settings. Use the same name the server introduces itself with (for example
mail.example.com), and make sure that name has an A record pointing back to the same IP. - Some VPS providers block outgoing port 25 by default. If mail does not leave the server, check with the provider.
To test the setup, send a message to a Gmail address and open “Show original”. SPF, DKIM and DMARC should all say PASS.
Sending mail from websites
PHP’s mail() function does not work on WardPane and always reports “not sent”, because the PHP sandbox deliberately forbids starting a sendmail program. Node.js has no built-in mail function either.
Websites and apps send mail over SMTP. The usual tools are:
- WordPress: an SMTP plugin such as WP Mail SMTP or FluentSMTP;
- Laravel:
MAIL_MAILER=smtpand the SMTP settings in.env; - other PHP code: PHPMailer or Symfony Mailer;
- Node.js: Nodemailer.
Point them at a mailbox on this server or at an external SMTP service, with its server name, port 587 (STARTTLS) or 465 (TLS), user name and password.
With Block outgoing connections on (in the PHP or Node.js settings), the site cannot reach an external SMTP server. Either turn the option off or use a mail server on this machine.