This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
сервис_mta [2020/09/02 12:42] val [Настройка MTA на релеинг почты из LAN] |
сервис_mta [2026/07/20 16:11] (current) val [Установка и настройка MTA на обработку почты домена hostname] |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * [[https://www.ndchost.com/wiki/mail/test-smtp-auth-telnet|How to Test SMTP AUTH using Telnet]] | * [[https://www.ndchost.com/wiki/mail/test-smtp-auth-telnet|How to Test SMTP AUTH using Telnet]] | ||
| + | * [[Средства программирования shell#Отправка email с вложениями]] из bash | ||
| + | * [[Утилита msmtp#Утилита mail без mta]] | ||
| <code> | <code> | ||
| Line 33: | Line 35: | ||
| === Debian/Ubuntu (postfix) === | === Debian/Ubuntu (postfix) === | ||
| <code> | <code> | ||
| + | root@server:~# echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections | ||
| + | или | ||
| root@server:~# debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" | root@server:~# debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" | ||
| root@server:~# debconf-set-selections <<< "postfix postfix/mailname string corpX.un" | root@server:~# debconf-set-selections <<< "postfix postfix/mailname string corpX.un" | ||
| + | |||
| + | root@server:~# debconf-show postfix | ||
| root@server:~# apt install postfix | root@server:~# apt install postfix | ||
| Line 47: | Line 53: | ||
| root@server:~# postconf -d | root@server:~# postconf -d | ||
| + | </code> | ||
| + | |||
| + | === Exim === | ||
| + | |||
| + | !!! В конфигурации остается запрет отправлять почту на сервера с "серыми" ip (на курсах) | ||
| + | |||
| + | <code> | ||
| + | # dpkg-reconfigure exim4-config | ||
| + | ... | ||
| + | intenet site, все остальное по умолчанию | ||
| + | ... | ||
| </code> | </code> | ||
| Line 219: | Line 236: | ||
| <code> | <code> | ||
| # cat /etc/postfix/main.cf | # cat /etc/postfix/main.cf | ||
| + | </code><code> | ||
| ... | ... | ||
| smtpd_tls_cert_file = /root/server.crt | smtpd_tls_cert_file = /root/server.crt | ||
| Line 229: | Line 247: | ||
| smtpd_sasl_auth_enable = yes | smtpd_sasl_auth_enable = yes | ||
| smtpd_sasl_type = dovecot | smtpd_sasl_type = dovecot | ||
| + | |||
| + | #for kerberos gssapi | ||
| + | line_length_limit = 8192 | ||
| + | </code> | ||
| + | |||
| + | [[Thunderbird]] и [[Web интерфейс к почте#Roundcube]] используют 587-й порт | ||
| + | <code> | ||
| + | # cat /etc/postfix/master.cf | ||
| + | </code><code> | ||
| + | ... | ||
| + | smtp inet n - y - - smtpd | ||
| + | 587 inet n - y - - smtpd | ||
| + | ... | ||
| </code> | </code> | ||
| ==== Использование почтовых псевдонимов ==== | ==== Использование почтовых псевдонимов ==== | ||
| + | |||
| + | * [[Регистрация событий в Linux]] | ||
| === Debina/Ubuntu === | === Debina/Ubuntu === | ||
| <code> | <code> | ||
| # cat /etc/aliases | # cat /etc/aliases | ||
| - | </code> | + | </code><code> |
| - | + | ||
| - | === Debian/Ubuntu === | + | |
| - | <code> | + | |
| ... | ... | ||
| root: userX@isp.un | root: userX@isp.un | ||
| - | nagios: userX@isp.un | + | # root: "|logger -t mail-to-root -p mail.info" |
| + | |||
| + | #nagios: userX@isp.un | ||
| + | #nagios: student@corpX.un | ||
| support: user1, user2 | support: user1, user2 | ||
| Line 249: | Line 282: | ||
| </code><code> | </code><code> | ||
| # newaliases | # newaliases | ||
| + | |||
| + | # apt install logwatch | ||
| + | ... | ||
| # mail root | # mail root | ||
| Line 359: | Line 395: | ||
| ==== Postfix ==== | ==== Postfix ==== | ||
| <code> | <code> | ||
| + | # mailq | ||
| + | # postqueue -f | ||
| + | |||
| # mailq | grep apache@hoster.bmstu.ru | grep '*' | cut -d'*' -f 1 | postsuper -d - | # mailq | grep apache@hoster.bmstu.ru | grep '*' | cut -d'*' -f 1 | postsuper -d - | ||
| </code> | </code> | ||