Hem creat el servei de postfix a la mateixa maquina que el dns slave així que ho hem fet a rocky
Primer hem instalat els paquets de postfix i telnet per fer proves, i activat el servei
sudo dnf install postfix telnet
sudo systemctl enable --now postfix
Hem entrat al arxiu de configuració /etc/postfix/main.cf ,i hem des-comentat i canviat les línies següents:
- myhostname = mail.illa1.net
- mydomain = illa1.net
- myorigin = $mydomain
- mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
- inet_interfaces = all
- inet_protocols = ipv4
- mynetworks = 127.0.0.0/8 192.168.50.0/24
- home_mailbox = Maildir/
En el nostre cas com hem utilitzat rocky ,i aquest ve amb una alta seguretat per defecte hem activat el port del firewall i hem reinciciat els serveis
sudo firewall-cmd --permanent --add-service=smtp
sudo firewall-cmd --reload
sudo systemctl restart postfix Ahara per comprobar que funciona correctament usem telnet:
[vagrant@slave ~]$ telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.illa1.net ESMTP Postfix
EHLO localhost
250-mail.illa1.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
MAIL FROM: admin@illa1.net
250 2.1.0 Ok
RCPT TO: vagrant@illa1.net
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Prueba correu Proba manual.
.
250 2.0.0 Ok: queued as AF88010025AE