Advertisement
load-net

postfix-почта

Mar 4th, 2024 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxEF2/HTfPe1wWu7413uqRRCb76RIIUzWYmCUXm80WF+B7P1WLFFtdWhIrNnNgxxF+wB6cszFPoj4PFH6XzqqQEDx7TuZfISTwMfKcNQRM8ydZRg7uWOFNzlq2OPqP+QFNlw/5/oHUsmUU2grd6c4Efz1s8Cwa+zHhdVGNH4FdjVZGyNqPFThQUOx1knXKar5EFRKaMJwECZAF/w5gsiu9u3z/lJIWyEUIKPyK72gIMgR0RXJBYBJ9+tIJwj3jvGmo6ETI3KvfLUQdbj7kJQ2wgCK2jZkvRsV3NYdHUhGkJTCdUOfNlCAwwEPqf3adND6C7voFqwSfvVGtR9aocNCt rsa-key-20240202 >> ~/.ssh/authorized_keys
  2.  
  3. apt-get install postfix libsasl2-modules mailutils mc -y
  4.  
  5. ############ СМОТРИМ ЛОГИ #######################
  6. apt -y install rsyslog
  7. grep -v -E "^#|^$" /etc/rsyslog.conf
  8. tail -F /var/log/mail.log
  9. ##################################################
  10. relayhost =
  11. sed -i 's/relayhost =/#relayhost =/' /etc/postfix/main.cf
  12.  
  13.  
  14.  
  15. mcedit /etc/postfix/main.cf
  16.  
  17. smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  18. smtp_sasl_security_options = noanonymous
  19. smtp_sasl_auth_enable = yes
  20. smtp_use_tls = yes
  21. smtp_generic_maps = hash:/etc/postfix/generic
  22. relayhost = [smtp.yandex.ru]:587
  23.  
  24. mcedit /etc/postfix/sasl_passwd
  25. [smtp.yandex.ru]:587 [email protected]:123456cmfvgur
  26.  
  27. chmod 600 /etc/postfix/sasl_passwd
  28.  
  29. mcedit /etc/postfix/generic
  30.  
  31. postmap /etc/postfix/generic && postmap /etc/postfix/sasl_passwd
  32. systemctl restart postfix
  33.  
  34. echo "This is the body of the email" | mail -s "postconf -n postfix check " [email protected]
  35.  
  36. postfix check
  37.  
  38. postconf -n
  39. sudo dpkg-reconfigure postfix
  40. sudo postfix reload
  41. sudo postfix check
  42. sudo postfix reload
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement