Настройка почтового сервера Exim

Автор Тхакур, 19 февраля 2019, 12:48:40

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

yoric

Прямо даже интересно, как дела :-) Надеюсь, получилось?

Тхакур

#46
Цитата: yoric от 03 марта 2019, 05:59:57Прямо даже интересно, как дела :-) Надеюсь, получилось?
представляете?....ни фига
мне кажется, что немного проще и я неправильно записываю имя системы
https://wiki.debian.org/Exim#Example_stand-alone_example
в других местах народ пишет
ЦитироватьSystem mail name: желательно вписываем сюда обратную зону для вашего IP интерфейса eth0. Либо просто full hostname сервера (mail.debian.pro, например)

yoric

Ну не знаю тогда, что там ещё у Вас ноковыряно в системе...

Тхакур

правильно
root@debian:/home/th# bash /usr/share/doc/exim4-base/examples/exim-gencert
[*] Creating a self signed SSL certificate for Exim!
    This may be sufficient to establish encrypted connections but for
    secure identification you need to buy a real certificate!
   
    Please enter the hostname of your MTA at the Common Name (CN) prompt!
   
Generating a RSA private key
..................................................................................+++++
.........+++++
writing new private key to '/etc/exim4/exim.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Code (2 letters) [US]:RU
State or Province Name (full name) []:Moscow
Locality Name (eg, city) []:th
Organization Name (eg, company; recommended) []:ISKCON
Organizational Unit Name (eg, section) []:ISKCON
Server name (eg. ssl.domain.tld; required!!!) []:smtp.yandex.ru
Email Address []:thmsh@yandex.ru
[*] Done generating self signed certificates for exim!
    Refer to the documentation and example configuration files
    over at /usr/share/doc/exim4-base/ for an idea on how to enable TLS
    support in your mail transfer agent.
root@debian:/home/th#

Тхакур

#49
Цитата: yoric от 03 марта 2019, 05:59:57Прямо даже интересно, как дела :-) Надеюсь, получилось?
я всё с нуля сделал и тестовое почему-то дошло спокойно
2019-03-05 20:49:19 Start queue run: pid=2283
2019-03-05 20:49:19 End queue run: pid=2283
2019-03-05 21:19:19 Start queue run: pid=2385
2019-03-05 21:19:19 End queue run: pid=2385
2019-03-05 21:25:53 exim 4.89 daemon started: pid=1008, -q30m, listening for SMTP on [127.0.0.1]:25
2019-03-05 21:25:53 Start queue run: pid=1009
2019-03-05 21:25:53 End queue run: pid=1009
2019-03-05 21:53:33 1h1FC1-0000RO-0i <= thmsh@yandex.ru U=th P=local S=354
2019-03-05 21:53:33 1h1FC1-0000RO-0i H=smtp.yandex.ru [2a02:6b8::38] Network is unreachable
2019-03-05 21:53:34 1h1FC1-0000RO-0i => thmsh@yandex.ru R=smarthost T=remote_smtp_smarthost H=smtp.yandex.ru [213.180.204.38] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=yes DN="C=RU,O=Yandex LLC,OU=ITO,L=Moscow,ST=Russian Federation,CN=smtp.yandex.ru" A=plain C="250 2.0.0 Ok: queued on smtp4o.mail.yandex.net as 1551812014-rsitRBZIkT-rXvaqcUY"
2019-03-05 21:53:34 1h1FC1-0000RO-0i Completed
2019-03-05 21:55:52 Start queue run: pid=1721
2019-03-05 21:55:52 End queue run: pid=1721
root@debian:/home/th#

потом снова послал тестовое ничего не меняя и опять фигня
2019-03-05 22:10:11 1h1FS7-0000Ti-KN Completed
2019-03-05 22:22:53 1h1FeP-0000Ut-B4 <= root@debian U=root P=local S=346
2019-03-05 22:22:54 1h1FeP-0000Ut-B4 ** thmsh@yandex.ru R=smarthost T=remote_smtp_smarthost H=smtp.yandex.ru [213.180.204.38] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=yes DN="C=RU,O=Yandex LLC,OU=ITO,L=Moscow,ST=Russian Federation,CN=smtp.yandex.ru": SMTP error from remote mail server after pipelined MAIL FROM:<root@debian> SIZE=1381: 553 5.7.1 Sender address rejected: not owned by auth user.
2019-03-05 22:22:54 1h1FeQ-0000Uw-9m <= <> R=1h1FeP-0000Ut-B4 U=Debian-exim P=local S=1770
2019-03-05 22:22:54 1h1FeP-0000Ut-B4 Completed
2019-03-05 22:22:54 1h1FeQ-0000Uw-9m => /var/mail/mail <root@debian> R=mail4root T=address_file
2019-03-05 22:22:54 1h1FeQ-0000Uw-9m Completed
root@debian:/home/th#

yoric

#50
Потому что второе тестовое от root, видимо. А вот это напрягает, не знаю почему так:H=smtp.yandex.ru [2a02:6b8::38] Network is unreachable Или это exim на ipv6 ломится? Можно не обращать внимания, а можно создать файлик:
$ cat /etc/exim4/exim4.conf.localmacros
disable_ipv6 = true
smtp_accept_queue_per_connection = 200
и перезапустить exim.

Тхакур

Country Name (2 letter code) [AU]:RU
State or Province Name (full name) [Some-State]:Russia
Locality Name (eg, city) []:Moscow
Organization Name (eg, company) [Internet Widgits Pty Ltd]:ISKCON
Organizational Unit Name (eg, section) []:th
Common Name (e.g. server FQDN or YOUR name) []:thakur
Email Address []:thmsh@yandex.ru

в шестом пункте нужно?....smtp.yandex.ru
а в четвёртом и пятом?.....не принципиально?

Тхакур

интерфейс правильный у меня?
root@debian:/home/th# ifconfig -a
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e0:d5:5e:85:0a:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx0c5b8f279a64: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.100  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::e5b:8fff:fe27:9a64  prefixlen 64  scopeid 0x20<link>
        ether 0c:5b:8f:27:9a:64  txqueuelen 1000  (Ethernet)
        RX packets 47187  bytes 38553353 (36.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34653  bytes 5369428 (5.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 172  bytes 13596 (13.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 172  bytes 13596 (13.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@debian:/home/th#


yoric

Не принципиально. А инет через что у Вас? Хотя, у Вас же уже exim работает, пора наслаждаться :-)

Тхакур


Тхакур

#55
Цитата: yoric от 07 марта 2019, 13:18:29пора наслаждаться :-)
чё-то пока не получается насладиться....:-)...
2019-03-07 18:01:16 exim 4.89 daemon started: pid=1019, -q30m, listening for SMTP on [127.0.0.1]:25
2019-03-07 18:01:16 Start queue run: pid=1020
2019-03-07 18:01:16 End queue run: pid=1020
2019-03-07 18:20:48 exim 4.89 daemon started: pid=1946, -q30m, listening for SMTP on [127.0.0.1]:25
2019-03-07 18:20:48 Start queue run: pid=1947
2019-03-07 18:20:48 End queue run: pid=1947
2019-03-07 18:20:55 1h1upL-0000VT-SD <= root@debian U=root P=local S=343
2019-03-07 18:20:56 1h1upL-0000VT-SD H=smtp.yandex.ru [2a02:6b8::38] Network is unreachable
2019-03-07 18:20:56 1h1upL-0000VT-SD ** thmsh@yandex.ru R=smarthost T=remote_smtp_smarthost H=smtp.yandex.ru [213.180.193.38] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=yes DN="C=RU,O=Yandex LLC,OU=ITO,L=Moscow,ST=Russian Federation,CN=smtp.yandex.ru": SMTP error from remote mail server after pipelined MAIL FROM:<root@debian> SIZE=1378: 553 5.7.1 Sender address rejected: not owned by auth user.
2019-03-07 18:20:56 1h1upM-0000VY-SV <= <> R=1h1upL-0000VT-SD U=Debian-exim P=local S=1762
2019-03-07 18:20:56 1h1upL-0000VT-SD Completed
2019-03-07 18:20:57 1h1upM-0000VY-SV => /var/mail/mail <root@debian> R=mail4root T=address_file
2019-03-07 18:20:57 1h1upM-0000VY-SV Completed
root@debian:/home/th#

команду же правильно ввожу?
echo "test mail" | mail -s "Test Mail" thmsh@yandex.ru

Тхакур

Цитата: yoric от 06 марта 2019, 11:20:05а можно создать файлик:
там у меня такой файлик есть и там...
   MAIN_TLS_ENABLE = 1

    REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS = *
            TLS_ON_CONNECT_PORTS = 587
                REQUIRE_PROTOCOL = smtps

Тхакур

заменил содержимое файла на то, что вы написали и получилось при перезагрузки
root@debian:/home/th# service exim4 restart
Job for exim4.service failed because the control process exited with error code.
See "systemctl status exim4.service" and "journalctl -xe" for details.
root@debian:/home/th#

yoric

Цитата: Тхакур от 07 марта 2019, 18:23:52команду же правильно ввожу?
Неправильно, надо не от root, а от th, или как там у Вас. Уже писал об этом, но вы проигнорировали и продолжаете мозги парить, причём не только себе, но и другим :-)

Цитироватьтам у меня такой файлик есть и там...
Попробуйте не перезаписать, а добавить мои строчки, сохранив свои тоже.

Тхакур

#59
Цитата: yoric от 08 марта 2019, 19:06:05надо не от root, а от th
а где это?
я же неукоснительно следую вашим чутким указаниям...
у меня щас так
# This is /etc/email-addresses. It is part of the exim package
#
# This file contains email addresses to use for outgoing mail. Any local
# part not in here will be qualified by the system domain as normal.
#
# It should contain lines of the form:
#
#user: someone@isp.com
#otheruser: someoneelse@anotherisp.com
th:thmsh@yandex.ru