• No results found

Linux Administrator (Advance)

N/A
N/A
Protected

Academic year: 2021

Share "Linux Administrator (Advance)"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Mr.Kriangsak Namkot

Trainer& Director Jodoi IT&Service Co.,Ltd.

[email protected] [email protected]

http://www.jodoi.com

Linux Administrator (Advance)

Linux Admin II

Day 2

9:00

. - 12.00

น. -

Mail Server ( postfix,dovicot ) 10:30

. - 10.45

น. -

Coffee Break

10.45

. - 12.00

น. -

Mail Server ( postfix,dovicot ) 12.00

. - 13.00

น. -

Lunch

13.00

. - 14.30

น. -

Webmail ( Squirrelmail ) 14.30

. - 14.45

น. -

Coffee Break

(2)

Mail Server

Mail Server

- SMTP server à SMTP (Simple mail transfer protocol) server is a computer that receives outgoing mail messages from users and routes them to their intended recipients. - POP server à POP (Post Office Protocol) mail refers to

email software on your personal computer that sends and receives mail via a shared computer's electronic post office. - IMAP Serverà IMAP (Internet Message Access Protocol)

is a protocol for retrieving email messages and working with mailboxes on a mail server using an email client

Postfix Mail Server

Postfix SMTP Server Remove sendmail

[root@jodoi-server html]# /etc/init.d/sendmail stop Shutting down sm-client: [ OK ]

Shutting down sendmail: [ OK ]

[root@jodoi-server html]# yum remove sendmail

Install postfix

[root@jodoi-server html]# yum install postfix

or

(3)

Postfix Mail Server

[root@jodoi-server /]# vi /etc/postfix/main.cf #myhostname = host.domain.tld #myhostname = virtual.domain.tld myhostname = jodoi-server.com #mydomain = domain.tld mydomain = jodoi-server.com #myorigin = $mydomain myorigin = $mydomain

Postfix Mail Server

#inet_interfaces = all

inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain, localhost

#mynetworks = 168.100.189.0/28, 127.0.0.0/8 mynetworks = 192.168.1.0/24, 127.0.0.0/8

(4)

Postfix Mail Server

[root@jodoi-server /]# /etc/init.d/postfix start Starting postfix: [ OK ]

[root@jodoi-server html]# netstat -anp |grep 25

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 5527/master [root@jodoi-server /]# ps -ef |grep postfix

root 4463 1 0 16:16 ? 00:00:00 /libexec/postfix/master postfix 4464 4463 0 16:16 ? 00:00:00 pickup -l -t fifo -u postfix 4465 4463 0 16:16 ? 00:00:00 qmgr -l -t fifo -u root 4586 2472 0 16:50 pts/0 00:00:00 grep postfix

Postfix Mail Server

Testing [root@jodoi-server /]# telnet 192.168.1.200 25 Trying 192.168.1.200... Connected to 192.168.1.200 (192.168.1.200). Escape character is '^]'. helo jodoi-server.com mail from:[email protected] rcpt to:[email protected] data test mail . quit 221 2.0.0 Bye

(5)

Postfix Mail Server

[

root@jodoi-server /]# tail -f /var/log/maillog

Aug 14 16:22:32 jodoi-server postfix/qmgr[4465]: 315E927BD1: removed Aug 14 16:51:47 jodoi-server postfix/smtpd[4590]: connect from

unknown[192.168.1.200]

Aug 14 16:52:23 jodoi-server postfix/smtpd[4590]: 84A7927BC7: client=unknown[192.168.1.200]

Aug 14 16:52:35 jodoi-server postfix/cleanup[4595]: 84A7927BC7: message-id=<[email protected]> Aug 14 16:52:35 jodoi-server postfix/qmgr[4465]: 84A7927BC7:

from=<[email protected]>, size=354, nrcpt=1 (queue active) Aug 14 16:52:35 jodoi-server postfix/local[4596]: 84A7927BC7:

to=<[email protected]>, relay=local, delay=23,

delays=22/0.07/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Aug 14 16:52:35 jodoi-server postfix/qmgr[4465]: 84A7927BC7: removed Aug 14 16:52:39 jodoi-server postfix/smtpd[4590]: disconnect from

unknown[192.168.1.200]

Dovecot POP3/IMAP Server

[root@jodoi-server ~]# rpm -q dovecot

dovecot-1.0-1.2.rc15.el5

[root@jodoi-server html]# yum install dovecot

or

[root@jodoi-server ~]# rpm -ivh dovecot-1.0.7-2.el5.i386.rpm [root@jodoi-server /]# vi /etc/dovecot.conf

#protocols = imap imaps pop3 pop3s protocols = imap pop3

(6)

Dovecot POP3/IMAP Server

[root@jodoi-server /]# /etc/init.d/dovecot start Starting Dovecot Imap: [ OK ]

[root@jodoi-server /]# netstat -anp|grep dovecot tcp 0 0 :::110 :::* LISTEN 4746/dovecot tcp 0 0 :::143 :::* LISTEN 4746/dovecot

Dovecot POP3/IMAP Server

[root@jodoi-server /]# telnet 192.168.1.200 110 Trying 192.168.1.200...

Connected to 192.168.1.200 (192.168.1.200). Escape character is '^]'.

+OK Dovecot ready. user jodoi

+OK pass xxxxx +OK Logged in. list

+OK 18 messages: 1 1439

2 3250 quit

+OK Logging out.

(7)

Mail Server

Squirrelmail Web Mail

Squirrelmail

http://www.squirrelmail.org/download.php

[root@jodoi-server ~]# wget

http://voxel.dl.sourceforge.net/sourceforge/squirrelmail/ squirrelmail-1.4.15.tar.gz

[root@jodoi-server ~]# tar -zxvf squirrelmail-1.4.15.tar.gz [root@jodoi-server ~]# mv squirrelmail-1.4.15 squirrelmail [root@jodoi-server squirrelmail]# pwd

(8)

Squirrelmail Web Mail

[root@jodoi-server config]# pwd

/var/www/html/squirrelmail/config

[root@jodoi-server config]# rm -f config.php [root@jodoi-server config]# ./conf.pl

config 3 Menu

1. Organization Preferences 2. Server Settings and 3. General Options

Squirrelmail Web Mail

1. Organization Preferences

SquirrelMail Configuration : Read: config_default.php (1.4.0)

---Organization Preferences

1. Organization Name : Jodoi Webmail

2. Organization Logo : ../images/sm_logo.png 3. Org. Logo Width/Height : (308/111)

(9)

Squirrelmail Web Mail

2. Server Settings

SquirrelMail Configuration : Read: config_default.php (1.4.0)

---Server Settings General

---1. Domain : jodoi-server.com 2. Invert Time : false

3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other) B. Update SMTP Settings : localhost:25

Squirrelmail Web Mail

3. General Options

SquirrelMail Configuration : Read: config.php (1.4.0)

---General Options

1. Data Directory : /var/www/html/squirrelmail/data/ 2. Attachment Directory : /var/www/html/squirrelmail/data/ 3. Directory Hash Level : 0

4. Default Left Size : 150

(10)

Squirrelmail Web Mail

S Save data

Q Quit

Command >> s

Data saved in config.php Press enter to continue...

Command >> q

[root@jodoi-server config]# chmod -fR 777

/var/www/html/squirrelmail/data/

[root@jodoi-server config]# service httpd restart Stopping httpd: [ OK ]

Starting httpd: [ OK ]

Read Thai

10. Languages

2. Default Charset : utf8

(11)

Squirrelmail Web Mail

(12)

Squirrelmail Web Mail

Mail Server

# vi /var/named/zone.jodoi-server.com @ IN A 192.168.1.220 @ IN NS ns1.jodoi-server.com. @ IN MX 10 mail.jodoi-server.com. @ IN MX 20 pop3.jodoi-server.com. @ IN MX 30 smtp.jodoi-server.com. www IN A 192.168.1.220 ns1 IN A 192.168.1.220 mail IN A 192.168.1.220 pop3 IN A 192.168.1.220 smtp IN A 192.168.1.220

(13)

References

Related documents

The Simple Mail Transfer Protocol (SMTP), on the other hand, governs the transfer of outbound e-mail from the sending client to the e-mail server (MDA), as well as the transport

Mail Architecture Client Person A Outgoing Server SMTP Client SMTP User Mail Boxes Inbound Server IMAP Internet SMTP POP3..

- Email from: address to be used by PBX to send emails - SMTP mail server: mail server address used by the company - Port: listening port of the SMTP server.. - SMTP

mail, or you are sending through the SMTP service on another computer, select the Log on Using Secure Password Authentication (SPA) option on the Outgoing Server tab in the

On the Outgoing E-Mail Settings page, in the Mail Settings section, type the SMTP server name for outgoing email (for example, mail.metropolia.fi) in the Outbound SMTP server

A-PDF Mailer uses either your current e-mail client such as Microsoft Outlook, Outlook Express, SMTP (Simple Mail Transfer Protocol) Internet E-mail server!. SMTP is the de

Sender E-mail Information Tab: SMTP Server : Select this option if your mail server uses SMTP, and enter the IP address of your mail server (Figure 6). POP 3 Server: Select

• SMTP protocol between mail servers to send email messages. • client: sending mail server • server: receiving