xartin

msmtp and mail aliases config for linux system alerts

Feb 23rd, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | Software | 0 0
  1. $ cat /etc/msmtprc
  2. # Set default values for all following accounts.
  3. defaults
  4. auth on
  5. tls on
  6. tls_trust_file /etc/ssl/certs/ca-certificates.crt
  7. logfile ~/.msmtp.log
  8.  
  9. account alerts
  10. host smtp.gmail.com
  11. port 587
  12. password F@ncyt0wnL0L
  13.  
  14.  
  15. # Set a default account
  16. account default : alerts
  17. aliases /etc/mail/aliases
  18.  
  19.  
  20. mailer aliases for linux to use local system smtp email alerting
  21.  
  22. $ cat /etc/mail/aliases
  23. # Basic system aliases -- these MUST be present.
  24. MAILER-DAEMON: postmaster
  25. postmaster: root
  26.  
  27. # Send root to admin
  28.  
  29. # General redirections for pseudo accounts.
  30. adm: root
  31. bin: root
  32. daemon: root
  33. exim: root
  34. lp: root
  35. mail: root
  36. named: root
  37. nobody: root
  38. postfix: root
  39.  
  40. # Well-known aliases -- these should be filled in!
  41. # root:
  42. # operator:
  43.  
  44. # Standard RFC2142 aliases
  45. abuse: postmaster
  46. ftp: root
  47. hostmaster: root
  48. news: usenet
  49. noc: root
  50. security: root
  51. usenet: root
  52. uucp: root
  53. webmaster: root
  54. www: webmaster
  55.  
  56. # trap decode to catch security attacks
  57. # decode: /dev/null
  58.  
Add Comment
Please, Sign In to add comment