SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 444 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # /etc/postfix/main.cf
  2. home_mailbox = Maildir/
  3. alias_database = hash:/etc/postfix/aliases
  4. alias_maps = hash:/etc/postfix/aliases
  5. myorigin = /etc/mailname
  6. mydestination = $myhostname, localhost
  7. relayhost =
  8. mynetworks = 127.0.0.0/8 192.168.0.0/16
  9. mailbox_size_limit = 0
  10. recipient_delimiter = +
  11. inet_interfaces = all
  12. inet_protocols = all
  13. biff = no
  14. append_dot_mydomain = no
  15. delay_warning_time = 4h
  16. mailbox_size_limit = 0
  17.  
  18. # SSL and TLS
  19. smtpd_tls_cert_file=/etc/postfix/certs/cert.pem
  20. smtpd_tls_key_file=/etc/postfix/certs/key.pem
  21. smtpd_use_tls=yes
  22. smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
  23. smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
  24.  
  25. # SASL
  26. #smtpd_sasl_path = smtpd
  27. smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
  28. smtpd_sasl_auth_enable = yes
  29. #smtpd_sasl_security_options = noanonymous, nodictionary, noactive
  30. smtpd_sasl_security_options = noanonymous
  31. #smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
  32. smtpd_sasl_local_domain = $myhostname
  33. smtpd_sasl_application_name = smtpd
  34. broken_sasl_auth_clients = yes
  35. smtpd_tls_auth_only = no
  36. smtp_use_tls = yes
  37. smtp_tls_note_starttls_offer = yes
  38. smtpd_tls_loglevel = 1
  39. smtpd_tls_received_header = yes
  40. smtpd_tls_session_cache_timeout = 3600s
  41. tls_random_source = dev:/dev/urandom
  42. #virtual_maps = hash:/etc/postfix/virtusertable
  43. #mydestination = /etc/postfix/local-host-names
  44.  
  45. smtpd_recipient_restrictions =
  46.         permit_sasl_authenticated,
  47.         permit_mynetworks,
  48.         check_relay_domains #,
  49. #       reject_sender_login_mismatch,
  50. #       reject_unauth_destination,
  51. #       reject_authenticated_sender_login_mismatch,
  52. #       eject_unauthenticated_sender_login_mismatch,
  53. #       reject_unknown_sender_domain
  54. #############################################################################################
  55. #/etc/postfix/sasl/smtpd.conf
  56. pwcheck_method: saslauthd
  57. mech_list: plain login
  58. #############################################################################################
  59. #/etc/postfix/master.conf
  60. smtp      inet  n       -       -       -       -       smtpd
  61. pickup    fifo  n       -       -       60      1       pickup
  62. cleanup   unix  n       -       -       -       0       cleanup
  63. qmgr      fifo  n       -       n       300     1       qmgr
  64. tlsmgr    unix  -       -       -       1000?   1       tlsmgr
  65. rewrite   unix  -       -       -       -       -       trivial-rewrite
  66. bounce    unix  -       -       -       -       0       bounce
  67. defer     unix  -       -       -       -       0       bounce
  68. trace     unix  -       -       -       -       0       bounce
  69. verify    unix  -       -       -       -       1       verify
  70. flush     unix  n       -       -       1000?   0       flush
  71. proxymap  unix  -       -       n       -       -       proxymap
  72. proxywrite unix -       -       n       -       1       proxymap
  73. smtp      unix  -       -       -       -       -       smtp
  74. relay     unix  -       -       -       -       -       smtp
  75.         -o smtp_fallback_relay=
  76. showq     unix  n       -       -       -       -       showq
  77. error     unix  -       -       -       -       -       error
  78. retry     unix  -       -       -       -       -       error
  79. discard   unix  -       -       -       -       -       discard
  80. local     unix  -       n       n       -       -       local
  81. virtual   unix  -       n       n       -       -       virtual
  82. lmtp      unix  -       -       -       -       -       lmtp
  83. anvil     unix  -       -       -       -       1       anvil
  84. scache    unix  -       -       -       -       1       scache
  85. maildrop  unix  -       n       n       -       -       pipe
  86.   flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
  87. uucp      unix  -       n       n       -       -       pipe
  88.   flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
  89. ifmail    unix  -       n       n       -       -       pipe
  90.   flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
  91. bsmtp     unix  -       n       n       -       -       pipe
  92.   flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
  93. scalemail-backend unix  -       n       n       -       2       pipe
  94.   flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
  95. mailman   unix  -       n       n       -       -       pipe
  96.   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  97.   ${nexthop} ${user}
  98. #############################################################################################
  99. #/etc/postfix/dynamicmaps.cf
  100. tcp     /usr/lib/postfix/dict_tcp.so            dict_tcp_open  
  101. mysql   /usr/lib/postfix/dict_mysql.so          dict_mysql_open
  102. #############################################################################################
  103. #/etc/default/saslauthd
  104. START=yes
  105. DESC="SASL Authentication Daemon"
  106. NAME="saslauthd"
  107. MECHANISMS="pam"
  108. MECH_OPTIONS=""
  109. THREADS=0
  110. OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd "
  111. #############################################################################################
  112. #$ swaks -a -tls -q AUTH -s host.hopto.org -au natka
  113. Password: password
  114. === Trying host.hopto.org:25...
  115. === Connected to host.hopto.org.
  116. <-  220 white.localdomain ESMTP Postfix
  117.  -> EHLO other.host.lt
  118. <-  250-white.localdomain
  119. <-  250-PIPELINING
  120. <-  250-SIZE 10240000
  121. <-  250-VRFY
  122. <-  250-ETRN
  123. <-  250-STARTTLS
  124. <-  250-AUTH NTLM PLAIN CRAM-MD5 LOGIN DIGEST-MD5
  125. <-  250-AUTH=NTLM PLAIN CRAM-MD5 LOGIN DIGEST-MD5
  126. <-  250-ENHANCEDSTATUSCODES
  127. <-  250-8BITMIME
  128. <-  250 DSN
  129.  -> STARTTLS
  130. <-  220 2.0.0 Ready to start TLS
  131. === TLS started w/ cipher DHE-RSA-AES256-SHA
  132. === TLS peer subject DN="/C=LT/ST=Vilniaus apskritis/L=Vilnius/O=Home/OU=Husband/CN=host.hopto.org/emailAddress=postmaster@other.host.lt"
  133.  ~> EHLO other.host.lt
  134. <~  250-white.localdomain
  135. <~  250-PIPELINING
  136. <~  250-SIZE 10240000
  137. <~  250-VRFY
  138. <~  250-ETRN
  139. <~  250-AUTH NTLM PLAIN CRAM-MD5 LOGIN DIGEST-MD5
  140. <~  250-AUTH=NTLM PLAIN CRAM-MD5 LOGIN DIGEST-MD5
  141. <~  250-ENHANCEDSTATUSCODES
  142. <~  250-8BITMIME
  143. <~  250 DSN
  144.  ~> AUTH CRAM-MD5
  145. <~  334 PDE2NzQ5Nzc5MjEuNDg5Nzk3M0B3aGl0ZS5sb2NhbGRvbWFpbj4=
  146.  ~> bmF0a2EgYzFkOWMwY2IzOTcxMzgyYmZhNWI1ZmMwZGJmNGZlMjg=
  147. <~* 535 5.7.8 Error: authentication failed: authentication failure
  148.  ~> AUTH LOGIN
  149. <~  334 VXNlcm5hbWU6
  150.  ~> bmF0a2E=
  151. <~  334 UGFzc3dvcmQ6
  152.  ~> cGFwYTEhIQ==
  153. <~* 535 5.7.8 Error: authentication failed: authentication failure
  154.  ~> AUTH PLAIN AG5hdGthAHBhcGExISE=
  155. <~* 535 5.7.8 Error: authentication failed: authentication failure
  156. *** No authentication type succeeded
  157.  ~> QUIT
  158. <~  221 2.0.0 Bye
  159. === Connection closed with remote host.
  160. #############################################################################################
  161. #tail -f /var/log/mail.log
  162. Aug 16 21:55:26 white postfix/smtpd[23957]: connect from unknown[other.host.lt]
  163. Aug 16 21:55:26 white postfix/smtpd[23957]: setting up TLS connection from unknown[other.host.lt]
  164. Aug 16 21:55:26 white postfix/smtpd[23957]: Anonymous TLS connection established from unknown[other.host.lt]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
  165. Aug 16 21:55:26 white postfix/smtpd[23957]: warning: SASL authentication failure: no secret in database
  166. Aug 16 21:55:26 white postfix/smtpd[23957]: warning: unknown[other.host.lt]: SASL CRAM-MD5 authentication failed: authentication failure
  167. Aug 16 21:55:26 white postfix/smtpd[23957]: warning: unknown[other.host.lt]: SASL LOGIN authentication failed: authentication failure
  168. Aug 16 21:55:26 white postfix/smtpd[23957]: warning: SASL authentication failure: Password verification failed
  169. Aug 16 21:55:26 white postfix/smtpd[23957]: warning: unknown[other.host.lt]: SASL PLAIN authentication failed: authentication failure
  170. Aug 16 21:55:26 white postfix/smtpd[23957]: disconnect from unknown[other.host.lt]
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