/l3/users/clint/nt-lnet-2006-06-26/linux2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 |
|
#ps aux | grep bind
root 11577 0.0 0.1 3892 1100 pts/8 S+ 16:23 0:00 /usr/bin/vi /etc/bind/named.conf root 11739 0.0 0.0 3336 612 pts/12 S+ 16:35 0:00 grep bind |
#ps aux | grep named
root 11509 0.0 0.1 2896 1792 ? Ss 16:21 0:00 /usr/sbin/named root 11577 0.0 0.1 3892 1100 pts/8 S+ 16:23 0:00 /usr/bin/vi /etc/bind/named.conf root 11746 0.0 0.0 3336 608 pts/12 R+ 16:35 0:00 grep named |
#vi /etc/default/n
|
#vi /etc/init.d/bind
|
#ls /etc/default/
arpwatch discover ifupdown locale portmap syslogd bootlogd exim4 initrd-tools.sh lpd rcS tmpfs devpts halt iptables nfs-common rsync useradd dirmngr hotplug klogd ntpdate ssh xinetd |
#screen -x
|
#vi /etc/bind/named.conf
|
#vi /etc/bind/named.conf.options
|
#vi /etc/bind/named.conf
43a44,45 > > 50a53,60 > zone "linux1.unix.nt" { > type slave; > file "db.linux1.bak"; > forwarders{}; > allow-transfer {127.0.0.1; }; > masters { 192.168.15.1; }; > }; > |
#/etc/init.d/bind restart
Stopping domain name service: named. Starting domain name service: named. |
#ls /var/cache/bind/
db.linux1.bak |
#dig @127.0.0.1 linux1.unix.nt axfr
;; Connection to 127.0.0.1#53(127.0.0.1) for linux1.unix.nt failed: connection refused. |
#vi /etc/bind/named.conf
57c57 < allow-transfer {127.0.0.1; }; --- > allow-transfer { 127.0.0.1; }; |
#dig @127.0.0.1 linux1.unix.nt axfr
;; Connection to 127.0.0.1#53(127.0.0.1) for linux1.unix.nt failed: connection refused. |
#iptables -L INPUT
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with tcp-reset |
#iptables -I INPUT -p tcp --dport 53 --syn -j ACCEPT
|
#dig @127.0.0.1 linux1.unix.nt axfr
; <<>> DiG 9.3.2 <<>> @127.0.0.1 linux1.unix.nt axfr ; (1 server found) ;; global options: printcmd linux1.unix.nt. 3600 IN SOA kolya.linux1.unix.nt. admin.linux2.unix.nt. 200651103 10800 3600 604800 86400 linux1.unix.nt. 3600 IN NS kolya.linux1.unix.nt. linux1.unix.nt. 3600 IN NS m02.linux2.unix.nt. linux1.unix.nt. 3600 IN MX 10 kolya.linux1.unix.nt. m02.linux1.unix.nt. 3600 IN A 192.168.15.2 admin.linux1.unix.nt. 3600 IN A 192.168.15.254 kolya.linux1.unix.nt. 3600 IN A 192.168.15.1 linux15.linux1.unix.nt. 3600 IN A 192.168.15.15 linux1.unix.nt. 3600 IN SOA kolya.linux1.unix.nt. admin.linux2.unix.nt. 200651103 10800 3600 604800 86400 ;; Query time: 18 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Jun 28 16:40:34 2006 ;; XFR size: 9 records (messages 9) |
#vi /etc/bind/named.conf
|
#vi /etc/bind/db.
|
#ssh 192.168.15.254
Connection to m01 closed by remote host. |
#ssh user@192.168.15.254
Password: Linux herz.linux.nt 2.6.17 #1 PREEMPT Sun Jun 25 09:50:55 EEST 2006 i686 GNU/Linux 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. No mail. Last login: Wed Jun 28 10:48:46 2006 from linux2.linux.nt user@herz:~$ ... ;3 PTR linux3.linux.nt. ;4 PTR linux4.linux.nt. ;5 PTR linux5.linux.nt. 6 PTR linux6.linux.nt. 7 PTR linux7.linux.nt. 8 PTR linux8.linux.nt. 9 PTR linux9.linux.nt. 10 PTR linux10.linux.nt. 11 PTR linux11.linux.nt. 12 PTR linux12.linux.nt. |
#ssh 192.168.15.254
|
#ssh user@192.168.15.254
Password: Linux herz.linux.nt 2.6.10 #1 Fri Mar 11 12:21:52 EET 2005 i686 GNU/Linux 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. No mail. Last login: Wed Jun 28 17:11:52 2006 from 192.168.15.2 Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa) ... 25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly #*/10 9-17 * * * devi HOME=/home/devi /home/devi/lm/lm-web > /dev/null 2>&1 30 7 * * * root ssh -f -N -R 20000:127.0.0.1:22 devi@home 30 13,17 * * * devi sh -c 'PATH=$PATH:~/bin; cd /home/devi/cvs/lilalo; ./lm do copy-lablogs ; ./lm report' >& /dev/null * * * * * root /var/lilalo/lablogs-xml/trainings/sync > /dev/null 2>&1 user@herz:~$ exit logout Connection to 192.168.15.254 closed. |
#apt-cache search sendmail
amavisd-new - Interface between MTA and virus scanner/content filters amavisd-new-milter - Interface between sendmail-milter and amavisd-new anteater - MTA log analyser written 100% in C++ balsa - An e-mail client for GNOME clamav-milter - antivirus scanner for sendmail dcc-milter - Distributed Checksum Clearinghouse - sendmail milter plugin dhis-mx-sendmail-engine - Dynamic Host Information System - sendmail MX engine drac - Dynamic Relay Authorization Control (pop-before-smtp) drac-dev - Dynamic Relay Authorization Control (development files) emil - Conversion Filter for Internet Messages ... sendmail-bin - powerful, efficient, and scalable Mail Transport Agent sendmail-cf - powerful, efficient, and scalable Mail Transport Agent sendmail-doc - powerful, efficient, and scalable Mail Transport Agent sensible-mda - Mail Delivery Agent wrapper smtpd - Mail proxy for firewalls with anti-spam and anti-relay features smtpfeed - SMTP feed -- SMTP Fast Exploding External Deliver for Sendmail spamass-milter - sendmail milter for filtering mail through spamassassin spfmilter - A simple milter for performing SPF checks uw-imapd - remote mail folder access server uw-mailutils - C-client support programs from UW |
#apt-get install sendmail.*
Reading package lists... Done Building dependency tree... Done Note, selecting sendmail-bin for regex ‘sendmail.*’ Note, selecting sendmail-doc for regex ‘sendmail.*’ Note, selecting sendmail for regex ‘sendmail.*’ Note, selecting sendmail-base for regex ‘sendmail.*’ Note, selecting sendmail-tls for regex ‘sendmail.*’ Note, selecting libsendmail-pmilter-perl for regex ‘sendmail.*’ Note, selecting libsendmail-milter-perl for regex ‘sendmail.*’ Note, selecting libmail-sendmail-perl for regex ‘sendmail.*’ ... requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies. libsendmail-pmilter-perl: Conflicts: libsendmail-milter-perl but 0.18-7 is to be installed E: Broken packages |
#apt-get install sendmail
Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies. sendmail: Depends: sendmail-bin (= 8.13.7-1) but it is not going to be installed Depends: rmail (= 8.13.7-1) but it is not going to be installed E: Broken packages |
#apt-get install sendmail-bin
mailx depends on exim4 | mail-transport-agent; however: Package exim4 is not installed. Package mail-transport-agent is not installed. Package exim4-daemon-light which provides mail-transport-agent is to be removed. mutt depends on exim4 | mail-transport-agent; however: Package exim4 is not installed. Package mail-transport-agent is not installed. Package exim4-daemon-light which provides mail-transport-agent is to be removed. Removing exim4-daemon-light ... Stopping MTA: exim4. ... Warning: 3 database(s) sources were not found, (but were created) please investigate. Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating 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() Starting Mail Transport Agent: sendmail. |
#apt-get install sendmail
Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies. sendmail: Depends: sendmail-bin (= 8.13.7-1) but it is not going to be installed Depends: rmail (= 8.13.7-1) but it is not going to be installed E: Broken packages |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc ca-certificates logcheck sasl2-bin openssl Recommended packages: resolvconf The following packages will be REMOVED exim4 exim4-base exim4-config exim4-daemon-light The following NEW packages will be installed sendmail-base sendmail-bin sendmail-cf 0 upgraded, 3 newly installed, 4 to remove and 15 not upgraded. Need to get 1458kB of archives. After unpacking 803kB of additional disk space will be used. Do you want to continue [Y/n]? |
#apt-get install sendmail-doc
Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed sendmail-doc 0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded. Need to get 821kB of archives. After unpacking 1135kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! sendmail-doc Install these packages without verification [y/N]? y Get: 1 http://debian.org.ua testing/main sendmail-doc 8.13.7-1 [821kB] Fetched 821kB in 24s (33,7kB/s) Selecting previously deselected package sendmail-doc. (Reading database ... 67230 files and directories currently installed.) Unpacking sendmail-doc (from .../sendmail-doc_8.13.7-1_all.deb) ... Setting up sendmail-doc (8.13.7-1) ... |
#apt-cache search sendmail
amavisd-new - Interface between MTA and virus scanner/content filters amavisd-new-milter - Interface between sendmail-milter and amavisd-new anteater - MTA log analyser written 100% in C++ balsa - An e-mail client for GNOME clamav-milter - antivirus scanner for sendmail dcc-milter - Distributed Checksum Clearinghouse - sendmail milter plugin dhis-mx-sendmail-engine - Dynamic Host Information System - sendmail MX engine drac - Dynamic Relay Authorization Control (pop-before-smtp) drac-dev - Dynamic Relay Authorization Control (development files) emil - Conversion Filter for Internet Messages ... sendmail-bin - powerful, efficient, and scalable Mail Transport Agent sendmail-cf - powerful, efficient, and scalable Mail Transport Agent sendmail-doc - powerful, efficient, and scalable Mail Transport Agent sensible-mda - Mail Delivery Agent wrapper smtpd - Mail proxy for firewalls with anti-spam and anti-relay features smtpfeed - SMTP feed -- SMTP Fast Exploding External Deliver for Sendmail spamass-milter - sendmail milter for filtering mail through spamassassin spfmilter - A simple milter for performing SPF checks uw-imapd - remote mail folder access server uw-mailutils - C-client support programs from UW |
#vi /etc/ma
|
#vi /etc/ma
|
#vi /etc/mail/se
|
#vi /etc/mail/se
|
#vi /etc/mail/sendmail.mc
|
#apt-get install sendmail-cf
Reading package lists... Done Building dependency tree... Done sendmail-cf is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded. |
#screen -X
|
#[root@linux2:~]#
[root@linux2:~]# [root@linux2:~]# [root@linux2:~]# [root@linux2:~]# ls /etc/mail 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 [root@linux2:~]# |
#ls /etc/mail
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 |
#dig @linux2.unix.nt mx
a.root-servers.net. 602803 IN A 198.41.0.4 h.root-servers.net. 602803 IN A 128.63.2.53 c.root-servers.net. 602803 IN A 192.33.4.12 g.root-servers.net. 602803 IN A 192.112.36.4 f.root-servers.net. 602803 IN A 192.5.5.241 b.root-servers.net. 602803 IN A 192.228.79.201 j.root-servers.net. 602803 IN A 192.58.128.30 k.root-servers.net. 602803 IN A 193.0.14.129 ;; Query time: 35 msec ;; SERVER: 192.168.15.2#53(192.168.15.2) ;; WHEN: Thu Jun 29 10:15:47 2006 ;; MSG SIZE rcvd: 436 |
#dig @m02.unix.nt mx
j.root-servers.net. 602783 IN A 192.58.128.30 k.root-servers.net. 602783 IN A 193.0.14.129 l.root-servers.net. 602783 IN A 198.32.64.12 m.root-servers.net. 602783 IN A 202.12.27.33 i.root-servers.net. 602783 IN A 192.36.148.17 e.root-servers.net. 602783 IN A 192.203.230.10 ;; Query time: 17 msec ;; SERVER: 192.168.15.2#53(192.168.15.2) ;; WHEN: Thu Jun 29 10:16:07 2006 ;; MSG SIZE rcvd: 436 [root@linux2:~]# vi /etc/resolv dig: couldn't get address for 'm02.unix.nt': not found |
#dig @linux2.unix.nt mx
; <<>> DiG 9.3.2 <<>> @linux2.unix.nt mx ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35051 ;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 ;; QUESTION SECTION: ;. IN NS ;; ANSWER SECTION: . 516383 IN NS d.root-servers.net. ... j.root-servers.net. 602783 IN A 192.58.128.30 k.root-servers.net. 602783 IN A 193.0.14.129 l.root-servers.net. 602783 IN A 198.32.64.12 m.root-servers.net. 602783 IN A 202.12.27.33 i.root-servers.net. 602783 IN A 192.36.148.17 e.root-servers.net. 602783 IN A 192.203.230.10 ;; Query time: 17 msec ;; SERVER: 192.168.15.2#53(192.168.15.2) ;; WHEN: Thu Jun 29 10:16:07 2006 ;; MSG SIZE rcvd: 436 |
#vi /etc/resolv.conf
|
#vi /etc/bind/named.conf
|
#vi /etc/bind/db.linux2
|
#dig linux2.unix.nt mx
; <<>> DiG 9.3.2 <<>> linux2.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6830 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;linux2.unix.nt. IN MX ;; ANSWER SECTION: linux2.unix.nt. 3600 IN MX 10 m02.linux2.unix.nt. ;; AUTHORITY SECTION: linux2.unix.nt. 3600 IN NS linux15.sergey.unix.nt. linux2.unix.nt. 3600 IN NS m02.linux2.unix.nt. ;; ADDITIONAL SECTION: m02.linux2.unix.nt. 3600 IN A 192.168.15.2 ;; Query time: 9 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Jun 29 10:16:48 2006 ;; MSG SIZE rcvd: 111 |
#cd /etc/mail
linux2.unix.nt ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
#cat local-host-names
localhost linux2.unix.nt.unix.nt |
#vi local-host-names
2c2,4 < linux2.unix.nt.unix.nt --- > linux2.unix.nt > m02.linux2.unix.nt > |
#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 |
#less sendmail.mc
|
#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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... The following file(s) have changed: ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#sudo /etc/init.d/sendmail restart
To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... The following file(s) have changed: ** ** You should issue `/etc/init.d/sendmail reload` ** ** [root@linux2:mail]# sudo /etc/init.d/sendmail restart Restarting Transport Agent: sendmail. [root@linux2:mail]# [root@linux2:mail]# [root@linux2:mail]# netstat -lnp | grep Restarting Transport Agent: sendmail. |
#netstat -lnp | grep :25
dnl # instead - it will prevent any writes outside of /home ! tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5099/sendmail: MTA: 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 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, Addr=::1')dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, 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 |
#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 |
#vi sendmail.mc
56c56,57 < DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl --- > #DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl > DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. ... 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
56c56 < #DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl --- > dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. ... 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
|
#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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. ... 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
56,57c56,57 < DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl < dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl --- > dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl > DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. ... 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` ** ** |
#/etc/init.d/sendmail reload
Reloading Mail Transport Agent configuration: sendmail. |
#netstat -lnp | grep :25
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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 ... tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5099/sendmail: MTA: |
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail. |
#netstat -lnp | grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5099/sendmail: MTA: |
#vi sendmail.mc
|
#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 |
#ls -l
total 187 -rw------- 1 root root 4211 2006-06-29 10:12 access -rw-r----- 1 smmta smmsp 12288 2006-06-29 10:12 access.db -rw-r--r-- 1 root root 281 2006-06-15 02:05 address.resolve lrwxrwxrwx 1 root smmsp 10 2006-06-29 10:12 aliases -> ../aliases -rw-r----- 1 smmta smmsp 12288 2006-06-29 10:12 aliases.db -rw-r--r-- 1 root smmsp 3117 2006-06-29 10:22 databases -rw-r--r-- 1 root root 5594 2006-06-15 02:05 helpfile -rw-r--r-- 1 root smmsp 45 2006-06-29 10:18 local-host-names drwxr-sr-x 2 smmta smmsp 1024 2006-06-29 10:12 m4 ... -rw-r--r-- 1 root smmsp 269 2006-06-29 10:22 sendmail.cf.errors -rw-r--r-- 1 root root 11888 2006-06-29 10:12 sendmail.conf -rw-r--r-- 1 root smmsp 4170 2006-06-29 10:22 sendmail.mc -rw-r--r-- 1 root root 149 2006-06-15 02:05 service.switch -rw-r--r-- 1 root root 180 2006-06-15 02:05 service.switch-nodns drwxr-sr-x 2 smmta smmsp 1024 2006-06-29 10:12 smrsh -rw-r--r-- 1 root smmsp 43623 2006-06-29 10:12 submit.cf -rw-r--r-- 1 root smmsp 2284 2006-06-29 10:12 submit.mc drwxr-xr-x 2 root smmsp 1024 2006-06-15 02:05 tls -rw-r--r-- 1 root smmsp 0 2006-06-29 10:12 trusted-users |
#date
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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 ... Thu Jun 29 10:22:57 EEST 2006 |
#less sendmail.cf.errors
|
#vi sendmail.mc
97,100d96 < dnl # Default Mailer setup < MAILER_DEFINITIONS < MAILER(`local')dnl < MAILER(`smtp')dnl 106a103,107 > > dnl # Default Mailer setup > MAILER_DEFINITIONS > MAILER(`local')dnl > MAILER(`smtp')dnl |
#make
to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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` ** ** |
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail. |
#netstat -lnp | grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5099/sendmail: MTA: |
#vi sendmail.mc
59c59 < DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, Addr=127.0.0.1')dnl --- > DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission')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" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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.conf
|
#/etc/init.d/sendmail stop
Stopping Mail Transport Agent: sendmail. |
#netstat -lnp | grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5099/sendmail: MTA: |
#kill 5099
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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 ... |
#netstat -lnp | grep :25
|
#/etc/init.d/sendmail start
Starting Mail Transport Agent: sendmail. |
#netstat -lnp | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6961/sendmail: MTA: |
#la /var/mail/
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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 ... bash: la: command not found |
#ls /var/mail/
arpwatch user |
#ls /var/spool/mail
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" 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 ... arpwatch user |
#ls /var/spool/mqueue
|
localhost linux2.unix.nt.unix.nt
Время первой команды журнала | 16:35:48 2006- 6-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:26:41 2006- 6-29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 12.87 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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