/l3/trainings/nt-bsdnet/2006-04-03/fbsd2.unix.nt/user :1 :2 :3 :4 :5 :6 :7 |
|
#dig version.bind. chaos txt @vo.unix.nt
dig: couldn't get address for 'vo.unix.nt': not found |
#dig version.bind. chaos txt @192.168.15.22
; <<>> DiG 9.3.1 <<>> version.bind. chaos txt @192.168.15.22 ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16999 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;version.bind. CH TXT ;; ANSWER SECTION: version.bind. 0 CH TXT "MS-Dos 1_2_3" ;; AUTHORITY SECTION: version.bind. 0 CH NS version.bind. ;; Query time: 1 msec ;; SERVER: 192.168.15.22#53(192.168.15.22) ;; WHEN: Wed Apr 5 13:50:38 2006 ;; MSG SIZE rcvd: 69 |
#dig version.bind. chaos txt @fbsd2.vo.unix.nt
; <<>> DiG 9.3.1 <<>> version.bind. chaos txt @fbsd2.vo.unix.nt ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46820 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;version.bind. CH TXT ;; ANSWER SECTION: version.bind. 0 CH TXT "MS-Dos 1_2_3" ;; AUTHORITY SECTION: version.bind. 0 CH NS version.bind. ;; Query time: 1 msec ;; SERVER: 192.168.15.22#53(192.168.15.22) ;; WHEN: Wed Apr 5 13:50:57 2006 ;; MSG SIZE rcvd: 69 |
#xinit
X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 6.0 i386 [ELF] Current Operating System: FreeBSD fbsd2.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr 3 14:33:41 EEST 2006 root@fbsd2.unix.nt:/usr/src/sys/i386/compile/MAIN i386 Build Date: 12 October 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, ... The application 'metacity' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. The application 'gnome-panel' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. The application 'nautilus' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. xinit: connection to X server lost. |
#ls -l /etc/mail
total 248 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1618 Nov 3 10:12 aliases -rw-r----- 1 root wheel 16384 Mar 31 22:05 aliases.db -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#vi local-host-names
|
#ls -l /etc/mail
total 248 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1618 Nov 3 10:12 aliases -rw-r----- 1 root wheel 16384 Mar 31 22:05 aliases.db -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#ls
PROTO.localhost-v6.rev make-localhost rndc.key PROTO.localhost.rev master slave dynamic named.conf local-host-names named.root |
#mv local-host-names /etc/mail/
|
#pwd
/etc/namedb |
#cd ..
|
#cd mail
|
#ls -l
total 250 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1618 Nov 3 10:12 aliases -rw-r----- 1 root wheel 16384 Mar 31 22:05 aliases.db -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 29 Apr 5 14:50 local-host-names -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#vi local-host-names
|
#cat access.sample
# $FreeBSD: src/etc/mail/access.sample,v 1.3 2000/11/02 23:40:40 dirk Exp $ # # Mail relay access control list. Default is to reject mail unless the # destination is local, or listed in /etc/mail/local-host-names # cyberspammer.com 550 We don't accept mail from spammers FREE.STEALTH.MAILER@ 550 We don't accept mail from spammers another.source.of.spam REJECT okay.cyberspammer.com OK 128.32 RELAY |
#pwd
/etc/mail |
#ls -l
total 356 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1618 Nov 3 10:12 aliases -rw-r----- 1 root wheel 16384 Mar 31 22:05 aliases.db -rw-r--r-- 1 root wheel 57745 Apr 5 14:55 fbsd2.unix.nt.cf -rw-r--r-- 1 root wheel 4113 Apr 5 14:55 fbsd2.unix.nt.mc -rw-r--r-- 1 root wheel 40398 Apr 5 14:55 fbsd2.unix.nt.submit.cf -r--r--r-- 1 root wheel 894 Apr 5 14:55 fbsd2.unix.nt.submit.mc -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 44 Apr 5 14:52 local-host-names -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#vi fbsd2.unix.nt.mc
|
#vi /etc/rc.conf
|
#/etc/rc.d/sendmail start
sendmail already running? (pid=444). |
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#vi /etc/aliases
|
#vi /etc/aliases
|
#newaliases
/etc/mail/aliases: line 19: Non-continuation line starts with space /etc/mail/aliases: 27 aliases, longest 10 bytes, 275 bytes total |
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#echo hello | mail -s 'mail test' user
|
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt
|
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@fbsd2.unix.nt Wed Apr 5 15:04 18/668 "mail test" & Message 1: From user@fbsd2.unix.nt Wed Apr 5 15:04:03 2006 Date: Wed, 5 Apr 2006 15:04:03 +0300 (EEST) From: NT-BSDNet Student #2 <user@fbsd2.unix.nt> To: user@fbsd2.unix.nt Subject: mail test ... & ^CInterrupt & ^CInterrupt & ^CInterrupt & ^CInterrupt & ^CInterrupt & ^CInterrupt & ^CInterrupt & ^Z [1]+ Stopped mail You have new mail in /var/mail/user |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 4 messages 4 new >N 1 user@fbsd2.unix.nt Wed Apr 5 15:04 18/668 "mail test" N 2 root@fbsd4.unix.nt Wed Apr 5 15:05 22/908 "mail test PREWED!" N 3 root@fbsd1.unix.nt Wed Apr 5 15:06 22/900 "mail test" N 4 MAILER-DAEMON Wed Apr 5 15:07 71/2454 "Returned mail: see tr" & q Held 4 messages in /var/mail/user You have mail in /var/mail/user |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 4 messages 4 unread >U 1 user@fbsd2.unix.nt Wed Apr 5 15:04 19/678 "mail test" U 2 root@fbsd4.unix.nt Wed Apr 5 15:05 23/918 "mail test PREWED!" U 3 root@fbsd1.unix.nt Wed Apr 5 15:06 23/910 "mail test" U 4 MAILER-DAEMON Wed Apr 5 15:07 72/2464 "Returned mail: see tr" & t 4 & q Saved 1 message in mboxApr 5 15:07:18 2006 Held 3 messages in /var/mail/user300 (EEST) ... from localhost.unix.nt [127.0.0.1] ----- The following addresses had permanent fatal errors ----- <user@qqq.taras.unix.nt> (reason: 550 5.7.1 <user@qqq.taras.unix.nt>... Relaying denied) ----- Transcript of session follows ----- ... while talking to qqq.taras.unix.nt.: >>> DATA <<< 550 5.7.1 <user@qqq.taras.unix.nt>... Relaying denied 550 5.1.1 <user@qqq.taras.unix.nt>... User unknown <<< 503 5.0.0 Need RCPT (recipient) |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 4 messages 1 new 4 unread U 1 user@fbsd2.unix.nt Wed Apr 5 15:04 19/678 "mail test" U 2 root@fbsd4.unix.nt Wed Apr 5 15:05 23/918 "mail test PREWED!" U 3 root@fbsd1.unix.nt Wed Apr 5 15:06 23/910 "mail test" >N 4 root@fbsd1.unix.nt Wed Apr 5 15:13 22/900 "mail test" & 4 Message 4: From root@fbsd1.unix.nt Wed Apr 5 15:13:00 2006 Date: Wed, 5 Apr 2006 15:14:49 +0300 (EEST) From: Charlie Root <root@fbsd1.unix.nt> To: user@fbsd2.unix.nt Subject: mail test hello & q Saved 1 message in mbox Held 3 messages in /var/mail/user |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 4 messages 1 new 4 unread U 1 user@fbsd2.unix.nt Wed Apr 5 15:04 19/678 "mail test" U 2 root@fbsd4.unix.nt Wed Apr 5 15:05 23/918 "mail test PREWED!" U 3 root@fbsd1.unix.nt Wed Apr 5 15:06 23/910 "mail test" >N 4 root@fbsd1.unix.nt Wed Apr 5 15:13 22/900 "mail test" & 4 Message 4: From root@fbsd1.unix.nt Wed Apr 5 15:13:00 2006 Date: Wed, 5 Apr 2006 15:14:49 +0300 (EEST) From: Charlie Root <root@fbsd1.unix.nt> To: user@fbsd2.unix.nt Subject: mail test hello & q Saved 1 message in mbox Held 3 messages in /var/mail/user |
$exit
exit |
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt
|
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt
|
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt
|
#echo hello | mail -s 'mail test' user@qqq.taras.unix.nt
|
#whereis qpopper
qpopper: /usr/ports/mail/qpopper |
#cd /usr/ports/mail/qpopper
|
#pwd
/usr/ports/mail/qpopper |
#make
[ OK ] Cancel ===> Vulnerability check disabled, database not found ===> Found saved configuration for qpopper-4.0.8 => qpopper4.0.8.tar.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from ftp://ftp.qualcomm.com/eudora/servers/unix/popper/. qpopper4.0.8.tar.gz 100% of 2702 kB 31 kBps 00m00s => qpopper4.0.8-ipv6-20050515.diff.gz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch from http://www.imasy.or.jp/~ume/ipv6/. qpopper4.0.8-ipv6-20050515.diff.gz 100% of 11 kB 4627 Bps ===> Extracting for qpopper-4.0.8 ... ===> autoconf-2.59_2 depends on file: /usr/local/bin/perl5.8.7 - found ===> Configuring for autoconf-2.59_2 checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether gmake sets $(MAKE)... yes checking for expr... /bin/expr checking for gm4... /usr/local/bin/gm4 |
#make install
===> Installing for qpopper-4.0.8 ===> Generating temporary packing list ===> Checking if mail/qpopper already installed **************************************************************************** To enable the qpopper-daemon, add the following line to your /etc/inetd.conf: pop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -s **************************************************************************** ===> Compressing manual pages for qpopper-4.0.8 ===> Registering installation for qpopper-4.0.8 ===> SECURITY REPORT: This port has installed the following binaries which execute with increased privileges. /usr/local/bin/qpopauth If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: http://www.eudora.com/products/unsupported/qpopper/index.html |
#xconv
# This file generated by xconv.pl, included with the xinetd # package. xconv.pl was written by Rob Braun (bbraun@synack.net) # # The file is merely a translation of your inetd.conf file into # the equivalent in xinetd.conf syntax. xinetd has many # features that may not be taken advantage of with this translation. # Please refer to the xinetd.conf man page for more information # on how to properly configure xinetd. # The defaults section sets some information for all services defaults ... { flags = NAMEINARGS socket_type = stream protocol = tcp wait = no user = root server = /usr/local/libexec/qpopper server_args = qpopper -s } ^[[B^[[B^[[B^[[B^C |
#/etc/rc.d/xinend restart
bash: /etc/rc.d/xinend: No such file or directory |
#/usr/local/etc/rc.d/xinend.sh restart
bash: /usr/local/etc/rc.d/xinend.sh: No such file or directory |
#/usr/local/etc/rc.d/xinetd.sh restart
Stopping xinetd. Starting xinetd. |
#mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/root": 1 message 1 new >N 1 root@fbsd2.unix.nt Wed Apr 5 09:11 28/1063 "Nvi saved the file in" & q Held 1 message in /var/mail/root You have mail in /var/mail/root |
#xinit
X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 6.0 i386 [ELF] Current Operating System: FreeBSD fbsd2.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr 3 14:33:41 EEST 2006 root@fbsd2.unix.nt:/usr/src/sys/i386/compile/MAIN i386 Build Date: 12 October 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, ... The application 'metacity' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. The application 'gnome-panel' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. The application 'nautilus' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. xinit: connection to X server lost. |
#echo hello | mail -s 'my adress te' user@qqq.taras.unix.n
|
#echo hello | mail -s 'my adress tes' user@qqq.taras.unix.
|
#echo hello | mail -s 'my adress test' user@qqq.taras.unix
|
#echo hello | mail -s 'my adress test' user@qqq.taras.uni
|
#echo hello | mail -s 'my adress test' user@qqqtaras.unix.
|
#echo hello | mail -s 'my adress test' user@qqtaras.unix.n
|
#echo hello | mail -s 'my adress test' user@qtaras.unix.nt
|
#echo hello | mail -s 'my adress test' user@
|
#echo hello | mail -s 'my adress test' user@taras.unix.nt
|
#cd /etc/mail
|
#ls -l
total 356 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1609 Apr 5 15:02 aliases -rw-r----- 1 root wheel 16384 Apr 5 15:02 aliases.db -rw-r--r-- 1 root wheel 57745 Apr 5 14:55 fbsd2.unix.nt.cf -rw-r--r-- 1 root wheel 4113 Apr 5 14:55 fbsd2.unix.nt.mc -rw-r--r-- 1 root wheel 40398 Apr 5 14:55 fbsd2.unix.nt.submit.cf -r--r--r-- 1 root wheel 894 Apr 5 14:55 fbsd2.unix.nt.submit.mc -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 44 Apr 5 14:52 local-host-names -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#vi fbsd2.unix.nt.mc
|
#ls -l
total 356 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1609 Apr 5 15:02 aliases -rw-r----- 1 root wheel 16384 Apr 5 15:02 aliases.db -rw-r--r-- 1 root wheel 57745 Apr 5 14:55 fbsd2.unix.nt.cf -rw-r--r-- 1 root wheel 4113 Apr 5 14:55 fbsd2.unix.nt.mc -rw-r--r-- 1 root wheel 40398 Apr 5 14:55 fbsd2.unix.nt.submit.cf -r--r--r-- 1 root wheel 894 Apr 5 14:55 fbsd2.unix.nt.submit.mc -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 44 Apr 5 14:52 local-host-names -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#cd /usr/share/sendmail/README
bash: cd: /usr/share/sendmail/README: No such file or directory |
#cd /usr/share/sendmail
|
#cat /usr/share/sendmail/README
cat: /usr/share/sendmail/README: No such file or directory |
#pwd
/usr/share/sendmail |
#cd cf
|
#cat README
{VirtHost} are added to class {R}, i.e., relaying is allowed to (and from) those domains. The default map definition is: hash /etc/mail/virtusertable A new definition can be specified as the second argument of the FEATURE macro, such as FEATURE(`virtusertable', `dbm /etc/mail/virtusers') virtuser_entire_domain If the virtusertable is enabled and VIRTUSER_DOMAIN or VIRTUSER_DOMAIN_FILE is used, this feature will cause addresses to be searched in the map if their domain ... For example, if you specify ``foo.com'', then mail to or from foo.com, abc.foo.com, or a.very.deep.domain.foo.com will all be accepted for relaying. This feature changes the behaviour to lookup individual host names only. relay_based_on_MX Turns on the ability to allow relaying based on the MX records of the host portion of an incoming recipient; that is, if an MX record for host foo.com points to your site, you will accept and relay mail addressed to foo.com. See description below for more information before using this |
#cat /usr/share/sendmail/README|more
|
#cat README|more
|
#echo hello | mail -s 'my adress test' user@taras.unix.nt
|
#vi fbsd2.unix.nt.mc
|
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf |
#ls -l
total 356 -rw-r--r-- 1 root wheel 6809 Nov 3 10:12 Makefile -rw-r--r-- 1 root wheel 2896 Nov 3 10:12 README -rw-r--r-- 1 root wheel 407 Nov 3 10:12 access.sample -rw-r--r-- 1 root wheel 1609 Apr 5 15:02 aliases -rw-r----- 1 root wheel 16384 Apr 5 15:02 aliases.db -rw-r--r-- 1 root wheel 58260 Apr 5 16:16 fbsd2.unix.nt.cf -rw-r--r-- 1 root wheel 4144 Apr 5 16:08 fbsd2.unix.nt.mc -rw-r--r-- 1 root wheel 40398 Apr 5 14:55 fbsd2.unix.nt.submit.cf -r--r--r-- 1 root wheel 894 Apr 5 14:55 fbsd2.unix.nt.submit.mc -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 freebsd.cf -rw-r--r-- 1 root wheel 4113 Nov 3 10:12 freebsd.mc -r--r--r-- 1 root wheel 40444 Nov 3 10:12 freebsd.submit.cf -r--r--r-- 1 root wheel 894 Nov 3 10:12 freebsd.submit.mc -r--r--r-- 1 root wheel 5588 Nov 3 10:12 helpfile -rw-r--r-- 1 root wheel 44 Apr 5 14:52 local-host-names -rw-r--r-- 1 root wheel 400 Nov 3 10:12 mailer.conf -rw-r--r-- 1 root wheel 243 Nov 3 10:12 mailertable.sample -rw-r--r-- 1 root wheel 57791 Nov 3 10:12 sendmail.cf -r--r--r-- 1 root wheel 40444 Nov 3 10:12 submit.cf -rw-r--r-- 1 root wheel 569 Nov 3 10:12 virtusertable.sample |
#cp fbsd2.unix.nt.cf sendmail.cf
|
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. 554 5.0.0 /etc/mail/sendmail.cf: line 62: unknown configuration line " " |
#vi fbsd2.unix.nt.mc
|
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf |
#cp fbsd2.unix.nt.cf sendmail.cf
|
#/etc/rc.d/sendmail restart
sendmail not running? (check /var/run/sendmail.pid). Starting sendmail. |
#vi fbsd2.unix.nt.mc
|
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf |
#cp fbsd2.unix.nt.cf sendmail.cf
|
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#vi fbsd2.unix.nt.mc
|
#make
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 fbsd2.unix.nt.mc > fbsd2.unix.nt.cf |
#cp fbsd2.unix.nt.cf sendmail.cf
|
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#echo hello | mail -s 'my adress test' user@taras.unix.nt
|
#date
Wed Apr 5 16:39:59 EEST 2006 |
#time
real 0m0.000s user 0m0.000s sys 0m0.000s |
#dat etime
bash: dat: command not found |
#date time
date: illegal time format usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] |
#date now
date: illegal time format usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] |
#date
Wed Apr 5 16:40:33 EEST 2006 |
{VirtHost} are added to class {R}, i.e., relaying is allowed to (and from) those domains. The default map definition is: hash /etc/mail/virtusertable A new definition can be specified as the second argument of the FEATURE macro, such as FEATURE(`virtusertable', `dbm /etc/mail/virtusers') virtuser_entire_domain If the virtusertable is enabled and VIRTUSER_DOMAIN or VIRTUSER_DOMAIN_FILE is used, this feature will cause addresses to be searched in the map if their domain parts are subdomains of elements in class {VirtHost}. ldap_routing Implement LDAP-based e-mail recipient routing according to the Internet Draft draft-lachman-laser-ldap-mail-routing-01. This provides a method to re-route addresses with a domain portion in class {LDAPRoute} to either a different mail host or a different address. Hosts can be added to this class using LDAPROUTE_DOMAIN and LDAPROUTE_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). See the LDAP ROUTING section below for more information. nodns If you aren't running DNS at your site (for example, you are UUCP-only connected). It's hard to consider this a "feature", but hey, it had to go somewhere. Actually, as of 8.7 this is a no-op -- remove "dns" from the hosts service switch entry instead. nullclient This is a special case -- it creates a configuration file containing nothing but support for forwarding all mail to a central hub via a local SMTP-based network. The argument is the name of that hub. The only other feature that should be used in conjunction with this one is FEATURE(`nocanonify'). No mailers should be defined. No aliasing or forwarding is done. local_lmtp Use an LMTP capable local mailer. The argument to this feature is the pathname of an LMTP capable mailer. By default, mail.local is used. This is expected to be the mail.local which came with the 8.9 distribution which is LMTP capable. The path to mail.local is set by the confEBINDIR m4 variable -- making the default LOCAL_MAILER_PATH /usr/libexec/mail.local. If a different LMTP capable mailer is used, its pathname can be specified as second parameter and the arguments passed to it (A=) as third parameter, e.g., FEATURE(`local_lmtp', `/usr/local/bin/lmtp', `lmtp') WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, i.e., without respecting any definitions in an OSTYPE setting. local_procmail Use procmail or another delivery agent as the local mailer. The argument to this feature is the pathname of the delivery agent, which defaults to PROCMAIL_MAILER_PATH. Note that this does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS for the local mailer; tweak LOCAL_MAILER_FLAGS and LOCAL_MAILER_ARGS instead, or specify the appropriate parameters. When procmail is used, the local mailer can make use of the "user+indicator@local.host" syntax; normally the +indicator is just tossed, but by default it is passed as the -a argument to procmail. This feature can take up to three arguments: 1. Path to the mailer program [default: /usr/local/bin/procmail] 2. Argument vector including name of the program [default: procmail -Y -a $h -d $u] 3. Flags for the mailer [default: SPfhn9] Empty arguments cause the defaults to be taken. Note that if you are on a system with a broken setreuid() call, you may need to add -f $f to the procmail argument vector to pass the proper sender to procmail. For example, this allows it to use the maildrop (http://www.flounder.net/~mrsam/maildrop/) mailer instead by specifying: FEATURE(`local_procmail', `/usr/local/bin/maildrop', `maildrop -d $u') or scanmails using: FEATURE(`local_procmail', `/usr/local/bin/scanmails') WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, i.e., without respecting any definitions in an OSTYPE setting. bestmx_is_local Accept mail as though locally addressed for any host that lists us as the best possible MX record. This generates additional DNS traffic, but should be OK for low to medium traffic hosts. The argument may be a set of domains, which will limit the feature to only apply to these domains -- this will reduce unnecessary DNS traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH WILDCARD MX RECORDS!!! If you have a wildcard MX record that matches your domain, you cannot use this feature. smrsh Use the SendMail Restricted SHell (smrsh) provided with the distribution instead of /bin/sh for mailing to programs. This improves the ability of the local system administrator to control what gets run via e-mail. If an argument is provided it is used as the pathname to smrsh; otherwise, the path defined by confEBINDIR is used for the smrsh binary -- by default, /usr/libexec/smrsh is assumed. promiscuous_relay By default, the sendmail configuration files do not permit mail relaying (that is, accepting mail from outside your local host (class {w}) and sending it to another host than your local host). This option sets your site to allow mail relaying from any site to any site. In almost all cases, it is better to control relaying more carefully with the access map, class {R}, or authentication. Domains can be added to class {R} by the macros RELAY_DOMAIN or RELAY_DOMAIN_FILE (analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below). relay_entire_domain This option allows any host in your domain as defined by class {m} to use your server for relaying. Notice: make sure that your domain is not just a top level domain, e.g., com. This can happen if you give your host a name like example.com instead of host.example.com. relay_hosts_only By default, names that are listed as RELAY in the access db and class {R} are treated as domain names, not host names. For example, if you specify ``foo.com'', then mail to or from foo.com, abc.foo.com, or a.very.deep.domain.foo.com will all be accepted for relaying. This feature changes the behaviour to lookup individual host names only. relay_based_on_MX Turns on the ability to allow relaying based on the MX records of the host portion of an incoming recipient; that is, if an MX record for host foo.com points to your site, you will accept and relay mail addressed to foo.com. See description below for more information before using this
# $FreeBSD: src/etc/mail/access.sample,v 1.3 2000/11/02 23:40:40 dirk Exp $ # # Mail relay access control list. Default is to reject mail unless the # destination is local, or listed in /etc/mail/local-host-names # cyberspammer.com 550 We don't accept mail from spammers FREE.STEALTH.MAILER@ 550 We don't accept mail from spammers another.source.of.spam REJECT okay.cyberspammer.com OK 128.32 RELAY
Время первой команды журнала | 13:49:14 2006- 4- 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:40:29 2006- 4- 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.94 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.94 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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