Perl для системного администрирования



              

Получение почты - часть 20


Теперь применим эту программу. Вот два настоящих сообщения в службу поддержки:

Received: from strontium.example.com

(strontium.example.com [192.168.1.114])

by mailhub.example.com (8.8.4/8.7.3) with ESMTP id RAA27043

for <systems>; Thu, 27 Mar 1997 17:07:44 -0500 (EST)

From: User Person <user@example.com>

Received: (user@localhost)

by strontium.example.com (8.8.4/8.6.4) id RAA10500 for systems;

Thu, 27 Mar 1997 17:07:41 -0500 (EST)

Message-Id: <199703272207.RAA10500@strontium.example.com

Subject: [Req #11509] Monitor

To: systems@example.com

Date: Thu, 27 Mar 1997 17:07:40 -0500 (EST)

Hi,

My monitor is flickering a little bit and it is tiresome

when working with it to much.

Is it possible to fix it or changing the monitor?

Thanks. User,

Received: from example.com (user2@example.com [192.168.1.7])

by mailhost.example.com (8.8.4/8.7.3) with SMTP id SAA00732

for <systems@example.com>: Thu. 27 Mar 1997 18:34:54 -0500 (EST)

Date: Thu, 27 Mar 1997 18:34:54 -0500 (EST)

From: Another User <user2@example.com>

To: systems@example.com

Subject: [Req 811510] problems with two computers

Message-Id: <Pine.SUN.3.95.970327183117,23440A-100000ffiexamole.com>

In Jenolen (in room 292), there is a piece of a disk stuck in it.

In intrepid, there is a disk with no cover

 (or whatever you call that silver thing) stuck in it.

We tried to turn off intrepid, but it wouldn't work.

Wo (the proctor on duty and I) tried to get the disk piece out, but it didn't. work.

The proctor in charge decided to put signs on them saying 'out of order'

AnotherUser После запуска программы для этих двух сообщений мы получили:

received: strontium и:

body: jenolen body: intrepid

Оба узла были найдены верно и для этого понадобился лишь небольшой отрывок простого кода. Шагнем дальше и предположим, что поступило такое письмо:

Received: from [192.168.1.118]

(buggypeak.example.com [192.168.1.118])

by mailhost.example.com (8.8.6/8.8.6)

with SMTP id JAA16638 for <systems>;




Содержание  Назад  Вперед