Guest User

Untitled

a guest
Jan 13th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. [root@server]# saslpasswd2 -c -u test.com test
  2. Password: test123
  3. Again (for verification): test123
  4.  
  5. [root@server]# sasldblistusers2
  6. test@test.com: userPassword
  7.  
  8. [root@server]# testsaslauthd -u test@test.com -p test123
  9. 0: NO "authentication failed"
  10.  
  11. [root@server]# tail -n1 /var/log/messages
  12. Jan 13 08:10:19 server saslauthd[2595]: do_auth : auth failure: [user=test@test.com] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
  13.  
  14. [root@server]# postconf -n
  15. alias_database = hash:/etc/aliases
  16. alias_maps = hash:/etc/aliases
  17. broken_sasl_auth_clients = yes
  18. command_directory = /usr/sbin
  19. config_directory = /etc/postfix
  20. daemon_directory = /usr/libexec/postfix
  21. data_directory = /var/lib/postfix
  22. debug_peer_level = 2
  23. html_directory = no
  24. inet_interfaces = all
  25. inet_protocols = all
  26. mail_owner = postfix
  27. mailq_path = /usr/bin/mailq.postfix
  28. manpage_directory = /usr/share/man
  29. mydestination = $myhostname, localhost.$mydomain, localhost
  30. mydomain = testing.com
  31. myhostname = smtp.testing.com
  32. newaliases_path = /usr/bin/newaliases.postfix
  33. queue_directory = /var/spool/postfix
  34. readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
  35. relayhost = [mx01.testing.com]:25
  36. sample_directory = /usr/share/doc/postfix-2.6.6/samples
  37. sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map
  38. sendmail_path = /usr/sbin/sendmail.postfix
  39. setgid_group = postdrop
  40. smtp_fallback_relay = [mx02.testing.com]:25
  41. smtp_tls_CAfile = /etc/postfix/ssl/smtp.testing.com.ca-file
  42. smtp_tls_cert_file = /etc/postfix/ssl/smtp.testing.com.crt
  43. smtp_tls_key_file = /etc/postfix/ssl/smtp.testing.com.key
  44. smtp_use_tls = yes
  45. smtpd_banner = $myhostname ESMTP ($mail_version)
  46. smtpd_sasl_auth_enable = yes
  47. smtpd_sasl_local_domain =
  48. smtpd_sasl_security_options = noanonymous
  49. smtpd_sasl_tls_security_options = noanonymous
  50. smtpd_tls_CAfile = /etc/postfix/ssl/smtp.testing.com.ca-file
  51. smtpd_tls_cert_file = /etc/postfix/ssl/smtp.testing.com.crt
  52. smtpd_tls_key_file = /etc/postfix/ssl/smtp.testing.com.key
  53. smtpd_tls_security_level = may
  54. unknown_local_recipient_reject_code = 550
  55.  
  56. [root@server]# cat /etc/sasl2/smtpd.conf
  57. pwcheck_method: auxprop
  58. auxprop_plugin: sasldb
  59. mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
  60. log_level: 7
  61.  
  62. [root@server]# cat /etc/postfix/master.cf
  63. smtp inet n - n - - smtpd -v
  64. #submission inet n - n - - smtpd
  65. # -o smtpd_tls_security_level=encrypt
  66. # -o smtpd_sasl_auth_enable=yes
  67. # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  68. # -o milter_macro_daemon_name=ORIGINATING
  69. smtps inet n - n - - smtpd -v
  70. # -o smtpd_tls_wrappermode=yes
  71. -o smtpd_sasl_auth_enable=yes
  72. -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  73. # -o milter_macro_daemon_name=ORIGINATING
  74.  
  75. Stat Connected.
  76. Recv 13/01/2017 8:34:12 AM: 220 smtp.test.com ESMTP (2.6.6)<EOL>
  77. Sent 13/01/2017 8:34:12 AM: EHLO SendSMTPv2.19.0.1<EOL>
  78. Recv 13/01/2017 8:34:12 AM: 250-smtp.securmail.net.au<EOL>250-PIPELINING<EOL>250-SIZE 10240000<EOL>250-VRFY<EOL>250-ETRN<EOL>250-STARTTLS<EOL>250-AUTH LOGIN DIGEST-MD5 CRAM-MD5 PLAIN<EOL>250-AUTH=LOGIN DIGEST-MD5 CRAM-MD5 PLAIN<EOL>250-ENHANCEDSTATUSCODES<EOL>250-8BITMIME<EOL>250 DSN<EOL>
  79. Sent 13/01/2017 8:34:12 AM: STARTTLS<EOL>
  80. Recv 13/01/2017 8:34:12 AM: 220 2.0.0 Ready to start TLS<EOL>
  81. Sent 13/01/2017 8:34:12 AM: EHLO SendSMTPv2.19.0.1<EOL>
  82. Recv 13/01/2017 8:34:12 AM: 250-smtp.test.com<EOL>250-PIPELINING<EOL>250-SIZE 10240000<EOL>250-VRFY<EOL>250-ETRN<EOL>250-AUTH LOGIN DIGEST-MD5 CRAM-MD5 PLAIN<EOL>250-AUTH=LOGIN DIGEST-MD5 CRAM-MD5 PLAIN<EOL>250-ENHANCEDSTATUSCODES<EOL>250-8BITMIME<EOL>250 DSN<EOL>
  83. Sent 13/01/2017 8:34:12 AM: MAIL FROM:<test@test.com><EOL>
  84. Recv 13/01/2017 8:34:12 AM: 250 2.1.0 Ok<EOL>
  85. Sent 13/01/2017 8:34:12 AM: RCPT TO:<test@testinc.com><EOL>
  86. Recv 13/01/2017 8:34:12 AM: 554 5.7.1 <test@testinc.com>: Relay access denied<EOL>
  87. Sent 13/01/2017 8:34:12 AM: RSET<EOL>
  88. Recv 13/01/2017 8:34:13 AM: 250 2.0.0 Ok<EOL>
  89.  
  90. [root@Sserver]# tail -n 50 /var/log/maillog
  91. Jan 13 08:34:23 server/smtpd[13157]: NOQUEUE: reject: RCPT from xx.xx.xx.xx.isp.com[xx.xx.xx.xx]: 554 5.7.1 <test@testinc.com>: Relay access denied; from=<test@test.com> to=<test@testinc.com> proto=ESMTP helo=<SendSMTPv2.19.0.1>
  92. Jan 13 08:34:23 server/smtpd[13157]: generic_checks: name=reject_unauth_destination status=2
  93. Jan 13 08:34:23 server/smtpd[13157]: > xx.xx.xx.xx.isp.com[xx.xx.xx.xx]: 554 5.7.1 <test@testinc.com>: Relay access denied
Add Comment
Please, Sign In to add comment