Docs

Email

How to run the server's mail from the Email section of the admin area, from deliverability, spam protection and the mail queue to reports and the Exim and Dovecot settings.

15 min read Updated From the panel's guide

The Email section of the admin area holds the server-wide mail tools. Mail on an intoPanel server is handled by Exim (receiving and sending), Dovecot (mailboxes over IMAP and POP3) and SpamAssassin (the spam filter). Clients manage their own mailboxes, forwarders, spam filters and mail routing in their own area; the pages here act on the whole server.

The settings of the mail services themselves are under Service Settings: Mail Server (Exim) Settings and Mailbox Server (Dovecot) Settings. They are described at the end of this page. Mail routing per domain, and the SPF, DKIM and DMARC records, are also covered in DNS.

Mail Deliverability#

In the admin area, open Email → Mail Deliverability (Mail Deliverability). The same page is under DNS → Mail DNS Records. It shows whether each domain is set up so that other mail servers trust its mail.

The Mail records of each domain table reads the zones kept on this server. For every domain it shows its account, whether SPF, DKIM and DMARC are Set or Missing, and where its mail goes (MX). Add all missing records adds the missing ones to every zone at once; existing records are kept.

The Check against live DNS box looks at what receiving mail servers really see:

  1. Click Run the check.
  2. Read the reverse DNS line: the PTR record of the server's sending address should lead back to the address and be the server's hostname. It is set by the provider of the IP address, not in the panel.
  3. Read the table: each domain's SPF, DKIM and DMARC should show Valid, and an MX should be listed.

A record that is set in the zone but shows "Problem: not found" live usually means the domain does not use this server's nameservers, or the change has not spread yet. Check the nameservers with the Nameserver Check. Clients see the same check for their own domains in their own area.

Block Mail by Country#

In the admin area, open Email → Block Mail by Country (Block Mail by Country). Mail servers in the countries you list cannot deliver mail to this server: the firewall (CSF) refuses their connections to the mail port 25.

  1. In Countries to block, enter two-letter country codes separated by commas or spaces, for example CN, RU.
  2. Click Save.

The firewall then fetches the address ranges of those countries, which takes a minute or two. Leave the box empty and save to accept mail from everywhere again.

Good to know:

  • People in those countries who send through a mail service elsewhere (Gmail, Outlook and the like) still reach you.
  • Your own customers in those countries can still send through this server with their mailbox password on ports 465 and 587.
  • The country address lists come from a free list the firewall refreshes by itself; they are good, not perfect.
  • This needs the CSF firewall. To block a country from the whole server, not just mail, use the country settings under Security → Sign-in Attack Protection.

Failed Mail Limit Exceptions#

A package can limit the share of an account's messages that may fail or be deferred in an hour (Max % failed or deferred messages per hour). An account over the limit is paused: the mail server takes no new messages from it, or from its domains, until the share is under the limit again, and you get a notice "Sending paused for account ...".

To let a paused sender send all the same, open Email → Failed Mail Limit Exceptions (Failed Mail Limit Exceptions):

  1. Under Paused senders, choose Allow this time or Always allow beside the account or domain. Or, under Exceptions, type an account's username, a domain or a mailbox address, choose This time (one hour) or Always, and select Add exception.
  2. The pause is lifted at once.

This time lasts one hour, the time the count looks back on; after that the limit applies again. Always stays until you select Remove beside it. An exception for an account covers its scripts and all its domains; one for a domain covers that domain's mailboxes; one for a mailbox covers only that mailbox. The hourly sending limit of the package still applies.

Block Mail by Sender Domain#

In the admin area, open Email → Block Mail by Sender Domain (Block Mail by Sender Domain). Mail from the sender domains listed here is refused before it is accepted, for every mailbox on this server.

To block a domain:

  1. Enter it in the box, for example example.com, or *.example.com for every name under it.
  2. Click Block.

To lift a block, click Unblock next to the domain.

Good to know:

  • *.example.com blocks every name under example.com but not example.com itself; add both to block the whole domain.
  • The list holds up to 5,000 domains.
  • Mailbox users who sign in to send are not affected; the block only applies to incoming mail.
  • The sender is refused during delivery, so the sending server gets an error and nothing lands in a mailbox or the spam folder.

Greylisting#

In the admin area, open Email → Greylisting (Greylisting). Greylisting turns away mail from a sending server this one has not seen before with "try again later". Real mail servers try again after a few minutes and are accepted from then on; most spam software never comes back.

To switch it on:

  1. Tick Enable greylisting for incoming mail.
  2. Adjust the times if needed:
    • First delay (minutes), default 5, up to 240: how long mail from a new sender is put off.
    • Time allowed for the retry (hours), default 4, up to 72: the sender must try again within this time, or it starts over.
    • Forget a known sender after (days), default 3, up to 90: a sender that got through is accepted at once until it has sent nothing for this long.
  3. Optionally list Trusted sending servers (IP addresses or networks, one per line) and Domains without greylisting (hosted domains that should get all mail at the first try).
  4. Large mail providers — Gmail, Outlook and Hotmail, Yahoo, iCloud, Zoho, Mailchimp, Amazon SES and others, known by their servers' verified names — are not greylisted: they always try again, but from another server each time, which would hold their mail up for an hour or more. Tick Greylist the large mail providers too to greylist them as well.
  5. Click Save.

The Senders seen part shows counts and the 300 most recent senders, waiting or known. Empty the greylist makes every sender new again.

Good to know: mail from users who sign in, and mail from this server itself, is never greylisted. Senders are recognised by their network (the first three numbers of the address), the sender address and the recipient. Greylisting delays first-time mail, such as sign-up confirmations, by a few minutes.

Mail Delivery Reports#

In the admin area, open Email → Mail Delivery Reports (Mail Delivery Reports). It searches the mail server's log for what happened to messages: accepted, delivered, delayed or failed.

To find a message:

  1. Enter a sender, recipient, host or message ID in the search box.
  2. Optionally choose where to search (sender, recipient, host or result message, message ID), a From and Until time, and which events to show (Accepted, Delivered, Delayed, Failed).
  3. Click Search.

Results show 50 per page, newest first, with the time, what happened, sender, recipient, the detail (for example the remote server's answer) and the message ID. Search for a message ID to see every step of that message.

Good to know:

  • The page reads the most recent part of the mail log (the last 8 MB); the note under the table says how far back that reaches.
  • Messages still waiting to be delivered are in the Mail Queue.
  • Clients see the same kind of log for their own domains under Mail Delivery Log in their own area.

Mail Queue#

In the admin area, open Email → Mail Queue (Mail Queue). The queue holds mail that could not be delivered yet. It is tried again automatically; frozen messages are not tried until they are unfrozen.

To search the queue, fill in Find (an address, domain or message ID), choose where to Look in, How it must match, optional Received from and Received until times (server time zone) and the number of Messages per page (20 to 500), then click Search. Clear search shows everything again.

For each message you can click View (headers, the start of the text and what happened so far), Deliver (try now), Freeze or Unfreeze, and Delete. Tick several messages to use Deliver ticked, Delete ticked, Freeze ticked and Unfreeze ticked. A row's own button acts on that message together with any ticked ones.

Under Whole queue:

  • Deliver all tries every message now, frozen ones included.
  • Delete all removes every message in the queue, whatever the search shows. Type delete in the box to confirm.

Good to know: deleted mail cannot be brought back. A sudden long queue often means a spamming script or a stolen mailbox password; check Top Mail Senders.

Mail Sending Addresses#

In the admin area, open Email → Mail Sending Addresses (Mail Sending Addresses). Here you choose which of the server's IP addresses outgoing mail leaves from. With only one address, all mail leaves from it; add more under Add IP Addresses to choose.

Mail to other servers leaves over IPv4, even when the server also has IPv6, as on cPanel servers. Gmail and other large providers refuse mail sent over IPv6 unless that address has its own reverse name (PTR) and the sender domain's SPF record names it. Once your IPv6 address has both, you can send over it as well: write MAIL_OVER_IPV6 = yes into /etc/intopanel/exim-ipv6.conf and restart the mail server (systemctl restart exim).

  • Address the server's mail leaves from: pick the Default sending address, and tick Accounts that have an address of their own send their mail from it if accounts with a dedicated address should use it. Click Save.
  • Greeting name of each address: the name the server gives other mail servers (HELO) when sending from that address. Enter the name the address's reverse DNS (PTR) record gives and click Save. Empty means the server's hostname.
  • Sending address of each domain: the table shows which address each domain sends from and why. Choose another address and click Apply, or choose The default.

Changes take effect with the next message; nothing is restarted.

Good to know: mail from a new address starts without a reputation. It is only trusted when its reverse DNS name resolves back to it, that name is set as its greeting name, and the sending domain's SPF record includes the address.

Mailbox Conversion#

In the admin area, open Email → Mailbox Conversion (Mailbox Conversion). Mailboxes are kept in one of two formats:

  • maildir keeps each message in a file of its own: simple, and what most tools read.
  • mdbox keeps many messages in each file: far fewer files, and faster for large mailboxes.

Webmail, IMAP and POP3 work the same with both.

To set the format for new mailboxes, choose it under New mailboxes are made in and click Save.

To convert existing mailboxes:

  1. In the Accounts table, which shows how many mailboxes each account has in each format, tick the accounts.
  2. Choose the target format in Convert the ticked accounts' mailboxes to.
  3. Click Convert. The progress shows at the top of the page.

Each mailbox's mail is copied into the other format, the mailbox is switched over and the old copy is removed. Mail that arrives meanwhile is kept.

Good to know: each mailbox briefly needs the space of its mail twice while it is converted, so check the free disk space first. Only one conversion runs at a time.

Mail Route Tester#

In the admin area, open Email → Mail Route Tester (Mail Route Tester). It shows where mail to an address would go, without sending anything.

  1. Enter an Email address, for example someone@example.com.
  2. Click Trace.

The mail server's answer appears below: delivery to a mailbox on this server, to a forwarder (and where it leads), or out to another server, or an error if the address cannot be routed.

Use it when mail for a domain goes to the wrong place. A common case is a domain whose mail is hosted at Google Workspace or Microsoft 365 while the server still delivers it locally; set such a domain to "by another server" under Mail Routing. It also helps to check that a new forwarder or a catch-all address works.

Fix Mailbox Permissions#

In the admin area, open Email → Fix Mailbox Permissions (Fix Mailbox Permissions). The page has one button, Fix now.

It goes through the mail folder of every account and gives every file and folder back to the account, and makes them private again (folders readable only by the account, files only by the account). Links are never followed or changed. A message tells you how many accounts were checked and how many files or folders were corrected.

Use it when mailboxes show errors, for example "permission denied" in webmail or mail programs that cannot open folders, after mail files were copied, moved or restored by hand. Mail itself is not changed or deleted, so it is safe to run at any time.

Spam Filter Service (spamd)#

In the admin area, open Email → Spam Filter Service (spamd) (Spam Filter Service (spamd)). spamd is the background service of the SpamAssassin spam filter; this page sets how it runs. Leave a field empty or at 0 to keep the default.

  • Addresses allowed to connect: IP addresses or ranges, separated by commas, that may connect to spamd, such as 127.0.0.1.
  • Connections per worker process: how many connections one worker handles before a fresh one takes its place.
  • Most worker processes: how many workers may run (default 5). Each uses about 100 MB of memory.
  • Connection timeout: seconds after which spamd gives up on a TCP connection.
  • Worker connection timeout: seconds after which a worker gives up on a connection.

Click Save. The spam filter is restarted with the new options.

On a busy mail server, more workers handle more messages at once but use more memory. How spam is scored and where it goes is set by clients for their own mailboxes under Spam Filters.

Mail Statistics#

In the admin area, open Email → Mail Statistics (Mail Statistics). It sums up the recent mail log.

  • Mail in the log shows the messages accepted, deliveries made, delivery attempts delayed and deliveries failed, since the date the log reaches back to.
  • By sender address lists the 100 busiest sender addresses with their messages, delivered, delayed and failed counts. Click an address to open its entries in Mail Delivery Reports. <> is the mail server itself (bounce messages).
  • By sending login lists who used this server to send: mailboxes that signed in, and accounts whose websites or scripts sent mail.

A high number of delayed or failed deliveries can mean the server's address is on a blocklist or a domain's mail records are wrong; check Mail Deliverability.

Top Mail Senders#

In the admin area, open Email → Top Mail Senders (Top Mail Senders). It shows the By sending login table: who used this server to send mail, read from the recent mail log.

Each row is a mailbox login that signed in to send, or an account whose websites or scripts sent mail ("on this server"), with the number of messages and how many were delivered, delayed and failed.

A sudden high figure often means a stolen mailbox password or an abused contact form. What to do:

  1. Look up the sender's messages in Mail Delivery Reports.
  2. Change the mailbox password, or ask the client to fix the form or script.
  3. Remove the unwanted messages from the Mail Queue.

How many messages each domain may send per hour is set in the account's package.

Sent Mail Summary#

In the admin area, open Email → Sent Mail Summary (Sent Mail Summary). It shows the By sender address table from the recent mail log: the 100 busiest sender addresses, with the number of messages and how many were delivered, delayed and failed.

Click an address to see its single messages in Mail Delivery Reports. <> is the mail server itself, which sends bounce messages.

Use it to see which addresses send the most mail and which have many failed deliveries; many failures from one address often mean it sends to lists of old or invented addresses. To see who signed in to send, use Top Mail Senders; for the overall counts, use Mail Statistics.

Mail Server (Exim) Settings#

In the admin area, open Service Settings → Mail Server (Exim) Settings (Mail Server (Exim) Settings). Here you set a chosen list of Exim options. Leave a field empty to use Exim's own standard value; each field shows the form its value takes.

Options include message_size_limit (largest message, such as 50M; 50M without a value), recipients_max (per message), smtp_accept_max and smtp_accept_max_per_host (connections at once, in total and from one address), queue_run_max, remote_max_parallel, auto_thaw (retry frozen messages after, such as 6h), timeouts, load thresholds (queue_only_load, deliver_queue_load_max, smtp_load_reserve), bounce_return_size_limit, delay_warning and check_spool_space.

Click Apply and restart Exim. The settings are tested by Exim first; if it refuses them, the previous settings stay and you see an error.

See Suggested Settings works out values for this server from its memory, processors, load and disk. Untick what you do not want and click Apply the Ticked Settings.

Under Ports, Exim listens on 25, 465 (SSL/TLS) and 587 (STARTTLS). Also listen on port 26 adds port 26, which works like 25 and helps users whose internet provider blocks port 25; the firewall is opened at the same time.

Mailbox Server (Dovecot) Settings#

In the admin area, open Service Settings → Mailbox Server (Dovecot) Settings (Mailbox Server (Dovecot) Settings). Dovecot serves mailboxes to mail programs (IMAP and POP3) and webmail. Leave a field empty to use Dovecot's standard value.

Options include:

  • mail_max_userip_connections: connections per mailbox and address (1 to 100). Raise it when users with many devices behind one address get "too many connections".
  • auth_failure_delay, auth_cache_size, auth_cache_ttl: sign-in delay after a wrong password and the sign-in cache.
  • mailbox_idle_check_interval, imap_idle_notify_interval, mail_fsync, maildir_very_dirty_syncs, maildir_copy_with_hardlinks.
  • default_process_limit, default_client_limit, default_vsz_limit.
  • verbose_proctitle, auth_verbose, mail_debug for troubleshooting.
  • ssl and disable_plaintext_auth.

Click Apply to Dovecot. Dovecot checks the settings and reloads; if it refuses them, the previous ones stay. See Suggested Settings offers values worked out for this server.

By default mail programs must use encryption (ports 993 and 995). To also allow plain IMAP and POP3 on ports 143 and 110, set ssl to yes and disable_plaintext_auth to no. Passwords may then cross the network unencrypted, so leave both empty unless you need it.

Was this article helpful?

Something missing? Ask in the community or open a ticket.