· 7 years ago · Apr 20, 2018, 05:12 AM
1[root@mail ~]# cat /etc/postfix/main.cf
2relayhost =
3smtp_sasl_auth_enable = yes
4smtp_sasl_password_maps = hash:/etc/postfix/private/sasl_passwd
5
6smtp_sasl_security_options = noanonymous
7smtp_sasl_type = cyrus
8smtp_sasl_mechanism_filter = login
9smtp_sender_dependent_authentication = yes
10sender_dependent_relayhost_maps = hash:/etc/postfix/private/sender_relay
11sender_canonical_maps = hash:/etc/postfix/private/canonical
12
13#smtp_tls_CAfile = /etc/postfix/ca_yandex.pem
14
15# reject domen bk.ru
16smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/conf/sender_access, reject
17
18
19[root@mail ~]# cat /etc/postfix/private/canonical
20@yandex osslabs@yandex.ru
21[root@mail ~]# cat /etc/postfix/private/sender_relay
22@yandex.ru smtp.yandex.ru
23[root@mail ~]# cat /etc/postfix/private/sasl_passwd
24[smtp.yandex.ru] osslabs@yandex.ru:Password
25[root@mail ~]# cat /etc/postfix/conf/sender_access
26@gmail.com REJECT
27
28[root@mail ~]echo «test-test-test» | mutt -s «Tema-test26» llikodhuk@gmail.com
29Apr 20 01:04:31 mail postfix/pickup[4632]: CF4735E87: uid=0 from=<root>
30Apr 20 01:04:31 mail postfix/cleanup[4642]: CF4735E87: message-id=<20180420050431.GA4638@mail.osslabs.ru>
31Apr 20 01:04:31 mail postfix/qmgr[4633]: CF4735E87: from=<root@mail.osslabs.ru>, size=491, nrcpt=1 (queue active)
32Apr 20 01:04:32 mail postfix/smtp[4644]: CF4735E87: to=<llikodhuk@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.233.27]:25, delay=0.87, delays=0.03/0/0.39/0.45, dsn=2.0.0, status=sent (250 2.0.0 OK 1524200672 z4si1943774ljj.309 - gsmtp)
33Apr 20 01:04:32 mail postfix/qmgr[4633]: CF4735E87: removed
34
35==============================================Приходит от рута (так не нужно) ====== Да и запрет Ñ Ñтавил на отправку на gmail.com
36«Tema-test26»
37root <root@mail.osslabs.ru>
389:04 (4 мин. назад)
39кому: мне
40«test-test-test»