Download presentation
Presentation is loading. Please wait.
1
LINUX ADMINISTRATION
2
UNIT 4 (NEW UNIT 5)
3
CHAPTER 1 : CONFIGURING MAIL SERVICES
Explained Mail User Agent (MUA) The MUA, also called a mail client, enables users to write and read mail messages. Mail Transfer Agent (MTA) MTA receive the message from the MUA The MTA installed by default on your Red Hat system is called Sendmail MTA on the sending machine can establish a connection, it sends the message to the MTA on the recipient‘s server using the Simple Message Transfer Protocol (SMTP). Local Delivery Agent (LDA) LDA receives the message from the MTAit places the message in the receiver‘s mailbox file that is identified by the username. location of the user‘s mailbox file is /usr/spool/mail/<user’s name>. this program is called procmail .
4
INTRODUCING SMTP SMTP and two other protocols used to send mail, Post Office Protocol (POP3) and Internet Message Access Protocol (IMAP4). SMTP is the TCP/IP protocol for transferring e- mail messages between computers on a network. SMTP specifies message movement between MTAs
5
UNDERSTANDING POP3 POP3 is the Post Office Protocol version 3.
This protocol runs on a server that is connected to a network and continuously sends and receives mail. The POP3 server stores any messages it receives. POP3 was developed to solve the problem of what happens to messages when the recipient is not connected to the network.
6
UNDERSTANDING IMAP4 The Internet Message Access Protocol version 4 (IMAP4) provides sophisticated client/server functionality for handling . IMAP4 has more features than POP3. IMAP4 enables you to store your on a networked mail server, just as POP3 does. The difference is that POP3 requires you to download your before your MUA reads it, IMAP4 enables your to reside permanently on a remote server, from which you can access your mail. 6
7
CONFIGURING SENDMAIL root@main# rpm -q sendmail
Sendmail configuration file, /etc/sendmail.cf
8
THE M4 MACRO PROCESSOR A macro is a symbolic name for a long string of characters, much like a keyboard macro is a shorthand way to type a long series of keystrokes. Sendmail gets its rules from the entries in a Sendmail macro file. The location of the generic Sendmail macro file for Red Hat is /usr/lib/sendmail-cf/cf/generic- linux.mc. The m4 is a macro processor that reads the macro file and generates the configuration file.
9
UNDERSTANDING AND MANAGING THE
MAIL QUEUE Sometimes messages can‘t go out immediately, and the reasons are varied. When they send the mail, Sendmail puts the message into the mail queue and keeps trying to send the message at intervals defined for the Sendmail daemon.
10
CONFIGURING POP3 The steps involved in setting up POP3 include:
Installing the package that contains the POP3 daemon Editing the file /etc/inetd.conf to make POP3 services available Restarting the inetd daemon to make the changes in step 2 take effect Checking that the POP3 daemon is accepting connections
11
CONFIGURING IMAP4 To configure IMAP4, you follow the same basic steps as with POP3: Installing the package that contains the IMAP4 daemon. Editing the file /etc/inetd.conf to make IMAP4 services available. This step is usually done when you install Linux. Restarting the inetd daemon to make the changes in step 2 take effect. Checking that the IMAP4 daemon is accepting connections.
12
SETTING UP ALIASES TO MAKE LIFE
EASIER If people have trouble spelling someone‘s name, you can create an alias with alternate spellings The aliases file is usually /etc/aliases.
13
USING OTHER FILES AND COMMANDS WITH SENDMAIL
mailq or sendmail -bp — Shows the contents of the mail queue /var/spool/mqueue — The file that holds the mail queue /var/spool/mail — The file that holds a user’s mail (the mailbox file) /etc/mail/access — List of addresses not permitted to send mail to your system /etc/mail/relay-domains — List of hosts that are permitted to relay through your system /etc/mail/local-host-names — Other names for your system /etc/mail/virtusertable — Maps addresses to usernames on the system
14
USING THE POSTFIX MAIL SERVER
yum install postfix configuration settings for Postfix are located in the /etc/postfix/main.cf The key options in the main.cf file are: myorigin = $myhostname inet_interfaces = $myhostname myhostname = mylinuxhost.mydomain.com mydomain = mydomain.com
15
SENDING E-MAIL FROM THE COMMAND
LINE Reading mail with Mail Mail is the oldest, most primitive client. It has the advantage of being installed on every Linux system. It is also the most lightweight program, making it ideal for running on very old computers. At the command line, enter the command mail, followed by the recipient‘s address: mail Press Enter. Mail responds with the Subject: prompt. Type in the subject of your and press Enter a second time. Now compose your message, just as you would a regular letter. After you finish your message, press Enter. Type a period on a line by itself, and then press Enter a second time. This step lets mail know that you are done composing the message. Mail displays the letters EOT (End Of Text) and sends your message on its way. 15
16
USING ELM The elm mail client is slower than mail but has many
more features. It was the first mail program to incorporate aliases. It also mimics the vi editor, so many people find it familiar and easy to use. To send or receive using elm, type elm at the command prompt. Elm brings up its own list of commands
17
WORKING WITH PINE ATTACHMENTS
One of Pine‘s biggest contributions to the world is that it was the first client to handle attachments reliably. Type pine to start the Pine mail program. Type c (for compose) — this command opens the composition screen. Use the down-arrow key to move your cursor to the third line from the top of the screen, which is labeled Attchmnt. Press Ctrl+J. Pine asks you for the name of a file to attach. Enter the name of the file you want to attach. Pine prompts you for a comment. You don‘t have to enter one. Press Enter, and your (plus the attachment) is on its way.
19
MAINTAINING E-MAIL SECURITY
Using S/MIME for security is only a first step in protecting your users and yourself. Protecting against eavesdropping Your mail message goes through more computers than just yours and your recipient‘s because of store and forward techniques. All a cracker has to do to snoop through your mail is use a packet sniffer program Using encryption Cryptography isn‘t just for secret agents. Lotus Notes provides encryption Using a firewall If you receive mail from people outside your network, you should set up a firewall to protect your network. The firewall is a computer that prevents unauthorized data 19 from reaching your network.
20
CHAPTER 2 : CONFIGURING FTP SERVICES
File Transfer Protocol's purpose is the platform independent data transfer of the internet, it is based on a server/client architecture. FTP to be split in two different channels, one serves for the data (TCP-port 20) and the other for the control (TCP-port 21). A FTP connection involves four steps: User authentication Establishing the control channel Establishing the data channel Discontinuing the connection 20
21
VSFTPD(VERY SECURE FTP DAEMON)
vsftpd represents a server for unix like operating systems, it runs on platforms like Linux, ?BSD, Solaris, HP-UX and IRIX. It supports many features which are very much missed on other FTP-servers. Some of them are: Very high security requirements Band width limits Good scalability The possibililty to create virtual users IPnG support (IP Next Generation: a new version of IP which is designed to be an evolutionary step from IPv4.) Better than average performance The possibility to assign virtual IPs. high speed.
22
CONFIGURING VSFTPD Installing vsftpd Yum –install vsftp
23
The configuration file may be found under "/etc/vsftpd.conf".
Cont……
24
www.educlash.com # Anonymus FTP-access permitted? YES/NO
anonymous_enable=NO # Permit anonymus upload? YES/NO anon_upload_enable=NO # Permission for anonymus users to make new directories? YES/NO anon_mkdir_write_enable=NO # Permission for anonymus users to do other write operations - like renaming or deleting? YES/NO anon_other_write_enable=NO # Log on by local users permitted? YES/NO local_enable=YES # Shall local users be locked into their home directory? YES/NO chroot_local_user=YES # Highest permitted data transfer rate in bytes per second for local logged on users. Default = 0 (unlimited) 24 local_max_rate=7200
25
www.educlash.com # General write permission? YES/NO write_enable=YES
# Enable messages when changing directories? YES/NO dirmessage_enable=YES # Welcome banner at users logon. ftpd_banner="Welcome to neo5k's FTP service.“ # Activate logging? YES/NO xferlog_enable=YES # Logging of all FTP activities? YES/NO # Careful! This can generate large quantities of data. log_ftp_protocol=NO # Confirm connections are established on port 20 (ftp data) only. YES/NO connect_from_port_20=YES # Timeout during idle sessions idle_session_timeout=600 25
26
www.educlash.com # Data connection timeout data_connection_timeout=120
# Access through Pluggable Authentication Modules (PAM) pam_service_name=vsftpd # Standalone operation? YES/NO - depending on operation mode (inetd, xinetd, Standalone) # The author's FTP service is being startet with xinetd, therefore the value here is NO. listen=NO
27
COMMAND LINE SFTP You can use command line SFTP from your Unix account
sftp
28
standard commands for command line SFTP include:
cd Change the directory on the remote computer chmod Change the permissions of files on the remote computer chown Change the owner of files on the remote computer dir (or ls) List the files in the current directory on the remote computer exit (or quit) Close the connection to the remote computer and exit SFTP get Copy a file from the remote computer to the local computer help (or ?) Get help on the use of SFTP commands lcd Change the directory on the local computer See a list of the files in the current directory on the local computer lls lmkdir Create a directory on the local computer 28
29
COMMANDS CONT… ln (or symlink)
Create a symbolic link for a file on the remote computer Show the current directory (present working directory) on the local computer Change the local umask value Create a directory on the remote computer lpwd lumask mkdir put Copy a file from the local computer to the remote computer Show the current directory (present working directory) on the remote computer Rename a file on the remote host Delete files from the remote computer pwd rename rm Remove a directory on the remote host (the directory usually has to be empty) rmdir version Display the SFTP version 29
30
THANK YOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.