User Tools

Site Tools


протокол_smtp_и_mail_transfer_agent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
протокол_smtp_и_mail_transfer_agent [2009/06/17 14:15]
val
протокол_smtp_и_mail_transfer_agent [2010/09/27 13:27]
val
Line 49: Line 49:
 === Ubuntu (postfix) === === Ubuntu (postfix) ===
 <​code>​ <​code>​
-root@gate:​~#​ apt-get install postfix ​mailx+root@gate:​~#​ apt-get install postfix ​mailutils
   General type of mail configuration:​ Internet Site   General type of mail configuration:​ Internet Site
   System mail name: gate.corpX.un   System mail name: gate.corpX.un
Line 109: Line 109:
 gate# cat corpX.un gate# cat corpX.un
 $TTL    3h $TTL    3h
-corpX.un. SOA gate.corpX.un. ​root.gate.corpX.un. 2 1d 12h 1w 3h +corp13.un. SOA ns root.gate ​1d 12h 1w 3h 
-        NS      ​gate.corpX.un. +        NS      ​ns 
-        A       ​172.16.1.X+        A       ​172.16.1.13
 ... ...
  
Line 121: Line 121:
 [gate:/​etc/​mail] # cat gate.corpX.un.mc [gate:/​etc/​mail] # cat gate.corpX.un.mc
 OSTYPE(freebsd6) OSTYPE(freebsd6)
-FEATURE(`use_cw_file')+FEATURE(use_cw_file)
 MAILER(local) MAILER(local)
 MAILER(smtp) MAILER(smtp)
Line 128: Line 128:
 corpX.un corpX.un
  
-[gate:/​etc/​mail] # make cf 
 [gate:/​etc/​mail] # make install [gate:/​etc/​mail] # make install
  
Line 148: Line 147:
 === sendmail (FreeBSD) === === sendmail (FreeBSD) ===
 <​code>​ <​code>​
-[cX:/etc/mail] # cat server.corpX.un.mc+[server:/etc/mail] # cat server.corpX.un.mc
 OSTYPE(freebsd6) OSTYPE(freebsd6)
 define(`SMART_HOST',​ `gate.corpX.un'​) define(`SMART_HOST',​ `gate.corpX.un'​)
Line 154: Line 153:
 MAILER(smtp) MAILER(smtp)
  
-[cX:/etc/mail] # make cf +[server:/etc/mail] # make cf 
-[cX:/etc/mail] # make install +[server:/etc/mail] # make install 
-[cX:/etc/mail] # /​etc/​rc.d/​sendmail restart+[server:/etc/mail] # /​etc/​rc.d/​sendmail restart
 </​code>​ </​code>​
  
 === postfix (Ubuntu) === === postfix (Ubuntu) ===
 <​code>​ <​code>​
-root@cX:~# apt-get install postfix ​mailx+root@server:~# apt-get install postfix ​mailutils
   General type of mail configuration:​ Internet Site   General type of mail configuration:​ Internet Site
   System mail name: server.corpX.un   System mail name: server.corpX.un
Line 171: Line 170:
 root@gate:​~#​ newaliases root@gate:​~#​ newaliases
  
-root@cX:~# rcsdiff /​etc/​postfix/​main.cf+root@server:~# rcsdiff /​etc/​postfix/​main.cf
 35c35 35c35
 < relayhost = < relayhost =
Line 184: Line 183:
 [gate:/​etc/​mail] # cat gate.corpX.un.mc [gate:/​etc/​mail] # cat gate.corpX.un.mc
 OSTYPE(freebsd6) OSTYPE(freebsd6)
-FEATURE(`use_cw_file')+FEATURE(use_cw_file)
 FEATURE(access_db,​ `hash -o -T<​TMPF>​ /​etc/​mail/​access'​) FEATURE(access_db,​ `hash -o -T<​TMPF>​ /​etc/​mail/​access'​)
 MAILER(local) MAILER(local)
Line 193: Line 192:
  
 [gate:/​etc/​mail] # make maps [gate:/​etc/​mail] # make maps
-[gate:/​etc/​mail] # make cf 
 [gate:/​etc/​mail] # make install [gate:/​etc/​mail] # make install
 [gate:/​etc/​mail] # /​etc/​rc.d/​sendmail restart [gate:/​etc/​mail] # /​etc/​rc.d/​sendmail restart
Line 206: Line 204:
 > mynetworks = 127.0.0.0/8 192.168.13.0/​24 > mynetworks = 127.0.0.0/8 192.168.13.0/​24
 </​code>​ </​code>​
- 
 ==== Настройка MTA на релеинг почты домена server.corpX.un ==== ==== Настройка MTA на релеинг почты домена server.corpX.un ====
  
Line 213: Line 210:
 gate# cat corpX.un gate# cat corpX.un
  
-cX     A       ​192.168.X.10 +server ​    A       ​192.168.X.10 
-       ​MX ​     2      gate.corpX.un. +       ​MX ​     2      gate 
-       ​MX ​     1      ​cX+       ​MX ​     1      ​server
  
 </​code>​ </​code>​
  
-Примечание+Альтернативы
-Использование DNS View позволяет для внешних хостов указывать один почтовый сервер,​ а внутри другой. ​Это ​позволит обойтись без задержек при ​отправке ​почты.+  ​* ​Использование DNS View позволяет для внешних хостов указывать один почтовый сервер,​ а внутри другой. 
 +  * /​etc/​mail/​mailertable ​позволяет явно переправить почту с gate на server
  
 === Запуск MTA почтового домена server.corpX.un (FreeBSD) === === Запуск MTA почтового домена server.corpX.un (FreeBSD) ===
 <​code>​ <​code>​
-[cX:~] # cat /​etc/​rc.conf+[server:~] # cat /​etc/​rc.conf
 ... ...
 sendmail_enable="​YES"​ sendmail_enable="​YES"​
  
-[cX:~] # /​etc/​rc.d/​sendmail restart+[server:~] # /​etc/​rc.d/​sendmail restart
 </​code>​ </​code>​
  
Line 234: Line 232:
 <​code>​ <​code>​
 [gate:/​etc/​mail] # cat access [gate:/​etc/​mail] # cat access
 +...
 server.corpX.un ​ RELAY server.corpX.un ​ RELAY
  
 [gate:/​etc/​mail] # make maps [gate:/​etc/​mail] # make maps
 </​code>​ </​code>​
 +
 +Попробовать команду hoststat
 +
 +Попробовать To:​server.corpX.un ​ RELAY
 +
 +Для решения этой задачи можно использовать /​etc/​mail/​relay-domains
  
 === Настройка MTA релея postfix (Ubuntu) === === Настройка MTA релея postfix (Ubuntu) ===
Line 264: Line 269:
 <​code>​ <​code>​
 ... ...
-root: rootroot@gate.isp.un+root: studentval@gate.isp.un
 ... ...
 </​code><​code>​ </​code><​code>​
Line 280: Line 285:
 gate# cat corpX.un gate# cat corpX.un
 ... ...
-cX      ​A ​      ​192.168.X.10 +server ​     ​A ​      ​192.168.X.10 
-        MX   ​2 ​ gate.corpX.un.+            MX   ​2 ​ gate
 ... ...
 </​code>​ </​code>​
Line 322: Line 327:
 [gate:/​etc/​mail] # cat gate.corpX.un.mc [gate:/​etc/​mail] # cat gate.corpX.un.mc
 OSTYPE(freebsd6) OSTYPE(freebsd6)
-FEATURE(`use_cw_file')+FEATURE(use_cw_file)
 FEATURE(access_db,​ `hash -o -T<​TMPF>​ /​etc/​mail/​access'​) FEATURE(access_db,​ `hash -o -T<​TMPF>​ /​etc/​mail/​access'​)
 FEATURE(virtusertable,​ `hash -o /​etc/​mail/​virtusertable'​) FEATURE(virtusertable,​ `hash -o /​etc/​mail/​virtusertable'​)
Line 332: Line 337:
  
 [gate:/​etc/​mail] # make maps [gate:/​etc/​mail] # make maps
-[gate:/​etc/​mail] # make cf 
 [gate:/​etc/​mail] # make install [gate:/​etc/​mail] # make install
 [gate:/​etc/​mail] # /​etc/​rc.d/​sendmail restart [gate:/​etc/​mail] # /​etc/​rc.d/​sendmail restart
Line 360: Line 364:
 gate# mail –u mailuser gate# mail –u mailuser
 </​code>​ </​code>​
-