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

Содержание

Журнал

Четверг (06/04/09)

/dev/pts/3
18:02:05
#/etc/
Display all 102 possibilities? (y or n)
alternatives/        dhcp3/               kbd/                 opt/                 rmt
apache2/             dictionaries-common/ kde3/                pam.d/               security/
apm/                 dm/                  kernel/              pango/               service/
apparmor.d/          dpkg/                ldap/                perl/                sgml/
approx/              emacs/               ld.so.conf.d/        pm/                  skel/
apt/                 exim4/               libpaper.d/          PolicyKit/           ssh/
bash_completion.d/   fonts/               lilalo/              ppp/                 ssl/
bind/                gamin/               logcheck/            pulse/               sv/
ca-certificates/     gconf/               logrotate.d/         purple/              sysctl.d/
...
ConsoleKit/          groff/               mail/                rc0.d/               udev/
console-setup/       grub.d/              mdadm/               rc1.d/               ufw/
cron.d/              gtk-2.0/             menu/                rc2.d/               vga/
cron.daily/          hal/                 menu-methods/        rc3.d/               vim/
cron.hourly/         htdig/               modprobe.d/          rc4.d/               X11/
cron.monthly/        iceweasel/           monit/               rc5.d/               xdg/
cron.weekly/         init.d/              mysql/               rc6.d/               xml/
dbus-1/              initramfs-tools/     network/             rc.local
default/             iproute2/            openoffice/          rcS.d/
defoma/              john/                openvpn/             resolvconf/
/dev/pts/8
18:02:05
#/etc/
Display all 102 possibilities? (y or n)
alternatives/        dhcp3/               kbd/                 opt/                 rmt
apache2/             dictionaries-common/ kde3/                pam.d/               security/
apm/                 dm/                  kernel/              pango/               service/
apparmor.d/          dpkg/                ldap/                perl/                sgml/
approx/              emacs/               ld.so.conf.d/        pm/                  skel/
apt/                 exim4/               libpaper.d/          PolicyKit/           ssh/
bash_completion.d/   fonts/               lilalo/              ppp/                 ssl/
bind/                gamin/               logcheck/            pulse/               sv/
ca-certificates/     gconf/               logrotate.d/         purple/              sysctl.d/
...
ConsoleKit/          groff/               mail/                rc0.d/               udev/
console-setup/       grub.d/              mdadm/               rc1.d/               ufw/
cron.d/              gtk-2.0/             menu/                rc2.d/               vga/
cron.daily/          hal/                 menu-methods/        rc3.d/               vim/
cron.hourly/         htdig/               modprobe.d/          rc4.d/               X11/
cron.monthly/        iceweasel/           monit/               rc5.d/               xdg/
cron.weekly/         init.d/              mysql/               rc6.d/               xml/
dbus-1/              initramfs-tools/     network/             rc.local
default/             iproute2/            openoffice/          rcS.d/
defoma/              john/                openvpn/             resolvconf/
/dev/pts/3
18:02:05
#kill -1 inetd
bash: kill: inetd: arguments must be process or job IDs
/dev/pts/8
18:02:05
#kill -1 inetd
bash: kill: inetd: arguments must be process or job IDs
/dev/pts/3
18:02:27
#netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      7304/sendmail: MTA:
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      3554/inetd
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      3554/inetd
tcp        0      0 192.168.15.13:53        0.0.0.0:*               LISTEN      3241/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3263/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      7304/sendmail: MTA:
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3241/named
tcp6       0      0 :::80                   :::*                    LISTEN      3774/apache2
...
unix  2      [ ACC ]     STREAM     LISTENING     11364    3726/X              /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     12628    3945/gnome-keyring- /tmp/keyring-JHVURj/socket
unix  2      [ ACC ]     STREAM     LISTENING     12712    3990/ssh-agent      /tmp/ssh-djFTUz3948/agent.3948
unix  2      [ ACC ]     STREAM     LISTENING     12768    3948/x-session-mana /tmp/.ICE-unix/3948
unix  2      [ ACC ]     STREAM     LISTENING     13206    4049/gconfd-2       /tmp/orbit-user/linc-fd1-0-5695eb60b6ba0
unix  2      [ ACC ]     STREAM     LISTENING     13223    4045/firefox-bin    /tmp/orbit-user/linc-fcd-0-511dec63c7304
unix  2      [ ACC ]     STREAM     LISTENING     13779    4011/pidgin         /tmp/orbit-user/linc-fab-0-674ec004a76c
unix  2      [ ACC ]     STREAM     LISTENING     16024    4656/ssh-agent      /tmp/ssh-HEJsxD4655/agent.4655
unix  2      [ ACC ]     STREAM     LISTENING     10486    3547/lpd            /dev/printer
unix  2      [ ACC ]     STREAM     LISTENING     12767    3948/x-session-mana @/tmp/.ICE-unix/3948
/dev/pts/8
18:02:27
#netstat -lnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      7304/sendmail: MTA:
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      3554/inetd
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      3554/inetd
tcp        0      0 192.168.15.13:53        0.0.0.0:*               LISTEN      3241/named
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3263/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      7304/sendmail: MTA:
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      3241/named
tcp6       0      0 :::80                   :::*                    LISTEN      3774/apache2
...
unix  2      [ ACC ]     STREAM     LISTENING     11364    3726/X              /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     12628    3945/gnome-keyring- /tmp/keyring-JHVURj/socket
unix  2      [ ACC ]     STREAM     LISTENING     12712    3990/ssh-agent      /tmp/ssh-djFTUz3948/agent.3948
unix  2      [ ACC ]     STREAM     LISTENING     12768    3948/x-session-mana /tmp/.ICE-unix/3948
unix  2      [ ACC ]     STREAM     LISTENING     13206    4049/gconfd-2       /tmp/orbit-user/linc-fd1-0-5695eb60b6ba0
unix  2      [ ACC ]     STREAM     LISTENING     13223    4045/firefox-bin    /tmp/orbit-user/linc-fcd-0-511dec63c7304
unix  2      [ ACC ]     STREAM     LISTENING     13779    4011/pidgin         /tmp/orbit-user/linc-fab-0-674ec004a76c
unix  2      [ ACC ]     STREAM     LISTENING     16024    4656/ssh-agent      /tmp/ssh-HEJsxD4655/agent.4655
unix  2      [ ACC ]     STREAM     LISTENING     10486    3547/lpd            /dev/printer
unix  2      [ ACC ]     STREAM     LISTENING     12767    3948/x-session-mana @/tmp/.ICE-unix/3948
/dev/pts/3
18:02:44
#netstat -lnp|less
/dev/pts/8
18:02:44
#netstat -lnp|less
/dev/pts/3
18:03:08
#netstat -n
unix  3      [ ]         STREAM     CONNECTED     19238
unix  3      [ ]         STREAM     CONNECTED     19236    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     19235
unix  3      [ ]         STREAM     CONNECTED     19227    @/tmp/dbus-GLd1GhdMqX
unix  3      [ ]         STREAM     CONNECTED     19226
unix  3      [ ]         STREAM     CONNECTED     19225    @/tmp/dbus-GLd1GhdMqX
unix  3      [ ]         STREAM     CONNECTED     19224
unix  3      [ ]         STREAM     CONNECTED     16565    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     16564
unix  3      [ ]         STREAM     CONNECTED     16487    /var/run/dbus/system_bus_socket
...
unix  3      [ ]         STREAM     CONNECTED     10583    @/var/run/hald/dbus-2KpkIc80LF
unix  3      [ ]         STREAM     CONNECTED     10581
unix  3      [ ]         STREAM     CONNECTED     10547    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10546
unix  3      [ ]         STREAM     CONNECTED     10472    /dev/log
unix  3      [ ]         STREAM     CONNECTED     10471
unix  3      [ ]         STREAM     CONNECTED     10158    /dev/log
unix  3      [ ]         STREAM     CONNECTED     10157
unix  3      [ ]         STREAM     CONNECTED     10134
unix  3      [ ]         STREAM     CONNECTED     10133
/dev/pts/8
18:03:08
#netstat -n
unix  3      [ ]         STREAM     CONNECTED     19238
unix  3      [ ]         STREAM     CONNECTED     19236    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     19235
unix  3      [ ]         STREAM     CONNECTED     19227    @/tmp/dbus-GLd1GhdMqX
unix  3      [ ]         STREAM     CONNECTED     19226
unix  3      [ ]         STREAM     CONNECTED     19225    @/tmp/dbus-GLd1GhdMqX
unix  3      [ ]         STREAM     CONNECTED     19224
unix  3      [ ]         STREAM     CONNECTED     16565    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     16564
unix  3      [ ]         STREAM     CONNECTED     16487    /var/run/dbus/system_bus_socket
...
unix  3      [ ]         STREAM     CONNECTED     10583    @/var/run/hald/dbus-2KpkIc80LF
unix  3      [ ]         STREAM     CONNECTED     10581
unix  3      [ ]         STREAM     CONNECTED     10547    /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10546
unix  3      [ ]         STREAM     CONNECTED     10472    /dev/log
unix  3      [ ]         STREAM     CONNECTED     10471
unix  3      [ ]         STREAM     CONNECTED     10158    /dev/log
unix  3      [ ]         STREAM     CONNECTED     10157
unix  3      [ ]         STREAM     CONNECTED     10134
unix  3      [ ]         STREAM     CONNECTED     10133
/dev/pts/3
18:03:10
#netstat -lnp|grep 110
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      3554/inetd
/dev/pts/8
18:03:10
#netstat -lnp|grep 110
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      3554/inetd
/dev/pts/3
18:03:21
#ls /ver/mail
ls: cannot access /ver/mail: No such file or directory
/dev/pts/8
18:03:21
#ls /ver/mail
ls: cannot access /ver/mail: No such file or directory
/dev/pts/3
18:04:07
#ls /var/mail
mail
/dev/pts/8
18:04:07
#ls /var/mail
mail
/dev/pts/3
18:04:12
#cd /etc/mail

/dev/pts/8
18:04:12
#cd /etc/mail

/dev/pts/3
18:05:16
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/8
18:05:16
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/3
18:05:17
#cat sendmail.cf
###             <$4> -- passthru (additional data passed unchanged through)
######################################################################
SE
R<$*> <$*> <$- $-> <$*>         $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
R<?> <$+> <$*> <+ $-> <$*>      $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
R<?> <$+> <$*> <$- $-> <$*>     $@ <$2> <$5>
R<$+ <TMPF>> <$*> <$- $-> <$*>  $@ <<TMPF>> <$5>
R<$+> <$*> <$- $-> <$*>         $@ <$1> <$5>
######################################################################
###  U: LookUpUser -- search for an entry in access database
...
###     Parameters:
###             ${verify} $| (MAIL|STARTTLS)
######################################################################
Stls_client
R$*             $: $(macro {TLS_Name} $@ $&{server_name} $) $1
R$* $| $*       $: $1 $| $>D <$&{client_name}> <?> <! "TLS_Clt"> <>
R$* $| <?>$*    $: $1 $| $>A <$&{client_addr}> <?> <! "TLS_Clt"> <>
R$* $| <?>$*    $: $1 $| <$(access "TLS_Clt": $: ? $)>
R$* $| <$* <TMPF>>      $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
R$*             $@ $>"TLS_connection" $1
/dev/pts/8
18:05:17
#cat sendmail.cf
###             <$4> -- passthru (additional data passed unchanged through)
######################################################################
SE
R<$*> <$*> <$- $-> <$*>         $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
R<?> <$+> <$*> <+ $-> <$*>      $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
R<?> <$+> <$*> <$- $-> <$*>     $@ <$2> <$5>
R<$+ <TMPF>> <$*> <$- $-> <$*>  $@ <<TMPF>> <$5>
R<$+> <$*> <$- $-> <$*>         $@ <$1> <$5>
######################################################################
###  U: LookUpUser -- search for an entry in access database
...
###     Parameters:
###             ${verify} $| (MAIL|STARTTLS)
######################################################################
Stls_client
R$*             $: $(macro {TLS_Name} $@ $&{server_name} $) $1
R$* $| $*       $: $1 $| $>D <$&{client_name}> <?> <! "TLS_Clt"> <>
R$* $| <?>$*    $: $1 $| $>A <$&{client_addr}> <?> <! "TLS_Clt"> <>
R$* $| <?>$*    $: $1 $| <$(access "TLS_Clt": $: ? $)>
R$* $| <$* <TMPF>>      $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
R$*             $@ $>"TLS_connection" $1
/dev/pts/3
18:06:01
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/8
18:06:01
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/3
18:06:04
#cat sendmail.conf
#       and available for the `mailstats` command to display.  There will
#       be a (minor) performance hit, as this file will be updated for each
#       item coming into, or out of, sendmail.  The file is fixed in size,
#       and small, so there's no need to rotate it.
#
MSP_MAILSTATS="${DAEMON_MAILSTATS}";
#
#------------------------------------------------------------------------------
#                               Miscellaneous Confguration
#
...
#                               Deprecated variables (kept for reference)
#
DAEMON_STATS="${DAEMON_MAILSTATS}";
MSP_STATS="${MSP_MAILSTATS}";
#
#------------------------------------------------------------------------------
#                               Unknown variables (kept for reference)
#
#------------------------------------------------------------------------------
#
/dev/pts/8
18:06:04
#cat sendmail.conf
#       and available for the `mailstats` command to display.  There will
#       be a (minor) performance hit, as this file will be updated for each
#       item coming into, or out of, sendmail.  The file is fixed in size,
#       and small, so there's no need to rotate it.
#
MSP_MAILSTATS="${DAEMON_MAILSTATS}";
#
#------------------------------------------------------------------------------
#                               Miscellaneous Confguration
#
...
#                               Deprecated variables (kept for reference)
#
DAEMON_STATS="${DAEMON_MAILSTATS}";
MSP_STATS="${MSP_MAILSTATS}";
#
#------------------------------------------------------------------------------
#                               Unknown variables (kept for reference)
#
#------------------------------------------------------------------------------
#
/dev/pts/3
18:06:07
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/8
18:06:07
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
/dev/pts/3
18:06:19
#ls -l
total 232
-rw------- 1 root  root   4261 2009-06-04 17:57 access
-rw-r----- 1 smmta smmsp 12288 2009-06-04 17:57 access.db
-rw-r--r-- 1 root  root    281 2009-03-01 20:52 address.resolve
lrwxrwxrwx 1 root  smmsp    10 2009-06-04 17:57 aliases -> ../aliases
-rw-r----- 1 smmta smmsp 12288 2009-06-04 17:58 aliases.db
-rw-r--r-- 1 root  root   3216 2009-06-04 17:57 databases
-rw-r--r-- 1 root  root   5657 2009-03-02 00:49 helpfile
-rw-r--r-- 1 root  smmsp    18 2009-06-04 17:57 local-host-names
drwxr-sr-x 2 smmta smmsp  4096 2009-06-04 17:56 m4
...
-rw-r--r-- 1 root  smmsp   269 2009-06-04 17:57 sendmail.cf.errors
-rw-r--r-- 1 root  root  12236 2009-06-04 17:57 sendmail.conf
-rw-r--r-- 1 root  smmsp  4215 2009-06-04 17:56 sendmail.mc
-rw-r--r-- 1 root  root    149 2009-03-01 20:52 service.switch
-rw-r--r-- 1 root  root    180 2009-03-01 20:52 service.switch-nodns
drwxr-sr-x 2 smmta smmsp  4096 2009-06-04 17:56 smrsh
-rw-r--r-- 1 root  smmsp 43980 2009-06-04 17:57 submit.cf
-rw-r--r-- 1 root  smmsp  2374 2009-06-04 17:56 submit.mc
drwxr-xr-x 2 smmta smmsp  4096 2009-06-04 17:57 tls
-rw-r--r-- 1 root  smmsp     0 2009-06-04 17:57 trusted-users
/dev/pts/8
18:06:19
#ls -l
total 232
-rw------- 1 root  root   4261 2009-06-04 17:57 access
-rw-r----- 1 smmta smmsp 12288 2009-06-04 17:57 access.db
-rw-r--r-- 1 root  root    281 2009-03-01 20:52 address.resolve
lrwxrwxrwx 1 root  smmsp    10 2009-06-04 17:57 aliases -> ../aliases
-rw-r----- 1 smmta smmsp 12288 2009-06-04 17:58 aliases.db
-rw-r--r-- 1 root  root   3216 2009-06-04 17:57 databases
-rw-r--r-- 1 root  root   5657 2009-03-02 00:49 helpfile
-rw-r--r-- 1 root  smmsp    18 2009-06-04 17:57 local-host-names
drwxr-sr-x 2 smmta smmsp  4096 2009-06-04 17:56 m4
...
-rw-r--r-- 1 root  smmsp   269 2009-06-04 17:57 sendmail.cf.errors
-rw-r--r-- 1 root  root  12236 2009-06-04 17:57 sendmail.conf
-rw-r--r-- 1 root  smmsp  4215 2009-06-04 17:56 sendmail.mc
-rw-r--r-- 1 root  root    149 2009-03-01 20:52 service.switch
-rw-r--r-- 1 root  root    180 2009-03-01 20:52 service.switch-nodns
drwxr-sr-x 2 smmta smmsp  4096 2009-06-04 17:56 smrsh
-rw-r--r-- 1 root  smmsp 43980 2009-06-04 17:57 submit.cf
-rw-r--r-- 1 root  smmsp  2374 2009-06-04 17:56 submit.mc
drwxr-xr-x 2 smmta smmsp  4096 2009-06-04 17:57 tls
-rw-r--r-- 1 root  smmsp     0 2009-06-04 17:57 trusted-users
/dev/pts/3
18:06:22
#cat sendmail.mc
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: debproto.mc,v 8.14.3 2009-03-01 18:51:56 cowboy Exp $
#
# Copyright (c) 1998-2009 Richard Nelson.  All Rights Reserved.
#
# cf/debian/sendmail.mc.  Generated from sendmail.mc.in by configure.
#
# sendmail.mc prototype config file for building Sendmail 8.14.3
#
...
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`linux13.unix.nt')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
/dev/pts/8
18:06:22
#cat sendmail.mc
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: debproto.mc,v 8.14.3 2009-03-01 18:51:56 cowboy Exp $
#
# Copyright (c) 1998-2009 Richard Nelson.  All Rights Reserved.
#
# cf/debian/sendmail.mc.  Generated from sendmail.mc.in by configure.
#
# sendmail.mc prototype config file for building Sendmail 8.14.3
#
...
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`linux13.unix.nt')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
/dev/pts/3
18:07:00
#vim sendmail.mc
/dev/pts/8
18:07:00
#vim sendmail.mc
--- /tmp/l3-saved-4857.18740.1354	2009-06-04 18:07:15.000000000 +0300
+++ sendmail.mc	2009-06-04 18:08:29.000000000 +0300
@@ -98,12 +98,13 @@
 include(`/etc/mail/m4/provider.m4')dnl
 dnl #
 dnl # Default Mailer setup
-MAILER_DEFINITIONS
-MAILER(`local')dnl
-MAILER(`smtp')dnl
 
 dnl # Masquerading options
 FEATURE(`always_add_domain')dnl
 MASQUERADE_AS(`linux13.unix.nt')dnl
 FEATURE(`allmasquerade')dnl
 FEATURE(`masquerade_envelope')dnl
+MAILER_DEFINITIONS
+MAILER(`local')dnl
+MAILER(`smtp')dnl
+
/dev/pts/3
18:08:29
#sendmail restart

/dev/pts/8
18:08:29
#sendmail restart

/dev/pts/3
18:09:44
#.Ñ/etc/init.d/send
sendmail  sendsigs
18:09:44
#/etc/init.d/send
sendmail  sendsigs
/dev/pts/8
18:09:44
#.Ñ/etc/init.d/send
sendmail  sendsigs
18:09:44
#/etc/init.d/send
sendmail  sendsigs
/dev/pts/3
18:09:44
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail.
/dev/pts/8
18:09:44
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail.
/dev/pts/3
18:11:17
#hostname
linux13
/dev/pts/8
18:11:17
#hostname
linux13
/dev/pts/3
18:13:43
#Ânetstat -lnp|less
/dev/pts/8
18:13:43
#Ânetstat -lnp|less
18:23:38
#ьфлу
bash: ьфлу: command not found
/dev/pts/3
18:23:38
#ьфлу
bash: ьфлу: command not found
/dev/pts/10
18:24:05
#ls /var/mail
mail
/dev/pts/1
18:24:05
#ls /var/mail
mail
/dev/pts/3
18:25:07
#make
Updating auth ...
sasl2-bin not installed, not configuring sendmail support.
To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"
Creating /etc/mail/relay-domains
# Optional file...
The following file(s) have changed:
  /etc/mail/local-host-names
** ** You should issue `/etc/init.d/sendmail reload` ** **
/dev/pts/8
18:25:07
#make
Updating auth ...
sasl2-bin not installed, not configuring sendmail support.
To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"
Creating /etc/mail/relay-domains
# Optional file...
The following file(s) have changed:
  /etc/mail/local-host-names
** ** You should issue `/etc/init.d/sendmail reload` ** **
/dev/pts/3
18:25:12
#nc -c 127.0.0.1 25
no port[s] to connect to
/dev/pts/8
18:25:12
#nc -c 127.0.0.1 25
no port[s] to connect to
/dev/pts/3
18:26:23
#nc 127.0.0.1 25
220 linux13 ESMTP Sendmail 8.14.3/8.14.3/Debian-9; Thu, 4 Jun 2009 18:26:34 +0300; (No UCE/UBE) logging access from: [127.0.0.1](FORGED)-localhost [127.0.0.1] (may be forged)
HELO ZLO
250 linux13 Hello localhost [127.0.0.1] (may be forged), pleased to meet you
MAIL FROM: root@mail.ru
250 2.1.0 root@mail.ru... Sender ok
RCPT TO: root@class13.unix.nt
250 2.1.5 root@class13.unix.nt... Recipient ok (will queue)
DATA
354 Enter mail, end with "." on a line by itself
From: ROOT OF MAIL <root@mail.ru>
To: ROOT OF EB <root@class13.unix.nt
Subject: Hello
HELLO, EB!!!
.
250 2.0.0 n54FQYFq008543 Message accepted for delivery
^C
/dev/pts/8
18:26:23
#nc 127.0.0.1 25
220 linux13 ESMTP Sendmail 8.14.3/8.14.3/Debian-9; Thu, 4 Jun 2009 18:26:34 +0300; (No UCE/UBE) logging access from: [127.0.0.1](FORGED)-localhost [127.0.0.1] (may be forged)
HELO ZLO
250 linux13 Hello localhost [127.0.0.1] (may be forged), pleased to meet you
MAIL FROM: root@mail.ru
250 2.1.0 root@mail.ru... Sender ok
RCPT TO: root@class13.unix.nt
250 2.1.5 root@class13.unix.nt... Recipient ok (will queue)
DATA
354 Enter mail, end with "." on a line by itself
From: ROOT OF MAIL <root@mail.ru>
To: ROOT OF EB <root@class13.unix.nt
Subject: Hello
HELLO, EB!!!
.
250 2.0.0 n54FQYFq008543 Message accepted for delivery
^C
/dev/pts/10
18:31:11
#ls /var/mail/
mail
/dev/pts/1
18:31:11
#ls /var/mail/
mail
/dev/pts/10
18:31:14
#ls /var/mail/mail
/var/mail/mail
/dev/pts/1
18:31:14
#ls /var/mail/mail
/var/mail/mail
/dev/pts/10
18:31:18
#apt-get install mutt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgpgme11 libpth20
Suggested packages:
  gpgsm urlview mixmaster
The following NEW packages will be installed:
  libgpgme11 libpth20 mutt
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
...
Selecting previously deselected package libgpgme11.
Unpacking libgpgme11 (from .../libgpgme11_1.1.8-2_i386.deb) ...
Selecting previously deselected package mutt.
Unpacking mutt (from .../mutt_1.5.19-4_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up libpth20 (2.0.7-12) ...
Setting up libgpgme11 (1.1.8-2) ...
Setting up mutt (1.5.19-4) ...
Processing triggers for menu ...
/dev/pts/1
18:31:18
#apt-get install mutt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgpgme11 libpth20
Suggested packages:
  gpgsm urlview mixmaster
The following NEW packages will be installed:
  libgpgme11 libpth20 mutt
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
...
Selecting previously deselected package libgpgme11.
Unpacking libgpgme11 (from .../libgpgme11_1.1.8-2_i386.deb) ...
Selecting previously deselected package mutt.
Unpacking mutt (from .../mutt_1.5.19-4_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Setting up libpth20 (2.0.7-12) ...
Setting up libgpgme11 (1.1.8-2) ...
Setting up mutt (1.5.19-4) ...
Processing triggers for menu ...
/dev/pts/3
18:31:22
#vim /etc/mail/local-host-names
/dev/pts/8
18:31:22
#vim /etc/mail/local-host-names
/dev/pts/10
18:31:50
#mutt

/dev/pts/1
18:31:50
#mutt

/dev/pts/10
18:33:04
#mutt

/dev/pts/1
18:33:04
#mutt

/dev/pts/3
18:38:41
#tail /var/log/mail.log
Jun  4 18:42:01 linux13 sm-mta[9086]: n54Fg1j0009086: from=<root@linux13>, size=571, class=0, nrcpts=1, msgid=<200906041542.n54Fg1RO009076@linux13>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged)
Jun  4 18:42:01 linux13 sm-mta[9086]: n54Fg1j0009086: to=<root@linux13>, delay=00:00:00, mailer=local, pri=30571, dsn=4.4.3, stat=queued
Jun  4 18:42:01 linux13 sendmail[9076]: n54Fg1RO009076: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30341, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n54Fg1j0009086 Message accepted for delivery)
Jun  4 18:42:01 linux13 sendmail[9093]: My unqualified host name (linux13) unknown; sleeping for retry
Jun  4 18:43:01 linux13 sendmail[9093]: unable to qualify my own domain name (linux13) -- using short name
Jun  4 18:43:01 linux13 sendmail[9093]: n54Fh1nH009093: from=root, size=341, class=0, nrcpts=1, msgid=<200906041543.n54Fh1nH009093@linux13>, relay=root@localhost
Jun  4 18:43:01 linux13 sendmail[9104]: My unqualified host name (linux13) unknown; sleeping for retry
Jun  4 18:43:01 linux13 sm-mta[9103]: n54Fh1oh009103: from=<root@linux13>, size=571, class=0, nrcpts=1, msgid=<200906041543.n54Fh1nH009093@linux13>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged)
Jun  4 18:43:01 linux13 sm-mta[9103]: n54Fh1oh009103: to=<root@linux13>, delay=00:00:00, mailer=local, pri=30571, dsn=4.4.3, stat=queued
Jun  4 18:43:01 linux13 sendmail[9093]: n54Fh1nH009093: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30341, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n54Fh1oh009103 Message accepted for delivery)
/dev/pts/8
18:38:41
#tail /var/log/mail.log
Jun  4 18:42:01 linux13 sm-mta[9086]: n54Fg1j0009086: from=<root@linux13>, size=571, class=0, nrcpts=1, msgid=<200906041542.n54Fg1RO009076@linux13>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged)
Jun  4 18:42:01 linux13 sm-mta[9086]: n54Fg1j0009086: to=<root@linux13>, delay=00:00:00, mailer=local, pri=30571, dsn=4.4.3, stat=queued
Jun  4 18:42:01 linux13 sendmail[9076]: n54Fg1RO009076: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30341, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n54Fg1j0009086 Message accepted for delivery)
Jun  4 18:42:01 linux13 sendmail[9093]: My unqualified host name (linux13) unknown; sleeping for retry
Jun  4 18:43:01 linux13 sendmail[9093]: unable to qualify my own domain name (linux13) -- using short name
Jun  4 18:43:01 linux13 sendmail[9093]: n54Fh1nH009093: from=root, size=341, class=0, nrcpts=1, msgid=<200906041543.n54Fh1nH009093@linux13>, relay=root@localhost
Jun  4 18:43:01 linux13 sendmail[9104]: My unqualified host name (linux13) unknown; sleeping for retry
Jun  4 18:43:01 linux13 sm-mta[9103]: n54Fh1oh009103: from=<root@linux13>, size=571, class=0, nrcpts=1, msgid=<200906041543.n54Fh1nH009093@linux13>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged)
Jun  4 18:43:01 linux13 sm-mta[9103]: n54Fh1oh009103: to=<root@linux13>, delay=00:00:00, mailer=local, pri=30571, dsn=4.4.3, stat=queued
Jun  4 18:43:01 linux13 sendmail[9093]: n54Fh1nH009093: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30341, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n54Fh1oh009103 Message accepted for delivery)
прошло 13 минут
/dev/pts/2
18:52:13
#init 0

/dev/pts/1
18:52:13
#init 0

прошло 11 минут
/dev/pts/5
19:03:42
#exit
Connection to 10.0.35.100 closed.
/dev/pts/6
19:03:42
#exit
Connection to 10.0.35.100 closed.

Пятница (06/05/09)

/dev/pts/5
09:38:00
#ssh 10.0.35.100
root@10.0.35.100's password:
Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Fri Jun  5 09:53:18 2009 from 192.168.15.15
l3-agent is already running: pid=1896; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/6
09:38:00
#ssh 10.0.35.100
root@10.0.35.100's password:
Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Last login: Fri Jun  5 09:53:18 2009 from 192.168.15.15
l3-agent is already running: pid=1896; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/8
09:39:20
#cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
...
};
zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
/dev/pts/3
09:39:20
#cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
...
};
zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
/dev/pts/10
09:39:26
#screen -ls
/dev/pts/1
09:39:26
#screen -ls
прошло 11 минут
/dev/pts/14
09:51:10
#screen
/dev/pts/13
09:51:10
#screen
/dev/pts/10
09:51:52
#l3-agent
l3-agent is already running: pid=4587; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/1
09:51:52
#l3-agent
l3-agent is already running: pid=4587; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/5
09:55:11
#screen -x
/dev/pts/6
09:55:11
#screen -x
/dev/pts/5
09:55:15
#screen -x
/dev/pts/6
09:55:15
#screen -x
/dev/pts/8
10:00:27
#cat /etc/bind/named.conf|less
/dev/pts/3
10:00:27
#cat /etc/bind/named.conf|less
/dev/pts/8
10:01:06
#ls /etc/bind/|less
/dev/pts/3
10:01:06
#ls /etc/bind/|less
/dev/pts/5
10:06:32
#screen -x
/dev/pts/6
10:06:32
#screen -x
/dev/pts/5
10:07:09
#screen -x
/dev/pts/6
10:07:09
#screen -x
/dev/pts/5
10:07:12
#screen -x
/dev/pts/6
10:07:12
#screen -x
/dev/pts/5
10:07:20
#screen -x
/dev/pts/6
10:07:20
#screen -x
прошло 10 минут
/dev/pts/8
10:18:18
#host 93.158.134.8
Name: ya.ru
Address: 93.158.134.8

Файлы

  • /etc/bind/named.conf
  • sendmail.cf
  • sendmail.conf
  • sendmail.mc
  • /etc/bind/named.conf
    >
    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    // structure of BIND configuration files in Debian, *BEFORE* you customize
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local
    include "/etc/bind/named.conf.options";
    // prime the server with knowledge of the root servers
    zone "." {
            type hint;
            file "/etc/bind/db.root";
    };
    // be authoritative for the localhost forward and reverse zones, and for
    // broadcast zones as per RFC 1912
    zone "localhost" {
            type master;
            file "/etc/bind/db.local";
    };
    zone "127.in-addr.arpa" {
            type master;
            file "/etc/bind/db.127";
    };
    zone "0.in-addr.arpa" {
            type master;
            file "/etc/bind/db.0";
    };
    zone "255.in-addr.arpa" {
            type master;
            file "/etc/bind/db.255";
    };
    include "/etc/bind/named.conf.local";
    
    sendmail.cf
    >
    ###             <$4> -- passthru (additional data passed unchanged through)
    ######################################################################
    SE
    R<$*> <$*> <$- $-> <$*>         $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
    R<?> <$+> <$*> <+ $-> <$*>      $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
    R<?> <$+> <$*> <$- $-> <$*>     $@ <$2> <$5>
    R<$+ <TMPF>> <$*> <$- $-> <$*>  $@ <<TMPF>> <$5>
    R<$+> <$*> <$- $-> <$*>         $@ <$1> <$5>
    ######################################################################
    ###  U: LookUpUser -- search for an entry in access database
    ###
    ###     lookup of key (which should be a local part) and
    ###     variations if +detail exists: +* and without +detail
    ###
    ###     Parameters:
    ###             <$1> -- key (user@)
    ###             <$2> -- default (what to return if not found in db)
    ###             <$3> -- mark (must be <(!|+) single-token>)
    ###                     ! does lookup only with tag
    ###                     + does lookup with and without tag
    ###             <$4> -- passthru (additional data passed unchanged through)
    ######################################################################
    SU
    R<$+> <$*> <$- $-> <$*>         $: <$(access $4:$1 $: ? $)> <$1> <$2> <$3 $4> <$5>
    R<?> <$+> <$*> <+ $-> <$*>      $: <$(access $1 $: ? $)> <$1> <$2> <+ $3> <$4>
    R<?> <$+ + $* @> <$*> <$- $-> <$*>
                            $: <$(access $5:$1+*@ $: ? $)> <$1+$2@> <$3> <$4 $5> <$6>
    R<?> <$+ + $* @> <$*> <+ $-> <$*>
                            $: <$(access $1+*@ $: ? $)> <$1+$2@> <$3> <+ $4> <$5>
    R<?> <$+ + $* @> <$*> <$- $-> <$*>
                            $: <$(access $5:$1@ $: ? $)> <$1+$2@> <$3> <$4 $5> <$6>
    R<?> <$+ + $* @> <$*> <+ $-> <$*>
                            $: <$(access $1@ $: ? $)> <$1+$2@> <$3> <+ $4> <$5>
    R<?> <$+> <$*> <$- $-> <$*>     $@ <$2> <$5>
    R<$+ <TMPF>> <$*> <$- $-> <$*>  $@ <<TMPF>> <$5>
    R<$+> <$*> <$- $-> <$*>         $@ <$1> <$5>
    ######################################################################
    ###  SearchList: search a list of items in the access map
    ###     Parameters:
    ###             <exact tag> $| <mark:address> <mark:address> ... <>
    ###     where "exact" is either "+" or "!":
    ###     <+ TAG> lookup with and w/o tag
    ###     <! TAG> lookup with tag
    ###     possible values for "mark" are:
    ###             D: recursive host lookup (LookUpDomain)
    ###             E: exact lookup, no modifications
    ###             F: full lookup, try user+ext@domain and user@domain
    ###             U: user lookup, try user+ext and user (input must have trailing @)
    ###     return: <RHS of lookup> or <?> (not found)
    ######################################################################
    # class with valid marks for SearchList
    C{Src}E F D U A
    SSearchList
    # just call the ruleset with the name of the tag... nice trick...
    R<$+> $| <$={Src}:$*> <$*>      $: <$1> $| <$4> $| $>$2 <$3> <?> <$1> <>
    R<$+> $| <> $| <?> <>           $@ <?>
    R<$+> $| <$+> $| <?> <>         $@ $>SearchList <$1> $| <$2>
    R<$+> $| <$*> $| <$+> <>        $@ <$3>
    R<$+> $| <$+>                   $@ <$2>
    ######################################################################
    ###  trust_auth: is user trusted to authenticate as someone else?
    ###
    ###     Parameters:
    ###             $1: AUTH= parameter from MAIL command
    ######################################################################
    SLocal_trust_auth
    Strust_auth
    R$*                     $: $&{auth_type} $| $1
    # required by RFC 2554 section 4.
    R$@ $| $*               $#error $@ 5.7.1 $: "550 not authenticated"
    R$* $| $&{auth_authen}          $@ identical
    R$* $| <$&{auth_authen}>        $@ identical
    R$* $| $*               $: $1 $| $>"Local_trust_auth" $2
    R$* $| $#$*             $#$2
    R$*                     $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
    ######################################################################
    ###  Relay_Auth: allow relaying based on authentication?
    ###
    ###     Parameters:
    ###             $1: ${auth_type}
    ######################################################################
    SLocal_Relay_Auth
    ######################################################################
    ###  srv_features: which features to offer to a client?
    ###     (done in server)
    ######################################################################
    Ssrv_features
    R$*             $: $>D <$&{client_name}> <?> <! "Srv_Features"> <>
    R<?>$*          $: $>A <$&{client_addr}> <?> <! "Srv_Features"> <>
    R<?>$*          $: <$(access "Srv_Features": $: ? $)>
    R<?>$*          $@ OK
    R<$* <TMPF>>$*  $#temp
    R<$+>$*         $# $1
    ######################################################################
    ###  try_tls: try to use STARTTLS?
    ###     (done in client)
    ######################################################################
    Stry_tls
    R$*             $: $>D <$&{server_name}> <?> <! "Try_TLS"> <>
    R<?>$*          $: $>A <$&{server_addr}> <?> <! "Try_TLS"> <>
    R<?>$*          $: <$(access "Try_TLS": $: ? $)>
    R<?>$*          $@ OK
    R<$* <TMPF>>$*  $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
    R<NO>$*         $#error $@ 5.7.1 $: "550 do not try TLS with " $&{server_name} " ["$&{server_addr}"]"
    ######################################################################
    ###  tls_rcpt: is connection with server "good" enough?
    ###     (done in client, per recipient)
    ###
    ###     Parameters:
    ###             $1: recipient
    ######################################################################
    Stls_rcpt
    R$*                     $: $(macro {TLS_Name} $@ $&{server_name} $) $1
    R$+                     $: <?> $>CanonAddr $1
    R<?> $+ < @ $+ . >      <?> $1 <@ $2 >
    R<?> $+ < @ $+ >        $: $1 <@ $2 > $| <F:$1@$2> <U:$1@> <D:$2> <E:>
    R<?> $+                 $: $1 $| <U:$1@> <E:>
    R$* $| $+       $: $1 $| $>SearchList <! "TLS_Rcpt"> $| $2 <>
    R$* $| <?>      $@ OK
    R$* $| <$* <TMPF>>      $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
    R$* $| <$+>     $@ $>"TLS_connection" $&{verify} $| <$2>
    ######################################################################
    ###  tls_client: is connection with client "good" enough?
    ###     (done in server)
    ###
    ###     Parameters:
    ###             ${verify} $| (MAIL|STARTTLS)
    ######################################################################
    Stls_client
    R$*             $: $(macro {TLS_Name} $@ $&{server_name} $) $1
    R$* $| $*       $: $1 $| $>D <$&{client_name}> <?> <! "TLS_Clt"> <>
    R$* $| <?>$*    $: $1 $| $>A <$&{client_addr}> <?> <! "TLS_Clt"> <>
    R$* $| <?>$*    $: $1 $| <$(access "TLS_Clt": $: ? $)>
    R$* $| <$* <TMPF>>      $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
    R$*             $@ $>"TLS_connection" $1
    
    sendmail.conf
    >
    #       and available for the `mailstats` command to display.  There will
    #       be a (minor) performance hit, as this file will be updated for each
    #       item coming into, or out of, sendmail.  The file is fixed in size,
    #       and small, so there's no need to rotate it.
    #
    MSP_MAILSTATS="${DAEMON_MAILSTATS}";
    #
    #------------------------------------------------------------------------------
    #                               Miscellaneous Confguration
    #
    # MISC_PARMS="";  String  miscellaneous parameters
    #       Miscellaneous parameters - applied to any sendmail invocation.
    #       Any parameters here are also used when run from cron.
    #       Applied after {DAEMON,QUEUE}_PARMS, and can therefore override them
    #       if need be (in which case why did use them?)
    #       Note that CRON_PARMS, if applicable, will override anything
    #       declared herein.
    #
    #       Here is where'd you setup and debugging or special parms that you
    #       want shared betwixt the possibly separate listener/queue-runner
    #       processes.
    #
    MISC_PARMS="";
    #
    #------------------------------------------------------------------------------
    #                               Cron Job Configuration
    #
    # CRON_MAILTO="root";  String  cronjob output
    #       Recipient of *rare* cronjob output.  Some cronjobs will be running
    #       under user `mail`, so any problems encountered would probably be missed
    #       so define a user who actually (hopefully) checks email now and again.
    #
    CRON_MAILTO="root";
    #
    # CRON_PARMS="";  String  cron specific parmeters
    #       Cron parameters - applied *only* when sendmail queue running is done
    #       via a cronjob. Applied after QUEUE_PARMS and MISC_PARMS, and can
    #       therefore override them if need be.
    #
    CRON_PARMS="";
    #
    #------------------------------------------------------------------------------
    #                               Other stuff
    # LOG_CMDS="No"; Binary command logging flag
    #       Will cause syslog entries for many of the sendmail related commands
    #       like runq, mailq, etc - you'll also see cron jobs (if enabled).
    #
    LOG_CMDS="No";
    #
    # HANDS_OFF="No"; Binary  Do *NOT* touch the configuration
    #       Set this *ONLY* if you are going to be fully responsible for the entire
    #       setup of sendmail - the directories, permissions, databases, etc.  With
    #       this variable set to "Yes", nothing will be done for you during updates.
    #
    #       In other words, "The blood be upon your hands" if you set this...
    #       My ability to help with problems will be greatly reduced !
    #
    #       "Well, a pet peeve of mine is people who directly edit the
    #       .cf file instead of using the m4 configuration files.
    #       Don't do it! [laughs] I treat the .cf file as a binary
    #       file - you should too."
    #               --  Eric Allman 1999/10/18
    #               http://www.dotcomeon.com/allman_sendmail_qa.html
    #
    HANDS_OFF="No";
    #
    #------------------------------------------------------------------------------
    #                               Queue Aging Configuration
    #
    #       Why would you want to age your queues?  On every queue-run interval,
    #       sendmail will try *every* file in the queue...  If a site is down
    #       for a while, considerable time can be wasted each interval in retrying
    #       it.  The scheme supported allows aging by time, and can move the older
    #       files to another (less frequently run queue), thereby reducing overal
    #       system impact - and providing better mail throughput.
    #
    #       Note that this support is completely separate from QUEUE_MODE=cron,
    #       you can age queues even if you're running QUEUE_MODE=daemon.
    #
    #       There are four parts to the queue aging support, and these parts
    #       may be repeated, to operate on multiple queues.
    #
    #       1. Interval at which to age the queues (in minutes).
    #          What interval should you use?  Roughly twice the normal queue
    #          interval, so that messages are tried twice in each successively
    #          slower queue.
    #
    #          NOTE: some values just wont work, due to crontab pecularities
    #          a value of 90 minutes will actually be run at every x:30 !
    #          Please check /etc/cron.d/sendmail to make sure it is doing what
    #          you thought it should !
    #
    #       2. Criteria (optional and defaults to interval).  This is the
    #          specification of which files to move.  It defaults moving
    #          files whose age in the queues exceeds the interval.
    #          This field, if specified can be very complex - supporting
    #          aging by just about anything! see qtool(8) for details.
    #
    #       3. To queue.  This is the queue to which files will be moved.
    #          It may be fully qualified, or relative to /var/spool/mqueue.
    #
    #       4. From queue.  This is the queue from which files will be moved.
    #          It may be fully qualified, or relative to /var/spool/mqueue.
    #
    #       Samples:
    #       AGE_DATA="[['25m', '', 'hourly', 'main']]";
    #               Every 25 minutes, move any file older than 25 minutes from
    #               /var/spool/mqueue/main to /var/spool/mqueue/hourly
    #
    #       AGE_DATA="[['25m',      '', 'hourly', 'main'],\
    #               ['120m', '', 'daily',  'hourly']]";
    #               Same as the above, but also move files from the hourly queue
    #               to the daily queue after 120 minutes in the hourly queue.
    #
    #       AGE_DATA="[['25m',\
    #               '-e \'$msg{message}[0] == /Deferred: 452 4.2.2 Over quota/\'',\
    #               'overquota', 'main']]";
    #               Every 25 minutes, move all files deferred because of quota
    #               violations from /var/spool/mqueue/main to
    #               /var/spool/mqueue/overquota where they can be processed on
    #               a different interval, or by some other means.
    #
    #       If the above samples suggest Perl arrays, well, they are...
    #
    # AGE_DATA="";  Perl array  Queue aging data
    #
    AGE_DATA="";
    #
    #------------------------------------------------------------------------------
    #                               Dependant variables (set according to other variables)
    #
    #
    #------------------------------------------------------------------------------
    #                               Hidden variables (the blood be upon your hands)
    #
    DAEMON_RUNASUSER="No";
    #
    #------------------------------------------------------------------------------
    #                               Deprecated variables (kept for reference)
    #
    DAEMON_STATS="${DAEMON_MAILSTATS}";
    MSP_STATS="${MSP_MAILSTATS}";
    #
    #------------------------------------------------------------------------------
    #                               Unknown variables (kept for reference)
    #
    #------------------------------------------------------------------------------
    #
    
    sendmail.mc
    >
    divert(-1)dnl
    #-----------------------------------------------------------------------------
    # $Sendmail: debproto.mc,v 8.14.3 2009-03-01 18:51:56 cowboy Exp $
    #
    # Copyright (c) 1998-2009 Richard Nelson.  All Rights Reserved.
    #
    # cf/debian/sendmail.mc.  Generated from sendmail.mc.in by configure.
    #
    # sendmail.mc prototype config file for building Sendmail 8.14.3
    #
    # Note: the .in file supports 8.7.6 - 9.0.0, but the generated
    #       file is customized to the version noted above.
    #
    # This file is used to configure Sendmail for use with Debian systems.
    #
    # If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
    # by running this file through the m4 preprocessor via one of the following:
    #       * make   (or make -C /etc/mail)
    #       * sendmailconfig
    #       * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
    # The first two options are preferred as they will also update other files
    # that depend upon the contents of this file.
    #
    # The best documentation for this .mc file is:
    # /usr/share/doc/sendmail-doc/cf.README.gz
    #
    #-----------------------------------------------------------------------------
    divert(0)dnl
    #
    #   Copyright (c) 1998-2005 Richard Nelson.  All Rights Reserved.
    #
    #  This file is used to configure Sendmail for use with Debian systems.
    #
    define(`_USE_ETC_MAIL_')dnl
    include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
    VERSIONID(`$Id: sendmail.mc, v 8.14.3-9 2009-03-01 18:51:56 cowboy Exp $')
    OSTYPE(`debian')dnl
    DOMAIN(`debian-mta')dnl
    dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
    undefine(`confHOST_STATUS_DIRECTORY')dnl        #DAEMON_HOSTSTATS=
    dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
    dnl #
    dnl # General defines
    dnl #
    dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
    dnl #   into this directory before writing files.
    dnl #   If *all* your user accounts are under /home then use that
    dnl #   instead - it will prevent any writes outside of /home !
    dnl #   define(`confSAFE_FILE_ENV',             `')dnl
    dnl #
    dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
    dnl # Remove `, Addr=' clauses to receive from any interface
    dnl # If you want to support IPv6, switch the commented/uncommentd lines
    dnl #
    FEATURE(`no_default_msa')dnl
    dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
    DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
    dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl
    DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
    dnl #
    dnl # Be somewhat anal in what we allow
    define(`confPRIVACY_FLAGS',dnl
    `needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
    dnl #
    dnl # Define connection throttling and window length
    define(`confCONNECTION_RATE_THROTTLE', `15')dnl
    define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
    dnl #
    dnl # Features
    dnl #
    dnl # use /etc/mail/local-host-names
    FEATURE(`use_cw_file')dnl
    dnl #
    dnl # The access db is the basis for most of sendmail's checking
    FEATURE(`access_db', , `skip')dnl
    dnl #
    dnl # The greet_pause feature stops some automail bots - but check the
    dnl # provided access db for details on excluding localhosts...
    FEATURE(`greet_pause', `1000')dnl 1 seconds
    dnl #
    dnl # Delay_checks allows sender<->recipient checking
    FEATURE(`delay_checks', `friend', `n')dnl
    dnl #
    dnl # If we get too many bad recipients, slow things down...
    define(`confBAD_RCPT_THROTTLE',`3')dnl
    dnl #
    dnl # Stop connections that overflow our concurrent and time connection rates
    FEATURE(`conncontrol', `nodelay', `terminate')dnl
    FEATURE(`ratecontrol', `nodelay', `terminate')dnl
    dnl #
    dnl # If you're on a dialup link, you should enable this - so sendmail
    dnl # will not bring up the link (it will queue mail for later)
    dnl define(`confCON_EXPENSIVE',`True')dnl
    dnl #
    dnl # Dialup/LAN connection overrides
    dnl #
    include(`/etc/mail/m4/dialup.m4')dnl
    include(`/etc/mail/m4/provider.m4')dnl
    dnl #
    dnl # Default Mailer setup
    MAILER_DEFINITIONS
    MAILER(`local')dnl
    MAILER(`smtp')dnl
    dnl # Masquerading options
    FEATURE(`always_add_domain')dnl
    MASQUERADE_AS(`linux13.unix.nt')dnl
    FEATURE(`allmasquerade')dnl
    FEATURE(`masquerade_envelope')dnl
    

    Статистика

    Время первой команды журнала18:02:05 2009- 6- 4
    Время последней команды журнала10:18:18 2009- 6- 5
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %21.78
    Процент синтаксически неверно набранных команд, % 3.96
    Суммарное время работы с терминалом *, час 1.70
    Количество командных строк в единицу времени, команда/мин 0.99
    Частота использования команд
    ls20|==================| 18.02%
    screen16|==============| 14.41%
    cat10|=========| 9.01%
    netstat8|=======| 7.21%
    less8|=======| 7.21%
    mutt4|===| 3.60%
    vim4|===| 3.60%
    nc4|===| 3.60%
    /etc/init.d/sendmail2|=| 1.80%
    l3-agent2|=| 1.80%
    /etc/2|=| 1.80%
    /etc/init.d/send2|=| 1.80%
    ьфлу2|=| 1.80%
    sendmail2|=| 1.80%
    make2|=| 1.80%
    cd2|=| 1.80%
    Ânetstat2|=| 1.80%
    tail2|=| 1.80%
    apt-get2|=| 1.80%
    grep2|=| 1.80%
    init2|=| 1.80%
    kill2|=| 1.80%
    ssh2|=| 1.80%
    hostname2|=| 1.80%
    exit2|=| 1.80%
    .Ñ/etc/init.d/send2|=| 1.80%
    host1|| 0.90%
    ____
    *) Интервалы неактивности длительностью 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$