Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an email account/address in Linux terminal? [closed]

Is it possible to create an email account under Linux* in the terminal? I've been looking to see if it is possible to generate email account dynamically for user registration purposes with my website.

I've found lots of valuable resources on stack overflow and elsewhere regarding sending and receiving email, but none in regard to actually creating an account.

like image 515
kirgy Avatar asked Mar 28 '13 17:03

kirgy


People also ask

How do I create a user account in Linux?

How to Create a New User in Linux. To create a new user account, invoke the useradd command followed by the name of the user. When executed without any option, useradd creates a new user account using the default settings specified in the /etc/default/useradd file.

How do I open mail in Linux terminal?

prompt, enter the number of the mail you want to read and press ENTER . Press ENTER to scroll through the message line by line and press q and ENTER to return to the message list. To exit mail , type q at the ? prompt and then press ENTER .

What is Linux mail command?

In Linux, the mail command is a command-line utility that is used to send and manage the emails from the command line. The mail command is not used to send emails only but also to view and receive emails from the recipients.


Video Answer


1 Answers

To answer your question, it is possible to create an email account/address via the command line on a Linux/Unix system.

The first step is to create a user account on that system for the user in question. There are different ways to do this. I found this guide, The Ultimate Guide to Create Users in Linux/Unix, to be one of the better overviews.

The next step requires understanding that email on Linux systems is often handled by two different systems/commands.

First is sending email. This is done quite often via sendmail. If a user can execute sendmail, then they can send mail via smtp to the world. This overly simplifies things, but it provides enough to get you started.

Receiving mail on the system and its delivery to users depends on the mail system and protocols being used. If you are using postfix, then the following article shows how to setup an email account.

My answer assumes you are not using LDAP or another directory service to maintain users.

This question probably belongs over in serverfault. I couldn't find an exact match to it over there, so I answered it here and flagged it to be moved.

like image 199
Jordan Dea-Mattson Avatar answered Oct 17 '22 10:10

Jordan Dea-Mattson