Debian 11 Bullseye
Sponsored Link

Mail Server : Add Mail User Accounts2021/09/14

Add Mail User Accounts to use Mail Service.
This example is for the case you use OS user accounts.
Configure basic Postfix settings, and basic Dovecot settings first.
[1] To use OS user accounts, that's only adding OS user like follows.
# install mail client

apt -y install mailutils
# set environment variables to use Maildir

echo 'export MAIL=$HOME/Maildir/' >> /etc/profile.d/
# add an OS user [debian]

adduser debian

[2] Login as a user added in [1] and try to send an email.
# send to myself [mail (username)@(hostname)]

mail debian@localhost

# input Cc
# input subject
Subject: Test Mail#1
# input messages
This is the first mail.

# to finish messages, push [Ctrl + D] key

# see received emails


"/home/debian/Maildir/": 1 message 1 new
>N   1 debian             Tue Sep 14 04:11  13/451   Test Mail#1

# input the number you'd like to see an email
? 1
Return-Path: <>
X-Original-To: debian@localhost
Delivered-To: debian@localhost
Received: by (Postfix, from userid 1000)
        id 7321DC03AC; Mon, 13 Sep 2021 23:11:29 -0500 (CDT)
To: <debian@localhost>
Subject: Test Mail#1
X-Mailer: mail (GNU Mailutils 3.10)
Message-Id: <>
Date: Mon, 13 Sep 2021 23:11:29 -0500 (CDT)
From: debian <>

This is the first mail.

# to quit, input [q]
? q
Saved 1 message in /home/debian/mbox
Held 0 messages in /home/debian/Maildir/
Matched Content