Advertisement
Guest User

Untitled

a guest
Jul 16th, 2017
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. apt-get install apache2
  2.  
  3. apt-get install php5
  4.  
  5. apt-get install mysql-server
  6.  
  7. sudo apt-get install ssmtp
  8.  
  9. gksu gedit /etc/ssmtp/ssmtp.conf
  10.  
  11. # Config file for sSMTP sendmail
  12. #
  13. # The person who gets all mail for userids < 1000
  14. # Make this empty to disable rewriting.
  15. #root=postmaster
  16. root=****@gmail.com
  17.  
  18. # The place where the mail goes. The actual machine name is required no
  19. # MX records are consulted. Commonly mailhosts are named mail.domain.com
  20. #mailhub=mail
  21. mailhub=smtp.gmail.com:587
  22.  
  23. AuthUser=****@gmail.com
  24. AuthPass=****
  25. UseTLS=YES
  26. UseSTARTTLS=YES
  27.  
  28. # Where will the mail seem to come from?
  29. #rewriteDomain=
  30. rewriteDomain=gmail.com
  31.  
  32. # The full hostname
  33. #hostname=MyMediaServer.home
  34. hostname=****@gmail.com
  35.  
  36. # Are users allowed to set their own From: address?
  37. # YES - Allow the user to specify their own From: address
  38. # NO - Use the system generated From: address
  39. FromLineOverride=YES
  40.  
  41. ~$ sudo apt-get install msmtp ca-certificates
  42.  
  43. ~$ sudo gedit /etc/msmtprc
  44.  
  45. defaults
  46. tls on
  47. tls_starttls on
  48. tls_trust_file /etc/ssl/certs/ca-certificates.crt
  49.  
  50. account default
  51. host smtp.gmail.com
  52. port 587
  53. auth on
  54. user MY_GMAIL_ID@gmail.com
  55. password MY_GMAIL_PASSSWORD
  56. from MY_GMAIL_ID@gmail.com
  57. logfile /var/log/msmtp.log
  58.  
  59. ~$ sudo touch /var/log/msmtp.log
  60.  
  61. ~$ sudo chmod 0644 /etc/msmtprc
  62.  
  63. ~$ sudo chmod 0777 /var/log/msmtp.log
  64.  
  65. ~$ echo -e "Subject: Test MailrnrnThis is my first test email." |msmtp --debug --from=default -t MY_GMAIL_ID@gmail.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement