Guest User

Untitled

a guest
Nov 8th, 2018
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. myHostName="$HOSTNAME"
  4. read -sp "Please paste your Gmail proxy email address (due to pasting, no verfication needed): " gmail_proxy_email_address && echo
  5. read -sp "Please paste your Gmail proxy email password (due to pasting, no verfication needed):" gmail_proxy_email_password && echo
  6.  
  7. cat <<-EOF > /etc/ssmtp/ssmtp.conf
  8. root=${gmail_proxy_email_address}
  9. AuthUser=${gmail_proxy_email_address}
  10. AuthPass=${gmail_proxy_email_password}
  11. hostname=${myHostName}
  12. mailhub=smtp.gmail.com:587
  13. rewriteDomain=gmail.com
  14. FromLineOverride=YES
  15. UseTLS=YES
  16. UseSTARTTLS=YES
  17. EOF
  18.  
  19. # (simplified to show only the relevant part)
  20. cat <<EOF
  21. hostname=${HOSTNAME:-$(hostname)}
  22. EOF
  23.  
  24. #!/bin/bash
  25.  
  26. set -eu
  27.  
  28. umask 077 # Ensure others can't read the file
  29.  
  30. read -p "Please paste your Gmail proxy email address: "
  31. gmail_proxy_email_address
  32. read -sp "Please paste your Gmail proxy email password:"
  33. gmail_proxy_email_password && echo
  34.  
  35. cat <<-EOF > /etc/ssmtp/ssmtp.conf
  36. root=${gmail_proxy_email_address}
  37. AuthUser=${gmail_proxy_email_address}
  38. AuthPass=${gmail_proxy_email_password}
  39. hostname=${HOSTNAME:-$(hostname)}
  40. mailhub=smtp.gmail.com:587
  41. rewriteDomain=gmail.com
  42. FromLineOverride=YES
  43. UseTLS=YES
  44. UseSTARTTLS=YES
  45. EOF
Add Comment
Please, Sign In to add comment