Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

alias entry:


Click here to view code image
postmaster: root


This entry forwards any mail received for postmaster to the root user. By
default, almost all the aliases listed in the /etc/aliases file forward to
root.


CAUTION
Reading email as root is a security hazard; a malicious email message can
exploit an email client and cause it to execute arbitrary code as the user
running the client. To avoid this danger, you can forward all of root’s mail
to another account and read it from there. You can choose one of two ways
to do this.
One way is to add an entry to the /etc/aliases file that sends root’s
mail to a different account. For example, root: foobar would forward
all mail intended for root to the account foobar.
The other way is to create a file named .forward in root’s home directory
that contains the address that the mail should forward to.

Any time you make a change to the /etc/aliases file, you must rebuild
the aliases database before that change will take effect. Use the following
command to do this:


Click here to view code image
matthew@seymour:~$ sudo newaliases


Using Fetchmail to Retrieve Mail


SMTP is designed to work with a system that has a full-time connection to the
Internet. What if you are on a dial-up account? What if you have another
system store your email for you and then you log in to pick it up once in a
while? (Most users who are not setting up servers are in this situation.) In this
case, you cannot easily receive email using SMTP, and you need to use a
protocol such as POP3 or IMAP instead.


NOTE
Remember when we said that some mail clients can include some MTA
functionality? You can configure Microsoft Outlook and Outlook Express
to use SMTP, and if you use a dial-up connection, they offer to start the
connection and then use SMTP to send your mail, so a type of MTA
Free download pdf