免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 995 | 回复: 0
打印 上一主题 下一主题

Linux系统管理工具包: 监视邮件的使用情况 [转] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-21 11:52 |只看该作者 |倒序浏览
Linux系统管理工具包: 监视邮件的使用情况
                                               
                                               
                                                                                                                                                                                                                        本文研究用于报告电子邮件使用情况,以及获得邮箱使用情况统计信息的方法。电子邮件日志可以提供有关您的用户及其电子邮件使用习惯的大量信息,包括他们使用电子邮件的频繁程度。根据具体使用的 UNIX 系统,您甚至可以收集一些更加详细的信息,如确定哪些用户正高效地使用他们的文件夹、哪些用户能够从进一步的培训和建议中受益。
关于本系列
典型的 UNIX 管理员拥有一套经常用于辅助管理过程的关键实用工具、诀窍和系统。存在各种用于简化不同过程的关键实用工具、命令行链和脚本。其中一些工具来自于操作系统,而大部分的诀窍则来源于长期的经验积累和减轻系统管理员工作压力的要求。本系列文章主要专注于最大限度地利用各种 UNIX 环境中可用的工具,包括简化异构环境中的管理任务的方法。
分析电子邮件日志
对于不同的电子邮件处理程序所生成的日志,其中可能包含大量有价值的信息。在这些日志中具体包含哪些信息,这取决于您正使用的邮件系统(sendmail、postfix、qmail 等等),但下面列出了一些您可以提取的信息的示例,具体包括:
    * 电子邮件收发速率和数量
    * 每个用户的电子邮件收发速率
    * 发送和接收电子邮件的常用主机和域
    * 垃圾邮件和病毒的数量,并进行过滤
分析日志可以为您提供有关您的组织如何使用电子邮件的有价值的信息。对日志进行解析可能是一项非常复杂的处理过程,并且解析结果的质量在很大程度上取决于
日志的格式,以及在解析文件以获取相关信息的过程中所涉及的复杂程度。例如,如果您查看由 postfix mail transfer agent
(MTA) 产生的日志,那么您可以看到,每一条消息的信息分布在多行内容中(请参见清单 1)。
清单 1. 从原始电子邮件日志中提取信息引用:Nov 17 03:17:34 narcissus postfix/smtpd[14281]: connect from localhost[127.0.0.1]
Nov 17 03:17:34 narcissus postfix/smtpd[14281]: 4F4CB1109404:
  client=localhost[127.0.0.1]
Nov 17 03:17:34 narcissus postfix/cleanup[14278]: 4F4CB1109404:
  message-id=
Nov 17 03:17:34 narcissus postfix/qmgr[104]: 4F4CB1109404:
from=, size=7632, nrcpt=1 (queue active)
Nov 17 03:17:34 narcissus postfix/smtpd[14281]: disconnect from localhost[127.0.0.1]
Nov 17 03:17:34 narcissus postfix/smtp[14279]: DBA5B11093FD:
to=, relay=127.0.0.1[127.0.0.1], delay=11,
  status=sent (250 2.6.0 Ok, i
d=08640-07, from MTA([127.0.0.1]:10025): 250 Ok: queued as 4F4CB1109404)
Nov 17 03:17:34 narcissus postfix/qmgr[104]: DBA5B11093FD: removed
Nov 17 03:17:34 narcissus postfix/pipe[14283]: 4F4CB1109404:
  to=, relay=cyrus, delay=0,
  status=sent (gendarme.example.com)
Nov 17 03:17:34 narcissus postfix/qmgr[104]: 4F4CB1109404: removed
Nov 17 03:20:07 narcissus postfix/smtpd[14355]:
  connect from narcissus.example.com[192.168.0.110]
Nov 17 03:20:07 narcissus postfix/smtpd[14355]:
  disconnect from narcissus.example.com[192.168.0.110]
Nov 17 03:20:07 narcissus postfix/smtpd[14355]:
  connect from narcissus.example.com[192.168.0.110]
Nov 17 03:20:07 narcissus postfix/smtpd[14355]:
  disconnect from narcissus.example.com[192.168.0.110]
Nov 17 03:23:16 narcissus postfix/smtpd[14410]:
  connect from f048226119.adsl.alicedsl.de[78.48.226.119]
Nov 17 03:23:17 narcissus postfix/smtpd[14410]: 6CAAE1109461:
  client=f048226119.adsl.alicedsl.de[78.48.226.119]
Nov 17 03:23:17 narcissus postfix/cleanup[14411]: 6CAAE1109461:
  message-id=
Nov 17 03:23:17 narcissus postfix/qmgr[104]: 6CAAE1109461:
  from=, size=2051, nrcpt=1 (queue active)
Nov 17 03:23:18 narcissus postfix/smtpd[14410]:
  disconnect from f048226119.adsl.alicedsl.de[78.48.226.119]
Nov 17 03:23:30 narcissus postfix/smtpd[14414]: connect from localhost[127.0.0.1]
Nov 17 03:23:30 narcissus postfix/smtpd[14414]:
  62E941109473: client=localhost[127.0.0.1]
Nov 17 03:23:30 narcissus postfix/cleanup[14411]: 62E941109473:
  message-id=
Nov 17 03:23:30 narcissus postfix/qmgr[104]: 62E941109473:
  from=, size=3220, nrcpt=1 (queue active)
Nov 17 03:23:30 narcissus postfix/smtpd[14414]:
  disconnect from localhost[127.0.0.1]幸运的是,通过使用为每封电子邮件所给定的唯一引用编号,您可以在系统中标识对每个消息的处理过程。例如,清单 2 显示了引用编号为 4F4CB1109404 的一封电子邮件,您可以使用该编号获得相关的信息,以确定要提取哪些内容。
清单 2. 从单个邮件传输中提取相关信息引用:Nov 17 03:17:34 narcissus postfix/smtpd[14281]: 4F4CB1109404:
  client=localhost[127.0.0.1]
Nov 17 03:17:34 narcissus postfix/cleanup[14278]: 4F4CB1109404:
  message-id=
Nov 17 03:17:34 narcissus postfix/qmgr[104]: 4F4CB1109404:
  from=, size=7632, nrcpt=1 (queue active)
Nov 17 03:17:34 narcissus postfix/pipe[14283]: 4F4CB1109404:
  to=, relay=cyrus, delay=0, status=sent
  (gendarme.example.com)
Nov 17 03:17:34 narcissus postfix/qmgr[104]: 4F4CB1109404: removed从提取的信息中,您可以看到能够从日志中获取的不同信息类型,如:
    * 日期和时间
    * 发送者
    * 接收者
    * 消息大小
    * 消息计数
通过对文件内容进行解析,您可以为这些不同元素的组合创建一些有意义的统计信息,以便更清楚地了解电子邮件的使用方式。
对日志文件进行解析以获取相关信息
要解析相关的内容,您需要标识出每封不同的电子邮件。要做到这一点是完全可能的,因为 MTA 为每封电子邮件嵌入了唯一的 ID,通常插入到日志文件输出中。例如,在下面一行内容中:引用:Nov 17 03:17:34 narcissus postfix/pipe[14283]:
4F4CB1109404: to=, \
relay=cyrus, delay=0, status=sent (gendarme.example.com)唯一的 ID 是十六进制值 4F4CB1109404,并且您还可以从这一行内容中确定接收者的地址。可以在包含相同的嵌入 ID 的另一行内容中找到这封电子邮件的发送者:引用:Nov 17 03:17:34 narcissus postfix/qmgr[104]:
4F4CB1109404: from=\
, size=7632, nrcpt=1 (queue active)这些信息不一定是顺序的,因为 MTA 可能同时处理多封电子邮件,并且在处理过程的不同部分完成时,会将信息写入到日志中。
从上面的一行内容中,您还可以看到电子邮件的总计大小(7632 字节)以及接收者的数目(一个)。
清单 3 显示了一个 Perl 脚本,该脚本可以对信息进行整理,然后输出电子邮件数量及其总计大小的汇总统计信息。
清单 3. 对日志进行解析以获得一些有用的统计信息复制内容到剪贴板代码:#!/usr/bin/perl
#
# Script to extract email statistics from log files
# Time::ParseDate will be used parse the time into an epoch
# value, and then DateTime can be used to reformat the date
# again
use Time::ParseDate;
use DateTime;
# Parse the first file on the command line
open(MAIL,$ARGV[0]) or die "Couldn't open $ARGV[0]: $!\n";
# Create a structure to hold the stats
my $mails = {};
# Parse each line of the file
while()
{
    chomp;
    my $mailid = 0;
# Look for the 12 digit hex mail ID
    if (m/: ([A-Z0-9]{12}):/)
    {
        $mailid = $1;
    }
# Extract the date and parse it into an Epoch value
    if (m/(\S+ \d+ \d{2}:\d{2}:\d{2}) .*? $mailid/)
    {
        $mails->{$mailid}->{date} = parsedate($1);
    }
# Extract the sender address and email size
    if (m/$mailid: from=, size=(\d+),/)
    {
        $mails->{$mailid}->{from} = $1;
        $mails->{$mailid}->{size} = $2;
    }
# Extract the recipient
    if (m/$mailid: to=/)
    {
        $mails->{$mailid}->{to} = $1;
    }
}
close(MAIL);
# Compile together the stats by parsing the formatted
# information into another summary structure
my $mailstats = {};
foreach my $mailid (keys %{$mails})
{
# Don't create a summary entry if we don't have enough information
# (sender/recipient is empty)
    if (!defined($mails->{$mailid}->{to}) ||
        !defined($mails->{$mailid}->{from}) ||
        $mails->{$mailid}->{to} !~ m/[a-z]/ ||
        $mails->{$mailid}->{from} !~ m/[a-z]/)
    {
        next;
    }
# Count the number of emails to each recipient
    $mailstats->{$mails->{$mailid}->{to}}->{count}++;
# Sum up the email size to each recipient
    $mailstats->{$mails->{$mailid}->{to}}->{size} +=
        $mails->{$mailid}->{size};
# Count the number of emails from each sender
    $mailstats->{$mails->{$mailid}->{from}}->{count}++;
# Sum up the email size from each sender
    $mailstats->{$mails->{$mailid}->{from}}->{size} +=
        $mails->{$mailid}->{size};
# Sum up the same information, but organized on a date by date basis
    if (defined($mails->{$mailid}->{date}))
    {
        my $dt = DateTime->from_epoch(
            epoch => $mails->{$mailid}->{date})->ymd('');
        my $mailto = $mails->{$mailid}->{to};
        my $mailfrom = $mails->{$mailid}->{from};
        $mailstats->{$mailto}->{_date}->{$dt}->{count}++;
    $mailstats->{$mailto}->{_date}->{$dt}->{size} +=
            $mails->{$mailid}->{size};
        $mailstats->{$mailfrom}->{_date}->{$dt}->{count}++;
    $mailstats->{$mailfrom}->{_date}->{$dt}->{size} +=
            $mails->{$mailid}->{size};
    }
}
# Dump out the information show mail counts and mail sizes
# on a mail address basis
foreach my $address (sort keys %{$mailstats})
{
# Only show information    from email addresses that are   
# local
    if ($address =~ m/@.*example\.com$/)
    {
        printf('%-40s %5d %9d',
               $address,
               $mailstats->{$address}->{count},
               $mailstats->{$address}->{size});
    print("\n");
    }
}对示例日志文件运行该脚本,将产生一些相关的统计信息,从而显示指定域的邮件数量和大小(请参见清单 4)。您所打印出的实际信息要比您可能产生的信息少得多。可以对统计信息进行整理,以便输出每天的信息,这样做可以帮助显示每天的邮件数量,以使您可以更好地了解邮件服务器上的负载级别。
清单 4. 生成的统计信息引用:023649@gendarme.example.com                    5      8922
admin@gendarme.example.com
                     5     13141
answersquad@gendarme.example.com
              50    348712
buy@gendarme.example.com
                      79    806097
buy@example.com
                                2      2911
dev@gendarme.example.com
                     165   1010980
dev@example.com
                                8     94430
finance@gendarme.example.com
                   4     14493
flummox@gendarme.example.com
                 203    858775
klhxs@example.com
                              4      8080
dj@gendarme.example.com
                       96    703754
dj@example.com
                                 2      2063
mcwhoever@gendarme.example.com
                 7    137185
mlists@gendarme.example.com
                   38    473165
play@gendarme.example.com
                     26    155220
postmaster@gendarme.example.com
                5     15561
fhf@gendarme.example.com
                     101    836863
fhffilter@gendarme.example.com
                14    225081
spam@gendarme.example.com
                     49    349750
tmbg-org-dj@gendarme.example.com
              16    126144
ybxmbjw@gendarme.example.com
                   1      1342从这个示例数据中,您可以看到,某些用户接收了大量的邮件,相比而言,其他一些用户则很少使用邮件。
在这个示例中,相关的信息告诉您,需要更加关注那些接收大量邮件的用户,以确定他们是否正有效地使用他们的电子邮件。
如果您正使用单个邮件服务器,并且您知道该服务器已经接近过载,那么您可以考虑对用户进行划分,将少数频繁使用邮件的用户移动到单个服务器,而将较少使用邮件的用户放置到另一个服务器,以便有效地对负载进行划分。
接下来,让我们使用该信息作为指导,更仔细地查看一些频繁使用邮件的用户,以确定他们如何存储和组织他们的电子邮件。
邮箱存储格式
一种更广泛使用的、监视邮件使用情况的方法(并且可能存在争议)是,查看每个用户如何使用邮件,并分析他们的电子邮件。这种方法的问题在于,某些用户将这种分析活动视为一种侵入,而其他用户则认为他们有权利决定如何组织和归档他们的电子邮件。
实际上,了解您的用户如何组织他们的电子邮件,可能会对性能、电子邮件的备份策略,以及容量规划产生影响,因为这样做使得您可以确定系统中的哪些部分使用得最为频繁。
事实上,阅读他人的电子邮件并不是一种好的方法,但是通过使用一些非常简单的技术(并不需要阅读他人的消息),您仍然可以从用户的邮箱中收集到大量的信息。另外请记住,您所使用的电子邮件解决方案也将影响能够收集到的信息。
大多数现代的电子邮件解决方案都使用 Internet Mail Access Protocol (IMAP)
系统来存储电子邮件。其中,电子邮件存储在服务器上,而客户端通过访问电子邮件文件夹来读取相关的内容。这种系统允许不同的客户端连接到服务器并访问信
息,这正是该系统的一个优点。因为所有的电子邮件都位于单个服务器中,所以在旅行时进行备份和访问(直接访问、或者从某家旅馆进行访问)电子邮件是比较容
易的。
所有的电子邮件都存储于 IMAP 服务器的后端。大多数系统使用了两种存储方法之一,单个文件或者
Maildir。前一种方法使用单个文件来保存所有的电子邮件,有时可能将其更改为一个系统,其中使用单个文件来保存每个文件夹的邮件。使用单个文件可能
会存在一些问题,特别是在多用户的系统中,因为在使用单个、较大的文件时,可能会出现与其相关联的文件锁定和性能问题。
最佳的解决方案是 Maildir 格式,其中使用文件系统中的标准目录来表示邮件文件夹,并且使用不同的文件来表示每个不同的电子邮件消息。这种方法可以提供更快和更有效的访问。
然而,在单个位置存储大量的邮件会使得这两种系统中都存在潜在的问题。使用单个文件解决方案,性能和出现破坏的可能性都是不容忽视的方面。使用
Maildir
格式,如果在单个目录中保存了大量的文件,有些系统可能会出现性能问题。这是一个文件系统的问题,而不是邮件系统的问题,但是该问题仍然需要解决。
您可以使用邮箱使用情况报告来确定添加一个新的服务器是否可以缓解这个问题,或者某些用户是否需要对他们的电子邮件进行组织,以便提高服务器的整体性能。
获得一些基本的邮箱使用情况统计信息
要查看您的用户如何对其电子邮件进行组织,最简单的方法之一是运行简单的磁盘使用情况报告。这可以帮助突出显示是否某些用户在服务器上存储了大量的电子邮件,并显现出需要解决的大部分繁重负载。
下面的示例所使用的邮件服务器是 Cyrus IMAP,它使用了 Maildir 格式,但是相同的基本原则也适用于使用单个文件进行邮件存储的解决方案。清单 5 显示了某些用户的简单磁盘使用情况报告。
清单 5. 获得磁盘使用情况统计信息引用:$ du -sk *
20      admin
1020    appleby
45828   applicants
13264   buy
11704   dev
11200   finance
52      gordon
25720   mc
472     mcantrip
4340    mlists
120952  myeling
12      nutshell
1812    play
1104    postmaster
1468    quarantine
36      questions
78940   fhf
4156    fhfarc
2444    spam如果您希望强制实施邮件配额,那么您可以将这个阶段的信息输出与全局的、或者每个用户的配额进行比较,并向用户提供某种类型的警告。然而,配额只能够告诉用户是否快耗尽了磁盘空间。它们无法告诉用户是否存在更好的方式来组织他们的电子邮件、或者更好地利用可用的空间。
要找出某个用户是否充分地利用了将电子邮件存储于不同文件夹的功能,可以使用 find 以执行更加详细的分析。例如,您可以请求使用 Maildir
格式的每个目录的磁盘使用情况报告。find 将搜索这些目录,而 sort 命令将确保按照目录的名称顺序返回相关的信息(请参见清单
6)。对输出进行了适当的裁减,以便突出显示特定的区域。
清单 6. 获得每个文件夹的磁盘使用状态引用:$ find . -type d -exec du -sk {} \; |sort -t. +1
...
45828   ./applicants
1964    ./brady
616     ./brady/Article Comments
1304    ./brady/Editors
...
11200   ./finance
4160    ./finance/Banking
12      ./finance/Insurance
1192    ./finance/Other
5476    ./finance/Rewards
296     ./finance/Surveys
...
78940   ./sandra
...
460     ./sandra/Nutshell
3444    ./sandra/Orders
1484    ./sandra/SANDRA-general
40920   ./sandra/Sent Mail
1264    ./sandra/Tracey
1984    ./sandra/eBay
...在
这个示例中,有三个用户出现了极端的情况。applicants 使用单个邮件文件夹存储其所有的邮件,而 finance
则合理地将其电子邮件分散到不同的文件夹中,以便进行组织。同时,sandra
看上去对电子邮件进行了合理的组织,但是仅使用了一个文件夹来保存她所发送的所有电子邮件。
可能需要向 applicants 和 sandra 提供相关的建议,以指出如何更好地组织他们的电子邮件。但是您是否可以为他们提供帮助呢?
自动地对电子邮件进行归档
有许多解决方案可以归档和自动地组织电子邮件。其中有些解决方案嵌入到了您的客户端中,有些解决方案嵌入到了邮件服务器中。例如,Cyrus IMAP 服务器附带了 Sieve 系统(请参见参考资料),它可以在电子邮件传递到用户的邮箱时,对其进行自动过滤。
尽管这样做可以帮助过滤新的电子邮件,但是对于现有的电子邮件,仍然需要手工地进行组织。要完成这项任务,其中一种方法是使用脚本,该脚本可以像任何其他的客户端那样访问邮箱,然后根据脚本中嵌入的某些规则,组织和过滤您的电子邮件。
清单 7 显示了一个 Perl 脚本,它可以像客户端那样访问电子邮件文件夹,并处理其中的内容。在这个示例中,该脚本在原始文件夹中创建了一个新的子文件夹结构,并按照电子邮件的日期对其进行组织,每年一个文件夹,并且在其中为每个月创建一个文件夹。
清单 7.根据日期自动地对某个文件夹中的电子邮件进行重新组织复制内容到剪贴板代码:#! /usr/bin/perl
# Mail filter to file mail on a date basis
use Mail::IMAPClient;
use Date::Parse;
use Data::Dumper;
use strict;
use warnings;
# The IMAP Server
my $Server     = 'imap.example.com';
# The Mailbox we want to filter
my $INBOX      = "Sent-Mail";
# Open the server connection
my $IMAP = Mail::IMAPClient -> new (Server   => $Server,
                                    User     => 'user',
                                    Password => 'password',);
# Open the mailbox we want to filter
$IMAP->select($INBOX) or die "Couldn't select $INBOX";
# We want to filter every message, so obtain a list of every
# message by the message ID
my @msgids = $IMAP->search("ALL");
# Don't do anything if there's nothing to process
exit(0) if (scalar @msgids == 0);
# Now parse the message contents to determine
# the From, To, Subject and Address of each message
my $parsed = $IMAP->parse_headers(
                                  $IMAP->Range(\@msgids),
                                  "From",
                                  "To",
                                  "CC",
                                  "Subject",
                                  "Date",
                                  );
# Set up some message counters
my $toprocess = scalar @msgids;
my $processed = 0;
my $counter = 0;
# Process each message
foreach my $msgid (keys %{$parsed})
{
    $processed++;
    # Extract the date, and build a new folder path
    # The new path will split up emails first by
    # year and then by month, all as subfolders
    # of the current folder
    my ($ss,$mm,$hh,$day,$month,$year,$zone) =
      strptime($parsed->{$msgid}->{Date}->[0]);
    # Try another date if the first one couldn't be identified
    if (!defined($year))
    {
        ($ss,$mm,$hh,$day,$month,$year,$zone) =
          strptime($parsed->{$msgid}->{Date}->[1]);
    }
    # default to 2004 if we can't find a year
    if (!defined($year))
    {
         $year = 2004;
    }
    # Make some assumptions about the year
    # Occasionally a date will contain only two digits
    # So assume it's either in the year 2000, or 1990+
    $year += 2000 if ($year 90) && ($year  message_string($msgid);
    # Try to change to the destination folder,
    # or create it if we couldn't select the folder
    my $selectstat = $IMAP->select($destfolder);
    unless ($selectstat)
    {
         $IMAP->create($destfolder);
    }
    # Go back to the Inbox so that we select the right message
    # next time round
    $IMAP->select($INBOX);
    # Add the original message to the new folder
    my $AppendStatus = $IMAP -> append_string($destfolder,$Message);
    # When you add a message to a folder, the message
    # is marked as unread, so mark all the messages
    # in the folder as read by reading them
    $IMAP->select($destfolder);
    my @unseenMIDs = $IMAP->unseen();
    foreach my $MID (@unseenMIDs)
    {
         $IMAP->message_string($MID);
    }
    # Go back to the original folder, and delete the message
    # if it was successfully moved
    $IMAP->select($INBOX);
    if ($AppendStatus)
    {
        $IMAP -> delete_message($msgid);
    }
    $counter++;
}
# Print out a summary of what we achieved
printf("Processed %5d out of %5d msgs\r",$counter,$toprocess);
# Make sure we clean out the folder where we deleted messages
# and then disconnect
$IMAP->expunge();
$IMAP->disconnect();这个脚本要求您提供该用户的登录名和密码,但是您可以很容易地对该脚本进行改写,以便从命令行中接受该信息,这样一来,用户就可以在需要的时候在命令行中执行这个脚本了。
对某个文件夹运行这个脚本,如 Sent Mail 文件夹,可以合理地组织相关信息,当您再次运行该脚本时可以看到这一点,如清单 8 中所示。
清单 8. 经过过滤的邮箱具有更合理的结构引用:28932    ./martin/Sent Mail
15288    ./martin/Sent Mail/2006
416      ./martin/Sent Mail/2006/03
812      ./martin/Sent Mail/2006/04
684      ./martin/Sent Mail/2006/05
2068     ./martin/Sent Mail/2006/06
2576     ./martin/Sent Mail/2006/07
772      ./martin/Sent Mail/2006/08
708      ./martin/Sent Mail/2006/09
1104     ./martin/Sent Mail/2006/10
3308     ./martin/Sent Mail/2006/11
2840     ./martin/Sent Mail/2006/12
13632    ./martin/Sent Mail/2007
908      ./martin/Sent Mail/2007/01
884      ./martin/Sent Mail/2007/02
1596     ./martin/Sent Mail/2007/03
864      ./martin/Sent Mail/2007/04
1532     ./martin/Sent Mail/2007/05
1448     ./martin/Sent Mail/2007/06
1116     ./martin/Sent Mail/2007/07
2092     ./martin/Sent Mail/2007/08
2220     ./martin/Sent Mail/2007/09
972      ./martin/Sent Mail/2007/10对原始脚本的一处修改是解析消息内容,并根据电子邮件发送者或者主题对邮件进行归档。
与典型的服务器或者客户端邮件归档系统相比,这种解决方案的主要优点是,您可以针对现有的邮箱使用它。许多服务器和客户端邮件系统仅对“传入的”或者“新的”电子邮件进行归档,并且在电子邮件到达用户的邮箱之后便失去了作用。
在有些情况下,您甚至可以使用它作为一种自动化的处理过程,并作为电子邮件系统中的一部分。您可以设置各种自动的文件归档程序,以便在用户将电子邮件放到某个电子邮件文件夹时自动地执行,并在每天晚上自动地将电子邮件移动到预定义的位置。
对于这项技术,其他的用途还包括:当用户的某个文件夹中(尤其是在收件箱中)存放了大量的电子邮件时,向其发出警告;或者自动地将电子邮件归档到某个文件
夹中,以便在用户的收件箱中仅存放最近的内容。如果您使用全局邮箱(例如,支持客户对其进行查询),那么自动归档方法将成为一种有效地组织和过滤电子邮件
的方法,以便稍后能够再次对其定位。
在使用自动化客户关系管理 (CRM) 系统时,通常使用一个编号来跟踪问题。您可以很容易地设置一个自动的文件归档程序,比如前面介绍的归档程序,以便根据问题的编号来过滤电子邮件,将其存放于合适的文件夹。
请注意,这种方法并不能替代服务器端、或者客户端的过滤工作,但是它可以作为这些过滤工作的一种扩展,提供更高的灵活性、更多的信息和支持。
总结
在本文中,您研究了提取有关服务器中用户级电子邮件使用情况更多信息的一些主要方法。这些信息并不是用来确定整个服务器是否高效地运行,而是用来确定您的用户是否充分地利用了可用的服务,以及他们使用系统的效率如何。
对电子邮件日志进行解析以确定占用较大容量的用户,是进行这项处理工作的开始。您可以找出哪些用户正在发送和接收大部的电子邮件,并确定是否需要将某些用户移动到其他服务器、或者需要更仔细地关注哪些用户以确定他们的电子邮件使用情况。
对于后面这种情况,可以更仔细地分析这些用户的邮箱和邮件归档方法,因为这样做能够为您提供帮助。甚至更好的是,通过使用脚本对其中的信息进行解析,并将邮件消息移动到一个更合适的结构中,您可以对邮箱的内容进行重新过滤。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6088/showart_1656848.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP