SHARE
TWEET

Untitled

a guest Aug 17th, 2018 558 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Email set up
  2. # -----------------------------------------------------------------------------
  3.  
  4. # Route 53
  5. edu.ono188.net.         MX      10 mail.edu.ono188.net.
  6. mail.edu.ono188.net.    A       13.115.103.176
  7.  
  8. # service sendmail stop
  9. # chkconfig sendmail off
  10.  
  11. # yum install postfix
  12. # vi /etc/postfix/main.cf
  13.  
  14. myhostname = mail.edu.ono188.net
  15. mydomain = edu.ono188.net
  16. myorigin = $mydomain
  17. mydestination = $myhostname localhost.$mydomain localhost $mydomain
  18. mynetworks = 10.10.11.0/24 10.10.12.0/24 10.10.21.0/24 10.10.22.0/24 127.0.0.1/32
  19. relay_domains = $mydestination
  20.  
  21.  
  22. inet_interfaces = all
  23.  
  24. --------
  25. [ec2-user@ip-172-31-21-215 ~]$ sudo grep -Ev '^#' /etc/postfix/main.cf | grep -Ev '^\s*$'
  26. queue_directory = /var/spool/postfix
  27. command_directory = /usr/sbin
  28. daemon_directory = /usr/libexec/postfix
  29. data_directory = /var/lib/postfix
  30. mail_owner = postfix
  31. myhostname = mail.edu.ono188.net
  32. mydomain = edu.ono188.net
  33. myorigin = $mydomain
  34. inet_interfaces = all
  35. inet_protocols = all
  36. mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
  37. unknown_local_recipient_reject_code = 550
  38. mynetworks = 10.10.11.0/24 10.10.12.0/24 10.10.21.0/24 10.10.22.0/24 127.0.0.1/32
  39. relay_domains = $mydestination
  40. alias_maps = hash:/etc/aliases
  41. alias_database = hash:/etc/aliases
  42. debug_peer_level = 2
  43. debugger_command =
  44.      PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  45.      ddd $daemon_directory/$process_name $process_id & sleep 5
  46. sendmail_path = /usr/sbin/sendmail.postfix
  47. newaliases_path = /usr/bin/newaliases.postfix
  48. mailq_path = /usr/bin/mailq.postfix
  49. setgid_group = postdrop
  50. html_directory = no
  51. manpage_directory = /usr/share/man
  52. sample_directory = /usr/share/doc/postfix-2.6.6/samples
  53. readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
  54. --------
  55.  
  56. # service postfix start
  57. # chkconfig postfix on
  58.  
  59. $ echo "Message body" | mail -s "Message Subject" my.2nd.mail.address@gmail.com
  60.  
  61. [ec2-user@ip-172-31-21-215 ~]$ nc localhost 25
  62. 220 mail.edu.ono188.net ESMTP Postfix
  63. ehlo localhost
  64. 250-mail.edu.ono188.net
  65. 250-PIPELINING
  66. 250-SIZE 10240000
  67. 250-VRFY
  68. 250-ETRN
  69. 250-ENHANCEDSTATUSCODES
  70. 250-8BITMIME
  71. 250 DSN
  72. mail from: ec2-user@edu.ono188.net
  73. 250 2.1.0 Ok
  74. rcpt to: my.2nd.mail.address@gmail.com
  75. 250 2.1.5 Ok
  76. data
  77. 354 End data with <CR><LF>.<CR><LF>
  78. subject: my subject
  79. from: ec2-user@edu.ono188.net
  80. to: my.2nd.mail.address@gmail.com
  81. aaa
  82. bbb
  83. ccc
  84. .
  85. 250 2.0.0 Ok: queued as 5F76F605F9
  86. quit
  87. 221 2.0.0 Bye
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top