/l3/users/yuriksat/nt-lnet/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 |
|
#grep local-host-names sendmail.cf
# define(`confCW_FILE', `MAIL_SETTINGS_DIR`'local-host-names')dnl |
#less sendmail.cf
|
#less sendmail.cf
|
#vi sendmail.mc
|
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... 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... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#vi sendmail.mc
98,100c98,100 < MAILER_DEFINITIONS < MAILER(`local')dnl < MAILER(`smtp')dnl --- > dnl #MAILER_DEFINITIONS > dnl MAILER(`local')dnl > dnl MAILER(`smtp')dnl |
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... 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... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#less sendmail.cf
|
#vi sendmail.cf
|
#less sendmail.cf
|
#grep local-host-names /usr/share/sendmail/cf/m4/* | less
|
#grep cfhead /usr/share/sendmail/cf/m4/* | less
|
#less /usr/share/sendmail/cf/m4/cf.m4
|
#less /etc/mail/sendmail.mc
|
#vi /etc/mail/sendmail.mc
34a35 > OSTYPE(`debian')dnl 37d37 < OSTYPE(`debian')dnl |
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... 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... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... *** ERROR: No system type defined (use OSTYPE macro) The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#vi /etc/mail/sendmail.mc
35d34 < OSTYPE(`debian')dnl 37a37 > OSTYPE(`debian')dnl |
#less /usr/share/sendmail/cf/m4/cf.m4
|
#vi /etc/mail/sendmail.mc
35a36 > include(`/usr/share/sendmail/cf/m4/cfhead.m4')dnl |
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Could not open TEMPFILE(No such file or directory) Could not open NoSuchFile(No such file or directory) 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 ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... /usr/share/sendmail/cf/m4/cfhead.m4:53: m4: Cannot open /usr/share/sendmail/cf/feature/.m4: No such file or directory /usr/share/sendmail/cf/m4/cfhead.m4:53: m4: Cannot open /usr/share/sendmail/cf/hack/.m4: No such file or directory NONE:0: m4: ERROR: EOF in argument list The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#vi /etc/mail/sendmail.mc
|
#less sendmail.conf
|
#vi /etc/mail/sendmail.mc
108a109,112 > define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl > FEATURE(`use_cw_file')dnl > > |
#make
make: *** Нет правила для сборки цели `TEMPFILE', требуемой для `/etc/mail/databases'. Останов. |
#make
make: *** Нет правила для сборки цели `TEMPFILE', требуемой для `/etc/mail/databases'. Останов. |
#ls
access helpfile sendmail.cf smrsh access.db local-host-names sendmail.cf.errors submit.cf address.resolve m4 sendmail.conf submit.mc aliases Makefile sendmail.mc tls aliases.db peers service.switch trusted-users databases sasl service.switch-nodns |
#vi Makefile
|
#touch TEMPFILE
|
#make
make: *** Нет правила для сборки цели `NoSuchFile', требуемой для `/etc/mail/databases'. Останов. |
#touch NoSuchFile
|
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... 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... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... /usr/share/sendmail/cf/m4/cfhead.m4:53: m4: Cannot open /usr/share/sendmail/cf/feature/.m4: No such file or directory /usr/share/sendmail/cf/m4/cfhead.m4:53: m4: Cannot open /usr/share/sendmail/cf/hack/.m4: No such file or directory NONE:0: m4: ERROR: EOF in argument list The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#vi sendmail.mc
36d35 < include(`/usr/share/sendmail/cf/m4/cfhead.m4')dnl |
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... 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... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#grep local-host *
databases:confCW_FILE:-:-o:/etc/mail/local-host-names:-: databases:use_cw_file:-:-o:/etc/mail/local-host-names:-: Makefile: /etc/mail/local-host-names Makefile: /etc/mail/local-host-names Makefile:/etc/mail/local-host-names: Makefile: @echo 'Creating /etc/mail/local-host-names'; sendmail.cf:Fw-o /etc/mail/local-host-names sendmail.cf:# dnl #define(`confCW_FILE', `MAIL_SETTINGS_DIR`'local-host-names')dnl sendmail.cf:# define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl sendmail.mc:dnl #define(`confCW_FILE', `MAIL_SETTINGS_DIR`'local-host-names')dnl sendmail.mc:define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl |
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail. |
#su - user
l3-agent is already running: pid=3383; pidfile=/home/user/.lilalo/l3-agent.pid |
$echo hello | mail user
|
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 3 messages 3 new >N 1 MAILER-DAEMON@loc Thu Sep 21 12:50 60/2406 Postmaster notify: see tran N 2 MAILER-DAEMON@loc Thu Sep 21 12:50 60/2406 Postmaster notify: see tran N 3 user@localhost.lo Thu Sep 21 12:50 15/661 & q Held 3 messages in /var/mail/user |
$echo hello | mail user@yuriksat.linux.nt
|
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 4 messages 1 new 4 unread U 1 MAILER-DAEMON@loc Thu Sep 21 12:50 61/2416 Postmaster notify: see tran U 2 MAILER-DAEMON@loc Thu Sep 21 12:50 61/2416 Postmaster notify: see tran U 3 user@localhost.lo Thu Sep 21 12:50 16/671 >N 4 user@localhost.lo Thu Sep 21 12:50 15/670 & t 4 Message 4: From user@localhost.localdomain Thu Sep 21 12:50:23 2006 Date: Thu, 21 Sep 2006 12:50:22 +0300 From: user <user@localhost.localdomain> To: user@localhost.localdomain hello & q Saved 1 message in /home/user/mbox Held 3 messages in /var/mail/user |
$exit
exit |
#tail sendmail.mc
dnl # Masquerading options FEATURE(`always_add_domain')dnl MASQUERADE_AS(`localhost.localdomain')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl FEATURE(`use_cw_file')dnl |
#cd /var/mail/
|
#ls
mail root user |
#cd /etc/inetd/
bash: cd: /etc/inetd/: No such file or directory |
#cd /etc/
|
#ls
adduser.conf group nanorc adjtime group- network aliases gs-gpl nsswitch.conf alternatives gshadow openoffice apm gshadow- opera6rc apt gtk opera6rc.fixed bash.bashrc gtk-2.0 opt bash_completion hal pam.conf bash_completion.d host.conf pam.d bind hostname pango ... fdmount.conf modprobe.d vnc.conf fonts modules w3m fstab modules.conf wgetrc gconf modules.conf.old X11 gdm modutils xdg gimp motd xinetd.conf gnome motd.tail xinetd.d gnome-vfs-2.0 mozilla xml gnome-vfs-mime-magic mtab Xprint groff mtools.conf |
#ls /etc/bind/
db.0 db.empty named.conf rndc.key db.127 db.local named.conf.local yuriksat.linux.nt db.255 db.root named.conf.options zones.rfc1918 |
#cd /etc/sendmail
bash: cd: /etc/sendmail: No such file or directory |
#halt
|
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:15:F2:6B:55:25 inet addr:192.168.15.2 Bcast:192.168.15.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:96 errors:0 dropped:0 overruns:0 frame:0 TX packets:104 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:40375 (39.4 KiB) TX bytes:11220 (10.9 KiB) Interrupt:19 Base address:0xd000 |
#df
Файловая система 1K-блоков Исп Доступно Исп% смонтирована на /dev/hdb1 459143 93381 341265 22% / tmpfs 241852 0 241852 0% /dev/shm /dev/hdb9 4807056 1331148 3231724 30% /home /dev/hdb7 1369978 8266 1288618 1% /tmp /dev/hdb10 9621848 1553200 7579872 18% /usr /dev/hdb8 1829159 553592 1177974 32% /var |
#top
top - 14:37:43 up 31 min, 2 users, load average: 2.58, 2.04, 1.21 Tasks: 75 total, 3 running, 72 sleeping, 0 stopped, 0 zombie Cpu(s): 17.2% user, 22.5% system, 0.0% nice, 60.3% idle Mem: 483704k total, 478680k used, 5024k free, 41676k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 979892k total, 516k used, 979376k free, 252692k cached 2179 root 19 0 7664 7664 844 R 19.2 1.6 2:50.53 rsync 2175 root 12 0 4048 4036 2044 S 3.0 0.8 0:50.92 sshd 103 root 9 0 0 0 0 S 0.7 0.0 0:02.51 kjournald 1842 root 5 -10 60960 27m 4172 S 0.7 5.7 2:31.27 Xorg ... 6 root 9 0 0 0 0 S 0.3 0.0 0:00.60 kupdated 304 root 9 0 0 0 0 S 0.3 0.0 0:05.94 kjournald 1943 user 9 0 8944 8944 7120 S 0.3 1.8 0:11.31 gkrellm 1 root 9 0 620 620 540 S 0.0 0.1 0:00.29 init 2 root 9 0 0 0 0 S 0.0 0.0 0:00.02 keventd 3 root 19 19 0 0 0 S 0.0 0.0 0:00.95 ksoftirqd_CPU0 4 root 9 0 0 0 0 S 0.0 0.0 0:06.17 kswapd 5 root 9 0 0 0 0 S 0.0 0.0 0:00.00 bdflush 277 root 9 0 0 0 0 S 0.0 0.0 0:00.00 kcopyd 305 root 9 0 0 0 0 S 0.0 0.0 0:00.17 kjournald |
#top
top - 14:40:45 up 34 min, 1 user, load average: 3.22, 2.56, 1.55 Tasks: 71 total, 5 running, 66 sleeping, 0 stopped, 0 zombie Cpu(s): 8.9% user, 88.1% system, 0.0% nice, 3.0% idle Mem: 483704k total, 479144k used, 4560k free, 40752k buffers PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Swap: 979892k total, 1028k used, 978864k free, 251260k cached 2410 root 16 0 3484 3476 2044 R 67.6 0.7 1:21.98 sshd 2001 user 10 0 7120 7120 5288 R 18.2 1.5 0:26.59 artsd 2414 root 9 0 7344 7344 808 S 4.6 1.5 0:10.69 rsync 4 root 9 0 0 0 0 S 1.0 0.0 0:08.57 kswapd ... 1943 user 9 0 8944 8944 7120 S 0.3 1.8 0:14.28 gkrellm 2014 user 9 0 17676 17m 15m R 0.3 3.7 0:08.20 kdeinit 1 root 8 0 620 620 540 S 0.0 0.1 0:00.29 init 2 root 9 0 0 0 0 S 0.0 0.0 0:00.05 keventd 5 root 9 0 0 0 0 S 0.0 0.0 0:00.00 bdflush 6 root 9 0 0 0 0 S 0.0 0.0 0:01.19 kupdated 103 root 9 0 0 0 0 S 0.0 0.0 0:02.85 kjournald 277 root 9 0 0 0 0 S 0.0 0.0 0:00.00 kcopyd 304 root 9 0 0 0 0 S 0.0 0.0 0:07.35 kjournald 305 root 9 0 0 0 0 S 0.0 0.0 0:00.17 kjournald |
#mail user@debian.linux.nt
Subject: Preved! Preved medved! . Cc: Can't send mail: sendmail process failed with error code 67 |
#tail /var/log/daemon.log
Sep 21 14:08:59 linux2 xinetd[1644]: removing time Sep 21 14:08:59 linux2 xinetd[1644]: removing time Sep 21 14:08:59 linux2 xinetd[1644]: bind failed (Address already in use (errno = 98)). service = echo-stream Sep 21 14:08:59 linux2 xinetd[1644]: Service echo-stream failed to start and is deactivated. Sep 21 14:08:59 linux2 xinetd[1644]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Sep 21 14:08:59 linux2 xinetd[1644]: Started working: 4 available services Sep 21 14:09:00 linux2 rpc.statd[1708]: Version 1.0.6 Starting Sep 21 14:09:00 linux2 rpc.statd[1708]: statd running as root. chown /var/lib/nfs/sm to choose different user Sep 21 14:41:36 linux2 xinetd[2512]: warning: can't get client address: Transport endpoint is not connected Sep 21 14:41:37 linux2 identd[2512]: started |
#tail /var/log/mail.log
Sep 21 12:50:23 linux2 sm-mta[11152]: k8L9oN9J011150: to=<user@yuriksat.linux.nt>, ctladdr=<user@yuriksat.yuriksat.linux.nt> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30597, dsn=2.0.0, stat=Sent Sep 21 14:09:01 linux2 sm-mta[1790]: starting daemon (8.13.8): SMTP+queueing@00:10:00 Sep 21 14:41:36 linux2 sendmail[2509]: k8LBfaRU002509: from=root, size=58, class=0, nrcpts=1, msgid=<200609211141.k8LBfaRU002509@linux2.linux.nt>, relay=root@localhost Sep 21 14:41:37 linux2 sm-mta[2511]: k8LBfbHG002511: <user@debian.linux.nt>... Unrecognized host name debian.linux.nt. Sep 21 14:41:37 linux2 sendmail[2509]: k8LBfaRU002509: to=user@debian.linux.nt, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30058, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.2, stat=User unknown Sep 21 14:41:37 linux2 sm-mta[2511]: k8LBfbHG002511: from=<root@linux2.linux.nt>, size=58, class=0, nrcpts=0, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:41:37 linux2 sendmail[2509]: k8LBfaRU002509: k8LBfaRV002509: DSN: User unknown Sep 21 14:41:37 linux2 sm-mta[2511]: k8LBfbHI002511: from=<>, size=2072, class=0, nrcpts=1, msgid=<200609211141.k8LBfaRV002509@linux2.linux.nt>, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:41:37 linux2 sendmail[2509]: k8LBfaRV002509: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31082, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBfbHI002511 Message accepted for delivery) Sep 21 14:41:37 linux2 sm-mta[2520]: k8LBfbHI002511: to=user, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32312, dsn=2.0.0, stat=Sent |
#echo hello | mail -s m user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#echo hello | mail -s m user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#man sendmail
|
#tail /var/log/mail.log
Sep 21 14:42:29 linux2 sendmail[2542]: k8LBgTSI002542: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31067, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBgT3O002544 Message accepted for delivery) Sep 21 14:42:29 linux2 sm-mta[2546]: k8LBgT3O002544: to=user, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32297, dsn=2.0.0, stat=Sent Sep 21 14:42:44 linux2 sendmail[2555]: k8LBgijW002555: from=root, size=43, class=0, nrcpts=1, msgid=<200609211142.k8LBgijW002555@linux2.linux.nt>, relay=root@localhost Sep 21 14:42:44 linux2 sm-mta[2557]: k8LBgi8n002557: <user@debian.linux.nt>... Unrecognized host name debian.linux.nt. Sep 21 14:42:44 linux2 sendmail[2555]: k8LBgijW002555: to=user@debian.linux.nt, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30043, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.2, stat=User unknown Sep 21 14:42:44 linux2 sm-mta[2557]: k8LBgi8n002557: from=<root@linux2.linux.nt>, size=43, class=0, nrcpts=0, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:42:44 linux2 sendmail[2555]: k8LBgijW002555: k8LBgijX002555: DSN: User unknown Sep 21 14:42:44 linux2 sm-mta[2557]: k8LBgi8p002557: from=<>, size=2057, class=0, nrcpts=1, msgid=<200609211142.k8LBgijX002555@linux2.linux.nt>, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:42:44 linux2 sendmail[2555]: k8LBgijX002555: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31067, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBgi8p002557 Message accepted for delivery) Sep 21 14:42:44 linux2 sm-mta[2559]: k8LBgi8p002557: to=user, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32297, dsn=2.0.0, stat=Sent |
#dig debian.linux.nt mx
; <<>> DiG 9.2.4 <<>> debian.linux.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29166 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;debian.linux.nt. IN MX ;; ANSWER SECTION: debian.linux.nt. 10693 IN MX 1 debian.debian.linux.nt. ;; AUTHORITY SECTION: debian.linux.nt. 10693 IN NS debian.debian.linux.nt. ;; ADDITIONAL SECTION: debian.debian.linux.nt. 10693 IN A 192.168.15.4 ;; Query time: 55 msec ;; SERVER: 192.168.15.254#53(192.168.15.254) ;; WHEN: Thu Sep 21 14:43:24 2006 ;; MSG SIZE rcvd: 86 |
#telnet debian.debian.linux.nt 25
Trying 192.168.15.4... Connected to debian.debian.linux.nt. Escape character is '^]'. 220 yellow.sergey.linux.nt ESMTP Sendmail 8.13.8/8.13.8/Debian-2; Thu, 21 Sep 2006 14:44:29 +0300; (No UCE/UBE) logging access from: linux2.linux.nt(OK)-root@linux2.linux.nt [192.168.15.2] HELO h 250 yellow.sergey.linux.nt Hello root@linux2.linux.nt [192.168.15.2], pleased to meet you ^] telnet> q Connection closed. |
#echo hello | mail -s m user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#echo hello | mail -s m user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#echo test | mail user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#tail /var/log/mail.log
Sep 21 14:45:54 linux2 sendmail[2633]: k8LBjsqb002633: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31067, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBjsZK002635 Message accepted for delivery) Sep 21 14:45:54 linux2 sm-mta[2644]: k8LBjsZK002635: to=user, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32297, dsn=2.0.0, stat=Sent Sep 21 14:47:18 linux2 sendmail[2719]: k8LBlIdv002719: from=root, size=31, class=0, nrcpts=1, msgid=<200609211147.k8LBlIdv002719@linux2.linux.nt>, relay=root@localhost Sep 21 14:47:18 linux2 sm-mta[2721]: k8LBlI3D002721: <user@debian.linux.nt>... Unrecognized host name debian.linux.nt. Sep 21 14:47:18 linux2 sendmail[2719]: k8LBlIdv002719: to=user@debian.linux.nt, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30031, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.2, stat=User unknown Sep 21 14:47:18 linux2 sm-mta[2721]: k8LBlI3D002721: from=<root@linux2.linux.nt>, size=31, class=0, nrcpts=0, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:47:18 linux2 sendmail[2719]: k8LBlIdv002719: k8LBlIdw002719: DSN: User unknown Sep 21 14:47:19 linux2 sm-mta[2721]: k8LBlI3F002721: from=<>, size=2045, class=0, nrcpts=1, msgid=<200609211147.k8LBlIdw002719@linux2.linux.nt>, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost [127.0.0.1] Sep 21 14:47:19 linux2 sendmail[2719]: k8LBlIdw002719: to=root, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31055, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBlI3F002721 Message accepted for delivery) Sep 21 14:47:19 linux2 sm-mta[2723]: k8LBlI3F002721: to=user, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=32285, dsn=2.0.0, stat=Sent |
#dig debian.linux.nt mx
; <<>> DiG 9.2.4 <<>> debian.linux.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 492 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;debian.linux.nt. IN MX ;; ANSWER SECTION: debian.linux.nt. 10416 IN MX 1 debian.debian.linux.nt. ;; AUTHORITY SECTION: debian.linux.nt. 10416 IN NS debian.debian.linux.nt. ;; ADDITIONAL SECTION: debian.debian.linux.nt. 10416 IN A 192.168.15.4 ;; Query time: 5 msec ;; SERVER: 192.168.15.254#53(192.168.15.254) ;; WHEN: Thu Sep 21 14:48:00 2006 ;; MSG SIZE rcvd: 86 |
#rndc flush
|
#dig debian.linux.nt mx
; <<>> DiG 9.2.4 <<>> debian.linux.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46078 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;debian.linux.nt. IN MX ;; ANSWER SECTION: debian.linux.nt. 10410 IN MX 1 debian.debian.linux.nt. ;; AUTHORITY SECTION: debian.linux.nt. 10410 IN NS debian.debian.linux.nt. ;; ADDITIONAL SECTION: debian.debian.linux.nt. 10410 IN A 192.168.15.4 ;; Query time: 3 msec ;; SERVER: 192.168.15.254#53(192.168.15.254) ;; WHEN: Thu Sep 21 14:48:06 2006 ;; MSG SIZE rcvd: 86 |
#rndc flush
|
#dig debian.linux.nt mx
; <<>> DiG 9.2.4 <<>> debian.linux.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31460 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;debian.linux.nt. IN MX ;; ANSWER SECTION: debian.linux.nt. 10401 IN MX 1 debian.debian.linux.nt. ;; AUTHORITY SECTION: debian.linux.nt. 10401 IN NS debian.debian.linux.nt. ;; ADDITIONAL SECTION: debian.debian.linux.nt. 10401 IN A 192.168.15.4 ;; Query time: 4 msec ;; SERVER: 192.168.15.254#53(192.168.15.254) ;; WHEN: Thu Sep 21 14:48:15 2006 ;; MSG SIZE rcvd: 86 |
#rndc flush
|
#dig debian.linux.nt mx
; <<>> DiG 9.2.4 <<>> debian.linux.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51273 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;debian.linux.nt. IN MX ;; ANSWER SECTION: debian.linux.nt. 10791 IN MX 1 debian.debian.linux.nt. ;; AUTHORITY SECTION: debian.linux.nt. 10791 IN NS debian.debian.linux.nt. ;; ADDITIONAL SECTION: debian.debian.linux.nt. 10791 IN A 192.168.15.3 ;; Query time: 3 msec ;; SERVER: 192.168.15.254#53(192.168.15.254) ;; WHEN: Thu Sep 21 14:48:48 2006 ;; MSG SIZE rcvd: 86 |
#echo test | mail user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#ls /etc/mail/
access helpfile sasl smrsh access.db local-host-names sendmail.cf submit.cf address.resolve m4 sendmail.conf submit.mc aliases Makefile sendmail.mc TEMPFILE aliases.db NoSuchFile service.switch tls databases peers service.switch-nodns trusted-users |
#telnet debian.debian.linux.nt 25
Trying 192.168.15.3... Connected to debian.debian.linux.nt. Escape character is '^]'. 220 linux3.linux.nt ESMTP Sendmail 8.13.8/8.13.8/Debian-2; Thu, 21 Sep 2006 14:50:04 +0300; (No UCE/UBE) logging access from: linux2.linux.nt(OK)-root@linux2.linux.nt [192.168.15.2] HELO f 250 linux3.linux.nt Hello root@linux2.linux.nt [192.168.15.2], pleased to meet you MAIL FROM: root@yuriksat.linux.nt 250 2.1.0 root@yuriksat.linux.nt... Sender ok RCPT TO: user@debian.linux.nt 550 5.7.1 user@debian.linux.nt... Relaying denied ^] telnet> q Connection closed. |
#echo hello | mail -s m user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#netstat
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 yuriksat.yuriksat:32778 64.12.28.220:5190 ESTABLISHED tcp 0 0 yuriksat.yuriksat.:smtp linux4.max.linux.:43236 TIME_WAIT tcp 0 0 yuriksat.yuriksat.:smtp linux4.max.linux.:43242 TIME_WAIT tcp 0 0 yuriksat.yuriksat:33022 62.149.17.62:18030 TIME_WAIT tcp 0 0 yuriksat.yuriksat:33023 linux4.max.linux.n:auth TIME_WAIT tcp 0 0 yuriksat.yuriksat:33021 linux4.max.linux.n:auth TIME_WAIT Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path ... unix 5 [ ] STREAM CONNECTED 3365 /tmp/.X11-unix/X0 unix 3 [ ] STREAM CONNECTED 3358 unix 2 [ ] DGRAM 3254 unix 2 [ ] DGRAM 3201 unix 2 [ ] DGRAM 2996 unix 2 [ ] DGRAM 2609 unix 3 [ ] STREAM CONNECTED 2196 unix 3 [ ] STREAM CONNECTED 2195 unix 2 [ ] DGRAM 2098 unix 2 [ ] DGRAM 2078 |
#netstat eth0
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 yuriksat.yuriksat:32778 64.12.28.220:5190 ESTABLISHED tcp 0 0 yuriksat.yuriksat.:smtp linux4.max.linux.:43236 TIME_WAIT tcp 0 0 yuriksat.yuriksat.:smtp linux4.max.linux.:43242 TIME_WAIT tcp 0 0 yuriksat.yuriksat:33024 62.149.17.62:18030 TIME_WAIT tcp 0 0 yuriksat.yuriksat:33022 62.149.17.62:18030 TIME_WAIT tcp 0 0 yuriksat.yuriksat:33023 linux4.max.linux.n:auth TIME_WAIT tcp 0 0 yuriksat.yuriksat:33021 linux4.max.linux.n:auth TIME_WAIT Active UNIX domain sockets (w/o servers) ... unix 5 [ ] STREAM CONNECTED 3365 /tmp/.X11-unix/X0 unix 3 [ ] STREAM CONNECTED 3358 unix 2 [ ] DGRAM 3254 unix 2 [ ] DGRAM 3201 unix 2 [ ] DGRAM 2996 unix 2 [ ] DGRAM 2609 unix 3 [ ] STREAM CONNECTED 2196 unix 3 [ ] STREAM CONNECTED 2195 unix 2 [ ] DGRAM 2098 unix 2 [ ] DGRAM 2078 |
#netstat -P eth0
netstat: invalid option -- P usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vnNcaeol] [<Socket> ...] netstat { [-veenNac] -i | [-cnNe] -M | -s } -r, --route display routing table -i, --interfaces display interface table -g, --groups display multicast group memberships -s, --statistics display networking statistics (like SNMP) -M, --masquerade display masqueraded connections -v, --verbose be verbose ... -a, --all, --listening display all sockets (default: connected) -o, --timers display timers -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#netstat -p eth0
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 yuriksat.yuriksat:32778 64.12.28.220:5190 ESTABLISHED2022/sim tcp 0 0 yuriksat.yuriksat.:smtp linux4.max.linux.:43242 TIME_WAIT - tcp 0 0 yuriksat.yuriksat:33024 62.149.17.62:18030 TIME_WAIT - tcp 0 0 yuriksat.yuriksat:33025 62.149.17.62:18030 TIME_WAIT - tcp 0 0 yuriksat.yuriksat:33026 62.149.17.62:18030 TIME_WAIT - tcp 0 0 yuriksat.yuriksat:33022 62.149.17.62:18030 TIME_WAIT - tcp 0 0 yuriksat.yuriksat:33023 linux4.max.linux.n:auth TIME_WAIT - Active UNIX domain sockets (w/o servers) ... unix 5 [ ] STREAM CONNECTED 3365 1842/X /tmp/.X11-unix/X0 unix 3 [ ] STREAM CONNECTED 3358 1830/gdm unix 2 [ ] DGRAM 3254 1790/sendmail: MTA: unix 2 [ ] DGRAM 3201 1708/rpc.statd unix 2 [ ] DGRAM 2996 1644/xinetd unix 2 [ ] DGRAM 2609 1621/lpd unix 3 [ ] STREAM CONNECTED 2196 1589/dbus-daemon-1 unix 3 [ ] STREAM CONNECTED 2195 1589/dbus-daemon-1 unix 2 [ ] DGRAM 2098 1570/named unix 2 [ ] DGRAM 2078 1554/klogd |
#mail
No mail for root |
#echo test | mail user@debian.linux.nt
Can't send mail: sendmail process failed with error code 67 |
#echo test | mail user@lav.unix.nt
Can't send mail: sendmail process failed with error code 67 |
#su - user
l3-agent is already running: pid=3042; pidfile=/home/user/.lilalo/l3-agent.pid |
$echo test | mail user@lav.unix.nt
/home/user/dead.letter... Saved message in /home/user/dead.letter Can't send mail: sendmail process failed with error code 67 |
$exit
exit |
#make aliases
Updating ALIAS_FILE ... WARNING: local host name (;; connection timed out; no servers could be reached) is not qualified; see cf/README: WHO AM I? /etc/mail/aliases: 12 aliases, longest 10 bytes, 134 bytes total |
#tail sendmail.mc
dnl # Masquerading options FEATURE(`always_add_domain')dnl MASQUERADE_AS(`localhost.localdomain')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl FEATURE(`use_cw_file')dnl |
#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: ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail. |
#echo test | mail user@lav.unix.nt
Can't send mail: sendmail process failed with error code 67 |
#sendmail -d0.1 -bt < /dev/null
Version 8.13.8 Compiled with: DNSMAP LDAPMAP LDAP_REFERRALS LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS USERDB USE_LDAP_INIT XDEBUG ============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = linux2 (canonical domain name) $j = ;; connection timed out; no servers could be reached (subdomain name) $m = linux.nt (node name) $k = linux2.linux.nt ======================================================== WARNING: local host name (;; connection timed out; no servers could be reached) is not qualified; see cf/README: WHO AM I? ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > You have new mail in /var/mail/root |
Время первой команды журнала | 12:37:44 2006- 9-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:00:51 2006- 9-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.50 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008