Hastoyashchee rukovodstvo orientirovano na FreeBSD i Taylor UUCP, v drugih sistemah vse mozhet byt' sovsem po-drugomu :-)
Predstavim sebe, chto vy yavlyaetes' uzlom, kotoryj obmenivaetsya pochtoj s vneshnim mirom cherez host mail.provider.ru i razdaet pochtu eshche trem hostam: host1.your.domain.org, host2.your.domain.org, host3.your.domain.org. Ves' obmen pochtoj proishodit po uucp. Pri etom host1.your.domain.org, host2.your.domain.org, host3.your.domain.org zvonyat vam, a vy zvonite mail.provider.ru.
Budem schitat', chto chetyre mashiny, s kotorymi vam predstoit naladit' obmen pochtoj po uucp, imeyut sleduyushchie uucp-imena: provider, host1, host2 i host3 sootvetstvenno. Voobshche-to domennoe imya sistemy (hostname) i uucp-imya etoj zhe samoj sistemy sovershenno ne obyazany sovpadat'. Haprimer, host2.your.domain.org vpolne mog by imet' uucp-imya foo ili bar. Esli my zdes' i vybrali sovpadayushchie imena, eto bylo sdelano tol'ko dlya udobstva izlozheniya.
Pust' vashe sobstvennoe domennoe imya budet yourhost.your.domain.org, a vashe uucp-imya budet yourhost.
Hastrojka uucp pochty v Unix podrazumevaet sleduyushchie shagi:
total 12 drwxrwx--- 3 uucp uucp 512 15 noya 16:23 ./ drwxr-xr-x 10 root wheel 2048 30 dek 21:44 ../ -r--r----- 1 uucp uucp 61 23 yanv 1997 call -r--r----- 1 uucp uucp 260 8 apr 1997 config -rw-r----- 1 uucp uucp 250 3 sen 20:51 dial -r--r----- 1 uucp uucp 1 25 avg 1996 dialcode -r--r----- 1 uucp uucp 14 21 apr 1997 passwd -r--r----- 1 uucp uucp 96 29 maj 1997 port drwxr-xr-x 2 root uucp 512 15 noya 12:08 samples/ -r--r----- 1 uucp uucp 160 28 maj 1997 sysin -r--r----- 1 uucp uucp 366 16 noya 16:06 sysout
V etom fajle opisyvaetsya vash login i parol' dlya prozvonki na drugie uucp-mashiny. Estestvenno, login i parol' nado poluchit' ot administratora toj mashiny, na kotoruyu vy sobralis' zvonit'. V nashem sluchae on budet vyglyadet' primerno tak:
======= call ====== # system login password provider uuyourhost Your_Secret_Password ======= call ======
V etom fajle opisyvayutsya razlichnye parametry uucp, v osnovnom puti i imena fajlov, tut pochti nichego ne nado menyat'. V osnovnom etot fajl nuzhen, esli nuzhno pereopredelit' nekotorye umolchaniya, kotorye byli zadany pri kompilyacii.
======= config ====== nodename yourhost # zdes' nado ukazat' vashe sobstvennoe uucp-imya spool /var/spool/uucp pubdir /var/spool/uucppublic logfile /var/spool/uucp/Log statfile /var/spool/uucp/Stats debugfile /var/spool/uucp/Debug sysfile sysin sysout # imena fajlov s opisaniyami sistem - vashih linkov portfile port dialfile dial dialcodefile dialcode callfile call passwdfile passwd # kolichestvo odnovremenno vypolnyaemyh processov raskladki pochty max-uuxqts 1 ======= config ======Poslednij parametr podskazal mne Igor Nikolaev (2:5030/266@fidonet). |to dejstvitel'no bolee krasivoe reshenie problemy, ot kotoroj ya izbavilsya tol'ko peresborkoj rmail s flagom -DQUEUE_ONLY. A problema vot kakaya: pri poluchenii bol'shogo kolichestva pochty zapuskaetsya srazu kucha sendmail'ov, i eto poluchaetsya ochen' nakladno dlya resursov.
======= dial ====== dialer idc # proizvol'noe imya modema, pod kotorym on budet izvesten uucp dialtone w pause , #chat "" ATZ\r\d\c OK ATM0DPW\T CONNECT \p\c chat "" ATZ\r\d\c OK ATM0DT\T CONNECT \p\c chat-fail BUSY chat-fail ERROR chat-fail NO\sDIALTONE chat-fail NO\sCARRIER #complete \d\d+++\d\dATH\r\c #abort \d\d+++\d\dATH\r\c ======= dial ======Obratite vnimanie, chto poslednie dve strochki zakommentareny. Esli modem umeet sam klast' trubku po okonchanii soedineniya ili po opuskaniyu DTR, oni ne nuzhny. Esli ih ostavit', vreda oni ne prinesut, prosto uucp budet v logah rugat'sya. Eshche hochu zametit' - opisanij modemov mozhet byt' skol'ko ugodno, estestvenno, pod raznymi imenami.
======= passwd ====== uuhost1 Top_Secret_Password uuhost2 Smart_Password uuhost3 Stupid_Password ======= passwd ======
======= port ====== port port1 # imya porta type modem device /dev/cuaa1 dialer idc speed 38400 port port2 # tozhe imya porta type tcp service 540 ======= port ======
======= sysin ====== call-login * call-password * local-send / local-receive / port port1 # eto, kak vy pomnite, u nas modemnyj port chat-timeout 90 protocol g # vozmozhno, vy zahotite ispol'zovat' kakoj-nibud' drugoj protokol time never # zvonyat tol'ko oni, vy im nikogda ne zvonite debug 1 system host1 myname yourhost # kak vy predstavites' sisteme host1, kogda ona pozvonit called-login uuhost1 system host2 myname yourhost called-login uuhost2 system host3 myname yourhost called-login uuhost3 ======= sysin ======Zachem nuzhny pervye chetyre strochki i strochka called-login - ne sprashivajte. He pomnyu, no tak nado. V dokumentacii opisano, komu sil'no interesno - vpered.
======= sysout ====== call-login * call-password * local-send / local-receive / port port1 chat-timeout 90 protocol g time any # zvonit' v lyuboe vremya. A voobshche vremya mozhno zadavat' ochen' gibko. debug 1 system provider chat ogin: \L word: \P # beretsya iz fajla call phone 111111 alternate # tak delaetsya perebor nomerov phone 222222 alternate phone 333333 ======= sysout ======Korrektnost' nastrojki vseh konfigov mozhno proverit', zapustiv uuchk. Ostalas' eshche samaya malost'. CHtoby periodicheski zvonit' svoemu provajderu za pochtoj, vstav'te strochku v vash /etc/crontab, tipa:
====== uucp.mc ========= divert(-1) include(`../m4/cf.m4') VERSIONID(`@(#)uucp.mc 1.01') OSTYPE(bsd4.4)dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp)dnl FEATURE(nodns)dnl FEATURE(nocanonify)dnl FEATURE(mailertable)dnl FEATURE(uucpdomain)dnl define(`SMART_HOST', `uucp-dom:provider')dnl define(`confCOPY_ERRORS_TO', `postmaster')dnl ====== uucp.mc =========Posle chego
Obratite vnimanie, chto MAILER(smtp) ubirat' nel'zya, dazhe esli nikakogo smtp ne predviditsya. On vse ravno nuzhen dlya togo, chtoby rabotal mejler uucp-dom. |to mejler, kotoryj znaet pro domennuyu formu imen - vam zhe ne hochetsya, chtoby adresa v pis'mah byli v formate uucp (cherez vosklicatel'nye znaki).
======= /etc/mailertable ====== . uucp-dom:provider ======= /etc/mailertable ======Gde provider - eto uucp-imya sistemy provajdera (sistema dolzhna byt' opisana v /etc/uucp/sysout) Tochka zdes' vystupaet v roli simvola podstanovki i oznachaet to zhe samoe, chto u normal'nyh lyudej oznachaet zvezdochka, to est' lyuboe kolichestvo lyubyh simvolov. Esli vy ne yavlyaetes' okonechnoj sistemoj, to est' razdaete pochtu komu-to eshche po uucp, to vash mailertable mozhet vyglyadet' tak:
======= /etc/mailertable ====== .host1.your.domain.org uucp-dom:host1 host1.your.domain.org uucp-dom:host1 .host2.your.domain.org uucp-dom:host2 host2.your.domain.org uucp-dom:host2 .host3.your.domain.org uucp-dom:host3 host3.your.domain.org uucp-dom:host3 . uucp-dom:provider ======= /etc/mailertable ======Odinochnaya tochka v konce oznachaet - vse ostal'noe svalivat' na provajdera, on sam razberetsya. Razumeetsya, rech' v mailertable idet tol'ko ob imenah mashin. Pro pol'zovatelej on nichego ne znaet. To est', zapisi
oznachayut tol'ko to, chto pochta dlya mashin
i t.p. budet napravlyat'sya cherez uucp-sistemu host1. Ostalos' tol'ko dobavit', chto sendmail ispol'zuet mailertable v vide database map, poetomu ostalos' prodelat' sleduyushchee:
======= /etc/uudomain ====== host1 host1.your.domain.org host2 host2.your.domain.org host3 host3.your.domain.org provider mail.provider.ru ======= /etc/uudomain ======uudomain, tak zhe kak i mailertable, dolzhen byt' v vide database map, poetomu
Teper' ostalos' tol'ko
He znayu, pochemu po umolchaniyu tam stoit nerabotayushchaya strochka, no pogovarivayut, chto stoit ona tam v raschete na to, chto budet ispol'zovat'sya ne Taylor, a kakaya-to drugaya realizaciya UUCP.
oznachaet, chto dlya vseh pol'zovatelej s imenami, nachinayushchimisya na uu, mgetty budet zapuskat' uucico vmesto /usr/bin/login. CHem horosh takoj variant - v chastnosti tem, chto ne nado propisyvat' uucp-klientov v /etc/passwd. To est' uucico s klyuchom -l budet brat' parol' iz svoego fajla /etc/uucp/passwd
V etom sluchae dlya avtorizacii pozvonivshego budet ispol'zovat'sya ne /etc/uucp/passwd, a standartnyj mehanizm avtorizacii pol'zovatelej cherez /etc/passwd. Kak podskazyvaet Sergey Zimin: "U vseh pol'zovatelej uid i gid dolzhen byt' odinakovym i sovpadat' s uid/gid psevdo-pol'zovatelya "uucp", kotoryj takzhe dolzhen byt' obyazatel'no v sisteme! |to nuzhno i dlya pravil'noj raboty i dlya sek'yurnosti - (zabyl konkretno gde, no odin neradivyj admin daval vsem raznye uid, kak standartnym pol'zovatelyam i ego slomali po ftp) a naprimer v sluchae uucp-pol'zovatelya ego uid propisan v /etc/ftpusers kak tot, komu nel'zya lomit'sya po ftp".
Last-modified: Thu, 29 Apr 1999 19:55:25 GMT