Журнал лабораторных работ

Содержание

Журнал

Среда (04/05/06)

/dev/ttyv0
13:49:14
#dig version.bind. chaos txt @vo.unix.nt
dig: couldn't get address for 'vo.unix.nt': not found
13:50:27
#dig version.bind. chaos txt @192.168.15.22
; <<>> DiG 9.3.1 <<>> version.bind. chaos txt @192.168.15.22
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16999
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind.                  CH      TXT
;; ANSWER SECTION:
version.bind.           0       CH      TXT     "MS-Dos 1_2_3"
;; AUTHORITY SECTION:
version.bind.           0       CH      NS      version.bind.
;; Query time: 1 msec
;; SERVER: 192.168.15.22#53(192.168.15.22)
;; WHEN: Wed Apr  5 13:50:38 2006
;; MSG SIZE  rcvd: 69
13:50:39
#dig version.bind. chaos txt @fbsd2.vo.unix.nt
; <<>> DiG 9.3.1 <<>> version.bind. chaos txt @fbsd2.vo.unix.nt
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46820
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind.                  CH      TXT
;; ANSWER SECTION:
version.bind.           0       CH      TXT     "MS-Dos 1_2_3"
;; AUTHORITY SECTION:
version.bind.           0       CH      NS      version.bind.
;; Query time: 1 msec
;; SERVER: 192.168.15.22#53(192.168.15.22)
;; WHEN: Wed Apr  5 13:50:57 2006
;; MSG SIZE  rcvd: 69
13:50:57
#xinit
X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: FreeBSD 6.0 i386 [ELF]
Current Operating System: FreeBSD fbsd2.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr  3 14:33:41 EEST 2006     root@fbsd2.unix.nt:/usr/src/sys/i386/compile/MAIN i386
Build Date: 12 October 2005
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
...
The application 'metacity' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
The application 'gnome-panel' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
The application 'nautilus' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
xinit:  connection to X server lost.
прошло 54 минуты
14:45:47
#ls -l /etc/mail
total 248
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1618 Nov  3 10:12 aliases
-rw-r-----  1 root  wheel  16384 Mar 31 22:05 aliases.db
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
14:46:22
#vi local-host-names
14:50:05
#ls -l /etc/mail
total 248
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1618 Nov  3 10:12 aliases
-rw-r-----  1 root  wheel  16384 Mar 31 22:05 aliases.db
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
14:50:39
#ls
PROTO.localhost-v6.rev  make-localhost          rndc.key
PROTO.localhost.rev     master                  slave
dynamic                 named.conf
local-host-names        named.root
14:50:50
#mv local-host-names /etc/mail/

14:51:01
#pwd
/etc/namedb
14:51:37
#cd ..

14:51:42
#cd mail

14:51:46
#ls -l
total 250
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1618 Nov  3 10:12 aliases
-rw-r-----  1 root  wheel  16384 Mar 31 22:05 aliases.db
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel     29 Apr  5 14:50 local-host-names
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
14:51:55
#vi local-host-names
14:52:40
#cat access.sample
# $FreeBSD: src/etc/mail/access.sample,v 1.3 2000/11/02 23:40:40 dirk Exp $
#
# Mail relay access control list.  Default is to reject mail unless the
# destination is local, or listed in /etc/mail/local-host-names
#
cyberspammer.com                550 We don't accept mail from spammers
FREE.STEALTH.MAILER@            550 We don't accept mail from spammers
another.source.of.spam          REJECT
okay.cyberspammer.com           OK
128.32                          RELAY
14:54:04
#pwd
/etc/mail
14:58:16
#ls -l
total 356
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1618 Nov  3 10:12 aliases
-rw-r-----  1 root  wheel  16384 Mar 31 22:05 aliases.db
-rw-r--r--  1 root  wheel  57745 Apr  5 14:55 fbsd2.unix.nt.cf
-rw-r--r--  1 root  wheel   4113 Apr  5 14:55 fbsd2.unix.nt.mc
-rw-r--r--  1 root  wheel  40398 Apr  5 14:55 fbsd2.unix.nt.submit.cf
-r--r--r--  1 root  wheel    894 Apr  5 14:55 fbsd2.unix.nt.submit.mc
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel     44 Apr  5 14:52 local-host-names
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
14:58:23
#vi fbsd2.unix.nt.mc
14:59:33
#vi /etc/rc.conf
15:00:25
#/etc/rc.d/sendmail start
sendmail already running? (pid=444).
15:00:48
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
15:00:55
#vi /etc/aliases
15:02:04
#vi /etc/aliases
15:02:25
#newaliases
/etc/mail/aliases: line 19: Non-continuation line starts with space
/etc/mail/aliases: 27 aliases, longest 10 bytes, 275 bytes total
15:02:32
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
15:03:13
#echo hello | mail -s 'mail test' user

15:04:03
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt

/dev/ttyv3
15:04:21
$mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/user": 1 message 1 new
>N  1 user@fbsd2.unix.nt    Wed Apr  5 15:04  18/668   "mail test"
&
Message 1:
From user@fbsd2.unix.nt Wed Apr  5 15:04:03 2006
Date: Wed, 5 Apr 2006 15:04:03 +0300 (EEST)
From: NT-BSDNet Student #2 <user@fbsd2.unix.nt>
To: user@fbsd2.unix.nt
Subject: mail test
...
& ^CInterrupt
& ^CInterrupt
& ^CInterrupt
& ^CInterrupt
& ^CInterrupt
& ^CInterrupt
& ^CInterrupt
& ^Z
[1]+  Stopped                 mail
You have new mail in /var/mail/user
/dev/ttyv0
15:07:17
#echo hello | mail -s 'zzz' user@fbsd3.unix.nt

/dev/ttyv3
15:07:37
$mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/user": 4 messages 4 new
>N  1 user@fbsd2.unix.nt    Wed Apr  5 15:04  18/668   "mail test"
 N  2 root@fbsd4.unix.nt    Wed Apr  5 15:05  22/908   "mail test PREWED!"
 N  3 root@fbsd1.unix.nt    Wed Apr  5 15:06  22/900   "mail test"
 N  4 MAILER-DAEMON         Wed Apr  5 15:07  71/2454  "Returned mail: see tr"
& q
Held 4 messages in /var/mail/user
You have mail in /var/mail/user
15:09:26
$mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/user": 4 messages 4 unread
>U  1 user@fbsd2.unix.nt    Wed Apr  5 15:04  19/678   "mail test"
 U  2 root@fbsd4.unix.nt    Wed Apr  5 15:05  23/918   "mail test PREWED!"
 U  3 root@fbsd1.unix.nt    Wed Apr  5 15:06  23/910   "mail test"
 U  4 MAILER-DAEMON         Wed Apr  5 15:07  72/2464  "Returned mail: see tr"
& t 4
& q
Saved 1 message in mboxApr  5 15:07:18 2006
Held 3 messages in /var/mail/user300 (EEST)
...
from localhost.unix.nt [127.0.0.1]
   ----- The following addresses had permanent fatal errors -----
<user@qqq.taras.unix.nt>
    (reason: 550 5.7.1 <user@qqq.taras.unix.nt>... Relaying denied)
   ----- Transcript of session follows -----
... while talking to qqq.taras.unix.nt.:
>>> DATA
<<< 550 5.7.1 <user@qqq.taras.unix.nt>... Relaying denied
550 5.1.1 <user@qqq.taras.unix.nt>... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
/dev/ttyv0
15:12:39
#su - user

/dev/ttyp1
15:13:13
$mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/user": 4 messages 1 new 4 unread
 U  1 user@fbsd2.unix.nt    Wed Apr  5 15:04  19/678   "mail test"
 U  2 root@fbsd4.unix.nt    Wed Apr  5 15:05  23/918   "mail test PREWED!"
 U  3 root@fbsd1.unix.nt    Wed Apr  5 15:06  23/910   "mail test"
>N  4 root@fbsd1.unix.nt    Wed Apr  5 15:13  22/900   "mail test"
& 4
Message 4:
From root@fbsd1.unix.nt Wed Apr  5 15:13:00 2006
Date: Wed, 5 Apr 2006 15:14:49 +0300 (EEST)
From: Charlie Root <root@fbsd1.unix.nt>
To: user@fbsd2.unix.nt
Subject: mail test
hello
& q
Saved 1 message in mbox
Held 3 messages in /var/mail/user
/dev/ttyv0
15:13:13
$mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/user": 4 messages 1 new 4 unread
 U  1 user@fbsd2.unix.nt    Wed Apr  5 15:04  19/678   "mail test"
 U  2 root@fbsd4.unix.nt    Wed Apr  5 15:05  23/918   "mail test PREWED!"
 U  3 root@fbsd1.unix.nt    Wed Apr  5 15:06  23/910   "mail test"
>N  4 root@fbsd1.unix.nt    Wed Apr  5 15:13  22/900   "mail test"
& 4
Message 4:
From root@fbsd1.unix.nt Wed Apr  5 15:13:00 2006
Date: Wed, 5 Apr 2006 15:14:49 +0300 (EEST)
From: Charlie Root <root@fbsd1.unix.nt>
To: user@fbsd2.unix.nt
Subject: mail test
hello
& q
Saved 1 message in mbox
Held 3 messages in /var/mail/user
/dev/ttyp1
15:13:44
$xit
bash: xit: command not found
/dev/ttyv0
15:13:44
$xit
bash: xit: command not found
15:14:04
$exit
exit
15:14:08
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt

15:14:24
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt

15:19:56
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt

15:20:49
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt

15:21:12
#whereis qpopper
qpopper: /usr/ports/mail/qpopper
прошло 12 минут
15:33:23
#cd /usr/ports/mail/qpopper

15:33:39
#pwd
/usr/ports/mail/qpopper
15:33:42
#make
                             [  OK  ]       Cancel
===>  Vulnerability check disabled, database not found
===>  Found saved configuration for qpopper-4.0.8
=> qpopper4.0.8.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.qualcomm.com/eudora/servers/unix/popper/.
qpopper4.0.8.tar.gz                           100% of 2702 kB   31 kBps 00m00s
=> qpopper4.0.8-ipv6-20050515.diff.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.imasy.or.jp/~ume/ipv6/.
qpopper4.0.8-ipv6-20050515.diff.gz            100% of   11 kB 4627  Bps
===>  Extracting for qpopper-4.0.8
...
===>   autoconf-2.59_2 depends on file: /usr/local/bin/perl5.8.7 - found
===>  Configuring for autoconf-2.59_2
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether gmake sets $(MAKE)... yes
checking for expr... /bin/expr
checking for gm4... /usr/local/bin/gm4
15:39:24
#make install
===>  Installing for qpopper-4.0.8
===>   Generating temporary packing list
===>  Checking if mail/qpopper already installed
****************************************************************************
To enable the qpopper-daemon, add the following line to your /etc/inetd.conf:
   pop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -s
****************************************************************************
===>   Compressing manual pages for qpopper-4.0.8
===>   Registering installation for qpopper-4.0.8
===> SECURITY REPORT:
      This port has installed the following binaries which execute with
      increased privileges.
/usr/local/bin/qpopauth
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.eudora.com/products/unsupported/qpopper/index.html
15:39:50
#xconv
# This file generated by xconv.pl, included with the xinetd
# package.  xconv.pl was written by Rob Braun (bbraun@synack.net)
#
# The file is merely a translation of your inetd.conf file into
# the equivalent in xinetd.conf syntax.  xinetd has many
# features that may not be taken advantage of with this translation.
# Please refer to the xinetd.conf man page for more information
# on how to properly configure xinetd.
# The defaults section sets some information for all services
defaults
...
{
        flags       = NAMEINARGS
        socket_type = stream
        protocol    = tcp
        wait        = no
        user        = root
        server      = /usr/local/libexec/qpopper
        server_args = qpopper -s
}
^[[B^[[B^[[B^[[B^C
15:42:41
#/etc/rc.d/xinend restart
bash: /etc/rc.d/xinend: No such file or directory
15:43:24
#/usr/local/etc/rc.d/xinend.sh restart
bash: /usr/local/etc/rc.d/xinend.sh: No such file or directory
15:43:59
#/usr/local/etc/rc.d/xinetd.sh restart
Stopping xinetd.
Starting xinetd.
15:44:21
#mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/root": 1 message 1 new
>N  1 root@fbsd2.unix.nt    Wed Apr  5 09:11  28/1063  "Nvi saved the file in"
& q
Held 1 message in /var/mail/root
You have mail in /var/mail/root
15:45:14
#xinit
X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: FreeBSD 6.0 i386 [ELF]
Current Operating System: FreeBSD fbsd2.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr  3 14:33:41 EEST 2006     root@fbsd2.unix.nt:/usr/src/sys/i386/compile/MAIN i386
Build Date: 12 October 2005
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
...
The application 'metacity' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
The application 'gnome-panel' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
The application 'nautilus' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.
xinit:  connection to X server lost.
15:53:06
#echo hello | mail -s 'my adress te' user@qqq.taras.unix.n

15:53:06
#echo hello | mail -s 'my adress tes' user@qqq.taras.unix.

15:53:06
#echo hello | mail -s 'my adress test' user@qqq.taras.unix

15:53:06
#echo hello | mail -s 'my adress test' user@qqq.taras.uni

15:53:06
#echo hello | mail -s 'my adress test' user@qqqtaras.unix.

15:53:06
#echo hello | mail -s 'my adress test' user@qqtaras.unix.n

15:53:06
#echo hello | mail -s 'my adress test' user@qtaras.unix.nt

15:53:06
#echo hello | mail -s 'my adress test' user@

15:53:06
#echo hello | mail -s 'my adress test' user@taras.unix.nt

15:53:57
#cd /etc/mail

15:58:07
#ls -l
total 356
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1609 Apr  5 15:02 aliases
-rw-r-----  1 root  wheel  16384 Apr  5 15:02 aliases.db
-rw-r--r--  1 root  wheel  57745 Apr  5 14:55 fbsd2.unix.nt.cf
-rw-r--r--  1 root  wheel   4113 Apr  5 14:55 fbsd2.unix.nt.mc
-rw-r--r--  1 root  wheel  40398 Apr  5 14:55 fbsd2.unix.nt.submit.cf
-r--r--r--  1 root  wheel    894 Apr  5 14:55 fbsd2.unix.nt.submit.mc
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel     44 Apr  5 14:52 local-host-names
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
15:58:17
#vi fbsd2.unix.nt.mc
/dev/ttyv2
15:59:49
#cd /etc/mail

15:59:59
#ls -l
total 356
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1609 Apr  5 15:02 aliases
-rw-r-----  1 root  wheel  16384 Apr  5 15:02 aliases.db
-rw-r--r--  1 root  wheel  57745 Apr  5 14:55 fbsd2.unix.nt.cf
-rw-r--r--  1 root  wheel   4113 Apr  5 14:55 fbsd2.unix.nt.mc
-rw-r--r--  1 root  wheel  40398 Apr  5 14:55 fbsd2.unix.nt.submit.cf
-r--r--r--  1 root  wheel    894 Apr  5 14:55 fbsd2.unix.nt.submit.mc
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel     44 Apr  5 14:52 local-host-names
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
16:00:02
#cd /usr/share/sendmail/README
bash: cd: /usr/share/sendmail/README: No such file or directory
16:00:45
#cd /usr/share/sendmail

16:00:50
#cat /usr/share/sendmail/README
cat: /usr/share/sendmail/README: No such file or directory
16:01:00
#pwd
/usr/share/sendmail
16:01:10
#cd cf

16:01:20
#cat README
                {VirtHost} are added to class {R}, i.e., relaying is allowed
                to (and from) those domains.  The default map definition is:
                        hash /etc/mail/virtusertable
                A new definition can be specified as the second argument of
                the FEATURE macro, such as
                        FEATURE(`virtusertable', `dbm /etc/mail/virtusers')
virtuser_entire_domain
                If the virtusertable is enabled and VIRTUSER_DOMAIN or
                VIRTUSER_DOMAIN_FILE is used, this feature will cause
                addresses to be searched in the map if their domain
...
                For example, if you specify ``foo.com'', then mail to or
                from foo.com, abc.foo.com, or a.very.deep.domain.foo.com
                will all be accepted for relaying.  This feature changes
                the behaviour to lookup individual host names only.
relay_based_on_MX
                Turns on the ability to allow relaying based on the MX
                records of the host portion of an incoming recipient; that
                is, if an MX record for host foo.com points to your site,
                you will accept and relay mail addressed to foo.com.  See
                description below for more information before using this
16:01:30
#cat /usr/share/sendmail/README|more
16:02:21
#cat README|more
/dev/ttyv0
16:08:47
#/usr/local/etc/rc.d/xinetd.sh restart
Stopping xinetd.
Starting xinetd.
16:09:49
#echo hello | mail -s 'my adress test' user@taras.unix.nt

16:09:58
#vi fbsd2.unix.nt.mc
16:15:49
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/   /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf
16:16:09
#ls -l
total 356
-rw-r--r--  1 root  wheel   6809 Nov  3 10:12 Makefile
-rw-r--r--  1 root  wheel   2896 Nov  3 10:12 README
-rw-r--r--  1 root  wheel    407 Nov  3 10:12 access.sample
-rw-r--r--  1 root  wheel   1609 Apr  5 15:02 aliases
-rw-r-----  1 root  wheel  16384 Apr  5 15:02 aliases.db
-rw-r--r--  1 root  wheel  58260 Apr  5 16:16 fbsd2.unix.nt.cf
-rw-r--r--  1 root  wheel   4144 Apr  5 16:08 fbsd2.unix.nt.mc
-rw-r--r--  1 root  wheel  40398 Apr  5 14:55 fbsd2.unix.nt.submit.cf
-r--r--r--  1 root  wheel    894 Apr  5 14:55 fbsd2.unix.nt.submit.mc
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 freebsd.cf
-rw-r--r--  1 root  wheel   4113 Nov  3 10:12 freebsd.mc
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 freebsd.submit.cf
-r--r--r--  1 root  wheel    894 Nov  3 10:12 freebsd.submit.mc
-r--r--r--  1 root  wheel   5588 Nov  3 10:12 helpfile
-rw-r--r--  1 root  wheel     44 Apr  5 14:52 local-host-names
-rw-r--r--  1 root  wheel    400 Nov  3 10:12 mailer.conf
-rw-r--r--  1 root  wheel    243 Nov  3 10:12 mailertable.sample
-rw-r--r--  1 root  wheel  57791 Nov  3 10:12 sendmail.cf
-r--r--r--  1 root  wheel  40444 Nov  3 10:12 submit.cf
-rw-r--r--  1 root  wheel    569 Nov  3 10:12 virtusertable.sample
16:16:26
#cp fbsd2.unix.nt.cf sendmail.cf

16:17:01
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
554 5.0.0 /etc/mail/sendmail.cf: line 62: unknown configuration line "
"
16:17:50
#vi fbsd2.unix.nt.mc
16:20:47
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/   /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf
16:20:53
#cp fbsd2.unix.nt.cf sendmail.cf

16:20:59
#/etc/rc.d/sendmail restart
sendmail not running? (check /var/run/sendmail.pid).
Starting sendmail.
16:21:01
#vi fbsd2.unix.nt.mc
16:21:38
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/   /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf
16:21:41
#cp fbsd2.unix.nt.cf sendmail.cf

16:21:42
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
16:21:44
#vi fbsd2.unix.nt.mc
16:22:00
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/   /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf
16:22:06
#cp fbsd2.unix.nt.cf sendmail.cf

16:22:10
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
16:22:12
#/etc/rc.d/sendmail restart
Stopping sendmail.
Stopping sendmail_clientmqueue.
Starting sendmail.
16:22:14
#echo hello | mail -s 'my adress test' user@taras.unix.nt

прошло 17 минут
16:39:40
#date
Wed Apr  5 16:39:59 EEST 2006
16:39:59
#time
real    0m0.000s
user    0m0.000s
sys     0m0.000s
16:40:06
#dat etime
bash: dat: command not found
16:40:15
#date time
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
16:40:23
#date now
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
16:40:29
#date
Wed Apr  5 16:40:33 EEST 2006

Файлы

  • README
  • access.sample
  • README
    >
                    {VirtHost} are added to class {R}, i.e., relaying is allowed
                    to (and from) those domains.  The default map definition is:
                            hash /etc/mail/virtusertable
                    A new definition can be specified as the second argument of
                    the FEATURE macro, such as
                            FEATURE(`virtusertable', `dbm /etc/mail/virtusers')
    virtuser_entire_domain
                    If the virtusertable is enabled and VIRTUSER_DOMAIN or
                    VIRTUSER_DOMAIN_FILE is used, this feature will cause
                    addresses to be searched in the map if their domain
                    parts are subdomains of elements in class {VirtHost}.
    ldap_routing    Implement LDAP-based e-mail recipient routing according to
                    the Internet Draft draft-lachman-laser-ldap-mail-routing-01.
                    This provides a method to re-route addresses with a
                    domain portion in class {LDAPRoute} to either a
                    different mail host or a different address.  Hosts can
                    be added to this class using LDAPROUTE_DOMAIN and
                    LDAPROUTE_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and
                    MASQUERADE_DOMAIN_FILE, see below).
                    See the LDAP ROUTING section below for more information.
    nodns           If you aren't running DNS at your site (for example,
                    you are UUCP-only connected).  It's hard to consider
                    this a "feature", but hey, it had to go somewhere.
                    Actually, as of 8.7 this is a no-op -- remove "dns" from
                    the hosts service switch entry instead.
    nullclient      This is a special case -- it creates a configuration file
                    containing nothing but support for forwarding all mail to a
                    central hub via a local SMTP-based network.  The argument
                    is the name of that hub.
                    The only other feature that should be used in conjunction
                    with this one is FEATURE(`nocanonify').  No mailers
                    should be defined.  No aliasing or forwarding is done.
    local_lmtp      Use an LMTP capable local mailer.  The argument to this
                    feature is the pathname of an LMTP capable mailer.  By
                    default, mail.local is used.  This is expected to be the
                    mail.local which came with the 8.9 distribution which is
                    LMTP capable.  The path to mail.local is set by the
                    confEBINDIR m4 variable -- making the default
                    LOCAL_MAILER_PATH /usr/libexec/mail.local.
                    If a different LMTP capable mailer is used, its pathname
                    can be specified as second parameter and the arguments
                    passed to it (A=) as third parameter, e.g.,
                            FEATURE(`local_lmtp', `/usr/local/bin/lmtp', `lmtp')
                    WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally,
                    i.e., without respecting any definitions in an OSTYPE setting.
    local_procmail  Use procmail or another delivery agent as the local mailer.
                    The argument to this feature is the pathname of the
                    delivery agent, which defaults to PROCMAIL_MAILER_PATH.
                    Note that this does NOT use PROCMAIL_MAILER_FLAGS or
                    PROCMAIL_MAILER_ARGS for the local mailer; tweak
                    LOCAL_MAILER_FLAGS and LOCAL_MAILER_ARGS instead, or
                    specify the appropriate parameters.  When procmail is used,
                    the local mailer can make use of the
                    "user+indicator@local.host" syntax; normally the +indicator
                    is just tossed, but by default it is passed as the -a
                    argument to procmail.
                    This feature can take up to three arguments:
                    1. Path to the mailer program
                       [default: /usr/local/bin/procmail]
                    2. Argument vector including name of the program
                       [default: procmail -Y -a $h -d $u]
                    3. Flags for the mailer [default: SPfhn9]
                    Empty arguments cause the defaults to be taken.
                    Note that if you are on a system with a broken
                    setreuid() call, you may need to add -f $f to the procmail
                    argument vector to pass the proper sender to procmail.
                    For example, this allows it to use the maildrop
                    (http://www.flounder.net/~mrsam/maildrop/) mailer instead
                    by specifying:
                    FEATURE(`local_procmail', `/usr/local/bin/maildrop',
                     `maildrop -d $u')
                    or scanmails using:
                    FEATURE(`local_procmail', `/usr/local/bin/scanmails')
                    WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally,
                    i.e.,  without respecting any definitions in an OSTYPE setting.
    bestmx_is_local Accept mail as though locally addressed for any host that
                    lists us as the best possible MX record.  This generates
                    additional DNS traffic, but should be OK for low to
                    medium traffic hosts.  The argument may be a set of
                    domains, which will limit the feature to only apply to
                    these domains -- this will reduce unnecessary DNS
                    traffic.  THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH
                    WILDCARD MX RECORDS!!!  If you have a wildcard MX record
                    that matches your domain, you cannot use this feature.
    smrsh           Use the SendMail Restricted SHell (smrsh) provided
                    with the distribution instead of /bin/sh for mailing
                    to programs.  This improves the ability of the local
                    system administrator to control what gets run via
                    e-mail.  If an argument is provided it is used as the
                    pathname to smrsh; otherwise, the path defined by
                    confEBINDIR is used for the smrsh binary -- by default,
                    /usr/libexec/smrsh is assumed.
    promiscuous_relay
                    By default, the sendmail configuration files do not permit
                    mail relaying (that is, accepting mail from outside your
                    local host (class {w}) and sending it to another host than
                    your local host).  This option sets your site to allow
                    mail relaying from any site to any site.  In almost all
                    cases, it is better to control relaying more carefully
                    with the access map, class {R}, or authentication.  Domains
                    can be added to class {R} by the macros RELAY_DOMAIN or
                    RELAY_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and
                    MASQUERADE_DOMAIN_FILE, see below).
    relay_entire_domain
                    This option allows any host in your domain as defined by
                    class {m} to use your server for relaying.  Notice: make
                    sure that your domain is not just a top level domain,
                    e.g., com.  This can happen if you give your host a name
                    like example.com instead of host.example.com.
    relay_hosts_only
                    By default, names that are listed as RELAY in the access
                    db and class {R} are treated as domain names, not host names.
                    For example, if you specify ``foo.com'', then mail to or
                    from foo.com, abc.foo.com, or a.very.deep.domain.foo.com
                    will all be accepted for relaying.  This feature changes
                    the behaviour to lookup individual host names only.
    relay_based_on_MX
                    Turns on the ability to allow relaying based on the MX
                    records of the host portion of an incoming recipient; that
                    is, if an MX record for host foo.com points to your site,
                    you will accept and relay mail addressed to foo.com.  See
                    description below for more information before using this
    
    access.sample
    >
    # $FreeBSD: src/etc/mail/access.sample,v 1.3 2000/11/02 23:40:40 dirk Exp $
    #
    # Mail relay access control list.  Default is to reject mail unless the
    # destination is local, or listed in /etc/mail/local-host-names
    #
    cyberspammer.com                550 We don't accept mail from spammers
    FREE.STEALTH.MAILER@            550 We don't accept mail from spammers
    another.source.of.spam          REJECT
    okay.cyberspammer.com           OK
    128.32                          RELAY
    

    Статистика

    Время первой команды журнала13:49:14 2006- 4- 5
    Время последней команды журнала16:40:29 2006- 4- 5
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 7.92
    Процент синтаксически неверно набранных команд, % 5.94
    Суммарное время работы с терминалом *, час 1.94
    Количество командных строк в единицу времени, команда/мин 0.87
    Частота использования команд
    mail24|===================| 19.83%
    echo18|==============| 14.88%
    vi11|=========| 9.09%
    cd8|======| 6.61%
    /etc/rc.d/sendmail8|======| 6.61%
    ls8|======| 6.61%
    make6|====| 4.96%
    cat5|====| 4.13%
    pwd4|===| 3.31%
    cp4|===| 3.31%
    date4|===| 3.31%
    dig3|==| 2.48%
    more2|=| 1.65%
    xinit2|=| 1.65%
    /usr/local/etc/rc.d/xinetd.sh2|=| 1.65%
    xit2|=| 1.65%
    /etc/rc.d/xinend1|| 0.83%
    whereis1|| 0.83%
    dat1|| 0.83%
    xconv1|| 0.83%
    newaliases1|| 0.83%
    mv1|| 0.83%
    exit1|| 0.83%
    time1|| 0.83%
    /usr/local/etc/rc.d/xinend.sh1|| 0.83%
    su1|| 0.83%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$