If the value above is used, mails will be sent as, where user is the user sending the message.Ģ. You may see the /etc/mailname file used with this parameter. myorigin specifies the domain that appears in messages sent from the server. Open /etc/postfix/main.cf file with your choice of editor and do following changes as explained. Note: That this tutorial is only supposed to get you started in that process and does not represent a comprehensive guide on email services with Linux.
However, you should become acquainted with the full configuration parameters (which can be listed with man 5 postconf) in order to set up a secure and fully customized mail server. You only need to set up a few parameters before being able to use the mail service. The main configuration file for Postfix is /etc/postfix/main.cf. So that messages sent to will be delivered to the inbox of the users listed above. sysadmin: gacanepa, jdoeĪnd run the following command to create or refresh the aliases lookup table. In our specific case, we will use the following alias as explained before (add the following line in /etc/aliases).
You may want to refer to Part 8 of the LFCS series if you need to refresh your memory before adding new users. In the above example, user1 and user2 should already exist on the system. The messages sent to user1 will only be sent to user2, and not to user1. Note that if you omit the word user1 after the colon, as in user1: user2 Thus, emails sent to user1 will be also delivered to user2.
However, if you want to also deliver it to a group of users as well, or to a different user, you can create a mail alias or use one of the existing ones in /etc/postfix/aliases, following this syntax: user1: user1, user2 192.168.0.15 mailserverīy default, a message sent to a specific user should be delivered to that user only. On our client, we have set up elementary DNS resolution adding the following line to the /etc/hosts file. User Aliases : is aliased to and Client Machine Setup Mail Client OS : Ubuntu 12.04 Our testing environment is as follows: Mail Server Setup Mail Server OS : Debian Wheezy 7.5
Other protocols that we need to take into account are IMAP4 ( Internet Message Access Protocol), which allows to manage email messages directly on the server without downloading them to our client’s hard drive, and POP3 ( Post Office Protocol), which allows to download the messages and folders to the user’s computer. Most likely, you will have to refer to that RFC while setting up your mail server environment. In order for these components to be able to “ talk” to each other, they must “ speak” the same “ language” (or protocol), namely SMTP ( Simple Mail Transfer Protocol) as defined in the RFC 2821. Dovecot will also will handle user authentication. In this tutorial, we will use Dovecot as our MDA.
MDA (short for Message or Mail Delivery Agent) is the software part that actually delivers email messages to user’s inboxes. In this series, we will use Thunderbird in our examples. Examples of MUAs include, but are not limited to, Thunderbird, Outlook, and webmail interfaces such as Gmail,, to name a few. MUA, or Mail User Agent, is a computer program used to access and manage the user’s email inboxes. MTA (short for Mail or Message Transport Agent), aka mail relay, is a software that is in charge of transferring email messages from a server to a client (and the other way around as well). When talking about email services, you will find the following terms mentioned very often: Message Transport Agent – MTA In order for an email message to be delivered from a client application (such as Thunderbird, Outlook, or webmail services such as Gmail or Yahoo! Mail) to his / her mail server and from there to the destination server and finally to its intended recipient, a SMTP (Simple Mail Transfer Protocol) service must be in place in each server. To make this possible, several things happen behind the scenes. The following image illustrates the process of email transport starting with the sender until the message reaches the recipient’s inbox: Process of Email Transport Components Of a Mail Sending, Transport and Delivery Process But first off, let’s start with a few definitions.