Guest User

Untitled

a guest
Apr 3rd, 2018
1,068
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. relayhost = [smtp.office365.com]:587
  2. smtp_always_send_ehlo = yes
  3. smtp_sasl_auth_enable = yes
  4. smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  5. smtp_generic_maps = hash:/etc/postfix/generic
  6. smtp_tls_security_level = may
  7. smtp_sasl_security_options = noanonymous
  8.  
  9. /.*/ <o365 email>
  10. root@server.difan.local <o365 email>
  11. root@localdomain <o365 email>
  12. @localdomain <o365 email>
  13.  
  14. [smtp.office365.com]:587 <o365 email>:<o365 password>
  15.  
  16. echo "This is the body of the email" | mail -s "This is the subject line" difan.zhao@outlook.com
  17.  
  18. Mar 26 10:46:00 server postfix/pickup[1921]: 5DC594087202: uid=0 from=<root>
  19. Mar 26 10:46:00 server postfix/cleanup[2495]: 5DC594087202: message-id=<20170326164600.5DC594087202@server.difan.local>
  20. Mar 26 10:46:00 server postfix/qmgr[1922]: 5DC594087202: from=<root@server.difan.local>, size=486, nrcpt=1 (queue active)
  21. Mar 26 10:46:00 server postfix/smtp[2497]: warning: SASL authentication failure: No worthy mechs found
  22. Mar 26 10:46:00 server postfix/smtp[2497]: 5DC594087202: SASL authentication failed; cannot authenticate to server smtp.office365.com[40.97.128.34]: no mechanism available
  23. ... <last two messages repeated 4 times>
  24. Mar 26 10:46:02 server postfix/smtp[2497]: 5DC594087202: to=<difan.zhao@outlook.com>, relay=smtp.office365.com[40.97.142.194]:587, delay=2.2, delays=0.02/0/2.2/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.office365.com[40.97.142.194]: no mechanism available)
  25.  
  26. /.*/ email@domain.com
  27.  
  28. sudo postmap hash:/etc/postfix/generic
  29. sudo chown root:root /etc/postfix/generic /etc/postfix/generic.db
  30. sudo chmod 644 /etc/postfix/generic /etc/postfix/generic.db
Add Comment
Please, Sign In to add comment