2026-04-12 14:14:27 +02:00
2026-04-12 14:00:20 +02:00
2026-04-12 14:14:27 +02:00

📧 Dovecot Local Setup & IMAP Testing

📌 Overview

This project demonstrates the setup and validation of a local Dovecot IMAP server on Ubuntu. It includes installation, configuration, authentication, and IMAP testing.


🧱 Installation

sudo apt update
sudo apt install dovecot-core dovecot-imapd

⚙️ Configuration

Edit the mail configuration file:

sudo nano /etc/dovecot/conf.d/10-mail.conf

Update:

mail_location = maildir:~/Maildir

📁 Maildir Setup

mkdir -p ~/Maildir/{cur,new,tmp}

Structure:

Maildir/
 ├── cur/   # Read messages
 ├── new/   # New messages
 └── tmp/   # Temporary storage

🔄 Restart Service

sudo systemctl restart dovecot

Check Status

systemctl status dovecot

📸 Output: Status


🌐 Check Ports

sudo ss -tulpn | grep dovecot

Ports:

  • 143 → IMAP
  • 993 → IMAP SSL Status

🔐 Authentication Test

Credentials:

  • Username: gebely
  • Password: 5095
sudo doveadm auth test gebely 5095

📸 Output: Auth


📡 IMAP Testing

openssl s_client -connect localhost:143 -starttls imap

Login:

a login gebely 5095

📬 IMAP Commands

b LIST "" "*"
c SELECT INBOX
d FETCH 1 BODY[]

📸 IMAP Session: IMAP


🧠 Architecture

Client → Dovecot → PAM → passwd → Maildir

⚙️ Configuration Summary

  • Mail storage: Maildir
  • Authentication: PAM
  • User database: passwd
  • Protocol: IMAP
  • SSL enabled

🚨 Troubleshooting

1. Port already in use

sudo netstat -tulpn | grep 143

2. Network issue (VM)

  • Enable VMware NAT
  • Start VMware NAT Service

3. Authentication failure

  • Check username/password
  • Verify PAM configuration

🎯 Status

Dovecot installed Maildir configured Authentication working IMAP tested successfully

الوصف
لا يوجد وصف
اقرأني 363 KiB