Skip to content

Troubleshooting

This guide covers the most common issues you will encounter running a Vectis Mail server, with concrete diagnostic steps and solutions. Start with checking service health, then find your specific issue below.

Before diving into specific issues, check the overall state of your server:

Terminal window
# Quick status of all services
vectis status
# Detailed health checks
vectis health
# Docker-level container status
docker compose ps

A healthy server shows all services as healthy with reasonable uptime. If a service is unhealthy or restarting, start with its logs:

Terminal window
# Vectis CLI (recommended)
vectis logs postfix --tail 100
vectis logs dovecot --tail 100
# Docker logs (alternative)
docker logs vectis-postfix --tail 100
docker logs vectis-dovecot --tail 100

Mail not delivering to external recipients

Section titled “Mail not delivering to external recipients”

Symptom: Messages sent from your server are not arriving at Gmail, Outlook, Yahoo, or other providers.

Terminal window
# Show the mail queue
docker exec vectis-postfix mailq
# Or via the Vectis CLI
vectis logs postfix --tail 200

If the queue contains messages, look at the reason for each deferred message. Common reasons:

Queue messageCauseSolution
Connection timed outPort 25 outbound is blockedContact your VPS provider to unblock outbound SMTP
421 Try again laterRecipient server rate limitingNormal during IP warmup; wait and retry
550 5.7.1 RejectedSPF/DKIM failure or IP blocklistedCheck authentication records and RBL status
Host or domain name not foundDNS resolution failureCheck /etc/resolv.conf inside the container

Many VPS providers block outbound port 25 by default to prevent spam. Test from your server:

Terminal window
# Test outbound connectivity
telnet gmail-smtp-in.l.google.com 25
# If telnet is not available
nc -zv gmail-smtp-in.l.google.com 25

If the connection times out, contact your VPS provider to unblock port 25. This is the single most common issue with new mail servers.

Terminal window
vectis domain check example.com

If SPF, DKIM, or DMARC are failing, see the DKIM, SPF & DMARC guide.

Terminal window
# Check RBL status via API
curl https://mail.example.com/api/v1/deliverability/rbl \
-H "Authorization: Bearer YOUR_TOKEN"

If your IP is listed on any RBL, follow the delisting process for that specific list. See deliverability best practices for details.

Symptom: External senders report that their messages bounce when sending to your domain.

Terminal window
dig MX example.com +short

The MX record must point to your mail hostname (e.g., mail.example.com), and the hostname must resolve to your server’s IP.

Terminal window
# From another machine, test connectivity
nc -zv mail.example.com 25
# Or use telnet
telnet mail.example.com 25

If the connection is refused, check:

  • Firewall rules on your server (ufw status or iptables -L)
  • VPS provider firewall/security group settings
  • That the Postfix container is running (docker compose ps)

Step 3: Check Postfix is accepting mail for the domain

Section titled “Step 3: Check Postfix is accepting mail for the domain”
Terminal window
vectis logs postfix --tail 200

Look for NOQUEUE: reject lines. Common causes:

Log messageCauseSolution
Recipient address rejected: User unknownMailbox does not existCreate the mailbox or check the address
Relay access deniedDomain not in virtual_mailbox_domainsVerify the domain is added and active in Vectis
Client host rejectedIP blocked by Postfix restrictionsCheck smtpd_recipient_restrictions

If you use Cloudflare, make sure the mail hostname A record is DNS-only (grey cloud, not orange). See the Cloudflare guide.

Terminal window
# Verify the A record returns your IP, not Cloudflare's
dig A mail.example.com +short

Symptom: Your email arrives but lands in the recipient’s spam folder.

Send a test email to a Gmail address. Open it (check the spam folder), click the three dots, and select “Show original”. Look for:

Authentication-Results:
spf=pass
dkim=pass
dmarc=pass

If any of these show fail, fix the corresponding DNS record.

Send a test to mail-tester.com. A score below 7/10 indicates problems. The report will tell you exactly what is wrong.

  • No PTR record or PTR mismatch
  • IP on an RBL
  • SPF using ~all instead of -all
  • DMARC policy set to p=none
  • HTML-only email with no plain text alternative
  • Spammy content (excessive capitalisation, multiple exclamation marks)
  • New IP without warmup (see IP warmup guide)

Symptom: Postfix or Dovecot fail to start. Logs show cannot load certificate or SSL certificate not found.

Terminal window
# Check acme.sh sidecar logs
vectis logs acme --tail 50
docker logs vectis-acme --tail 50
# Verify certificate files exist
docker exec vectis-postfix ls -la /etc/ssl/mail/

Common causes:

  • The acme.sh sidecar has not completed initial certificate issuance
  • Port 80 is not reachable (required for HTTP-01 challenges)
  • DNS-01 challenge is misconfigured (wrong Cloudflare API token)

Solution: Check the acme.sh logs for the specific error. If using HTTP-01, ensure port 80 is open. If using DNS-01, verify the Cloudflare API token in secrets.yaml.

Symptom: Email clients show certificate warnings. TLS connections fail with certificate has expired.

Terminal window
# Check certificate expiry
docker exec vectis-postfix openssl x509 -in /etc/ssl/mail/fullchain.pem -noout -dates
# Force renewal
docker exec vectis-acme acme.sh --renew --domain mail.example.com --force

Symptom: Email clients show “certificate does not match hostname” warnings.

Terminal window
# Check the certificate's CN and SAN
docker exec vectis-postfix openssl x509 -in /etc/ssl/mail/fullchain.pem -noout -text | grep -A1 "Subject:"

The certificate’s Common Name (CN) or Subject Alternative Name (SAN) must match the hostname your clients connect to. If you changed your mail hostname after installation, you need to reissue the certificate.

Symptom: Email client shows “authentication failed” when trying to log in.

Terminal window
# Check Dovecot auth logs
vectis logs dovecot --tail 100

Common causes:

Log messageCauseSolution
auth failed with no password hashMailbox does not existVerify the mailbox exists: vectis mailbox list
password mismatchWrong passwordReset the password via dashboard or API
plaintext auth disabledClient connecting without TLSConfigure the client to use SSL/TLS (port 993 for IMAP, 587 for SMTP)

Symptom: Cannot log into the Vectis admin dashboard.

Terminal window
# Check API logs for auth errors
vectis logs api --tail 100

If you have forgotten the admin password, you can reset it:

Terminal window
# Via CLI (if you have SSH access)
vectis admin reset-password --email admin@example.com

If TOTP (two-factor authentication) is enabled and your authenticator app is out of sync:

  • Verify your device clock is accurate (TOTP is time-based)
  • Use backup codes if available
  • As a last resort, disable TOTP via the API with a valid TOTP code

After changing DNS records, allow time for propagation:

  • Cloudflare: typically 1-5 minutes
  • Other providers: up to 24-48 hours

Check current DNS state with:

Terminal window
# Query a specific DNS server (bypasses local cache)
dig @8.8.8.8 MX example.com +short
dig @1.1.1.1 TXT example.com +short

If your server cannot resolve its own hostname, check the DNS resolver configuration inside the container:

Terminal window
docker exec vectis-postfix cat /etc/resolv.conf

Docker containers typically use the host’s DNS configuration. If your host is configured with an internal DNS server that does not have your public records, outbound mail may fail to resolve recipient domains.

Symptom: Messages are stuck in the queue and not being delivered.

Terminal window
# View the queue
docker exec vectis-postfix mailq
# Force queue flush (attempt immediate delivery)
docker exec vectis-postfix postqueue -f
# View a specific queued message
docker exec vectis-postfix postcat -q MESSAGE_ID

If the queue contains messages that will never be delivered (e.g., invalid recipients from a misconfiguration):

Terminal window
# Delete all deferred messages
docker exec vectis-postfix postsuper -d ALL deferred
# Delete a specific message
docker exec vectis-postfix postsuper -d MESSAGE_ID

Use this carefully — deleting queued messages means those emails will never be delivered.

Symptom: IMAP clients cannot connect. Connection is refused on port 993.

Terminal window
# Check if Dovecot is running
docker compose ps | grep dovecot
# Check Dovecot logs
vectis logs dovecot --tail 100
# Test the port locally
docker exec vectis-dovecot ss -tlnp | grep 993

Common causes:

  • Dovecot container has crashed (check logs for the reason)
  • Port 993 is blocked by a firewall
  • TLS certificate is missing or invalid (Dovecot requires a valid cert to start with ssl = required)

Symptom: Server running slowly or services being OOM-killed.

Terminal window
# Check per-container memory usage
docker stats --no-stream
# Check system memory
free -h

Typical memory usage:

ServiceNormal rangeNotes
Postfix30-80 MBIncreases with queue size
Dovecot50-200 MBScales with concurrent IMAP connections
Rspamd200-500 MBNeural network and Bayes classifier
ClamAV800 MB - 1.5 GBVirus signature database
Postgres100-300 MBDepends on shared_buffers config
Valkey30-100 MBDepends on cached data
Traefik30-60 MBMinimal
Go API20-60 MBMinimal

If ClamAV is consuming too much memory, consider switching to a lighter profile or disabling it:

# In config.yaml
clamav:
profile: none # Disables ClamAV entirely

Then apply:

Terminal window
vectis config apply

Symptom: A container is restarting in a loop.

Terminal window
# Check container state
docker compose ps
# Check the exit code and restart count
docker inspect vectis-postfix --format='{{.State.ExitCode}} {{.RestartCount}}'
# Check logs for the crash reason
docker logs vectis-postfix --tail 200

Common crash causes:

ContainerTypical crash reasonSolution
PostfixInvalid main.cf configurationRun vectis config validate and fix errors
DovecotMissing TLS certificateEnsure acme.sh has issued certificates
RspamdCorrupted neural network dataDelete Rspamd data volume and restart
ClamAVOut of memory during signature updateIncrease memory limits or disable ClamAV
PostgresCorrupted data filesRestore from backup: vectis backup restore
Terminal window
# Restart a specific container
docker compose restart postfix
# Or stop and start
docker compose stop dovecot
docker compose start dovecot
Terminal window
# Restart everything
docker compose restart
# Nuclear option: stop all, remove containers, start fresh
docker compose down
docker compose up -d

If you need to file a support request or investigate a complex issue, collect this information:

Terminal window
# System info
vectis status --json > /tmp/vectis-status.json
# All service logs (last 500 lines each)
vectis logs postfix --tail 500 > /tmp/postfix.log 2>&1
vectis logs dovecot --tail 500 > /tmp/dovecot.log 2>&1
vectis logs rspamd --tail 500 > /tmp/rspamd.log 2>&1
vectis logs api --tail 500 > /tmp/api.log 2>&1
# DNS check
vectis domain check example.com --json > /tmp/dns-check.json 2>&1
# Docker stats snapshot
docker stats --no-stream > /tmp/docker-stats.txt