Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.93 KB | None | 0 0
  1. # postconf -nf
  2. alias_database = hash:/etc/aliases
  3. alias_maps = hash:/etc/aliases
  4. append_dot_mydomain = no
  5. biff = no
  6. inet_interfaces = all
  7. inet_protocols = all
  8. mailbox_size_limit = 0
  9. milter_connect_macros = i j {daemon_name} v {if_name} _
  10. mydestination = localhost
  11. myhostname = mail.domain.tld
  12. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 222.222.222.222/28
  13. myorigin = /etc/mailname
  14. readme_directory = no
  15. recipient_delimiter = +
  16. relayhost =
  17. smtp_tls_security_level = may
  18. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  19. smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
  20. smtpd_milters = unix:/spamass/spamass.sock
  21. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
  22. defer_unauth_destination
  23. smtpd_sasl_auth_enable = yes
  24. smtpd_sasl_path = private/auth
  25. smtpd_sasl_type = dovecot
  26. smtpd_sender_login_maps = mysql:/etc/postfix/mysql-email2email.cf
  27. smtpd_tls_auth_only = yes
  28. smtpd_tls_cert_file = /etc/letsencrypt/live/mail.domain.tld/fullchain.pem
  29. smtpd_tls_key_file = /etc/letsencrypt/live/mail.domain.tld/privkey.pem
  30. smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
  31. smtpd_tls_security_level = may
  32. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  33. smtpd_use_tls = yes
  34. virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  35. virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  36. virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  37. virtual_transport = lmtp:unix:private/dovecot-lmtp
  38.  
  39. # postconf -Mf
  40. smtp inet n - y - - smtpd
  41. submission inet n - - - - smtpd
  42. -o syslog_name=postfix/submission
  43. -o smtpd_tls_security_level=encrypt
  44. -o smtpd_sasl_auth_enable=yes
  45. -o smtpd_sasl_type=dovecot
  46. -o smtpd_sasl_path=private/auth
  47. -o smtpd_sasl_security_options=noanonymous
  48. -o smtpd_sender_login_maps=mysql:/etc/postfix/mysql-email2email.cf
  49. -o smtpd_sender_restrictions=reject_sender_login_mismatch
  50. -o smtpd_sasl_local_domain=$myhostname
  51. -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  52. -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
  53. pickup unix n - y 60 1 pickup
  54. cleanup unix n - y - 0 cleanup
  55. qmgr unix n - n 300 1 qmgr
  56. tlsmgr unix - - y 1000? 1 tlsmgr
  57. rewrite unix - - y - - trivial-rewrite
  58. bounce unix - - y - 0 bounce
  59. defer unix - - y - 0 bounce
  60. trace unix - - y - 0 bounce
  61. verify unix - - y - 1 verify
  62. flush unix n - y 1000? 0 flush
  63. proxymap unix - - n - - proxymap
  64. proxywrite unix - - n - 1 proxymap
  65. smtp unix - - y - - smtp
  66. relay unix - - y - - smtp
  67. showq unix n - y - - showq
  68. error unix - - y - - error
  69. retry unix - - y - - error
  70. discard unix - - y - - discard
  71. local unix - n n - - local
  72. virtual unix - n n - - virtual
  73. lmtp unix - - y - - lmtp
  74. anvil unix - - y - 1 anvil
  75. scache unix - - y - 1 scache
  76. maildrop unix - n n - - pipe flags=DRhu
  77. user=vmail argv=/usr/bin/maildrop -d ${recipient}
  78. uucp unix - n n - - pipe flags=Fqhu
  79. user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
  80. ifmail unix - n n - - pipe flags=F user=ftn
  81. argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
  82. bsmtp unix - n n - - pipe flags=Fq.
  83. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
  84. scalemail-backend unix - n n - 2 pipe flags=R
  85. user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}
  86. ${user} ${extension}
  87. mailman unix - n n - - pipe flags=FR
  88. user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}
  89. ${user}
  90.  
  91.  
  92. # postmap -q me@domain.tld mysql:/etc/postfix/mysql-email2email.cf
  93. me@domain.tld
  94.  
  95. # postmap -q NOTme@domain.tld mysql:/etc/postfix/mysql-email2email.cf
  96. <no output>
  97.  
  98.  
  99. # cat /var/log/mail.log for email sent as forged email:
  100. Aug 18 09:24:39 mail postfix/submission/smtpd[1305]: connect from hostname.domain.tld[123.123.123.123]
  101. Aug 18 09:24:40 mail spamass-milter[197]: Could not retrieve sendmail macro "i"!. Please add it to confMILTER_MACROS_ENVFROM for better spamassassin results
  102. Aug 18 09:24:40 mail postfix/submission/smtpd[1305]: 2319060040: client=hostname.domain.tld[123.123.123.123], sasl_method=PLAIN, sasl_username=me@domain.tld
  103. Aug 18 09:24:40 mail postfix/cleanup[1313]: 2319060040: message-id=<c53a6e3b-97fb-ba65-1372-be1d02605a86@domain.tld>
  104. Aug 18 09:24:40 mail spamd[517]: spamd: connection from ip6-localhost [::1]:40070 to port 783, fd 5
  105. Aug 18 09:24:40 mail spamd[517]: spamd: processing message <c53a6e3b-97fb-ba65-1372-be1d02605a86@domain.tld> for me:5000
  106. Aug 18 09:24:40 mail spamd[517]: spamd: clean message (-1.0/5.0) for me:5000 in 0.2 seconds, 741 bytes.
  107. Aug 18 09:24:40 mail spamd[517]: spamd: result: . 0 - ALL_TRUSTED,TVD_SPACE_RATIO scantime=0.2,size=741,user=me,uid=5000,required_score=5.0,rhost=ip6-localhost,raddr=::1,rport=40070,mid=<c53a6e3b-97fb-ba65-1372-be1d02605a86@domain.tld>,autolearn=ham autolearn_force=no
  108. Aug 18 09:24:40 mail postfix/qmgr[643]: 2319060040: from=<me@domain.tld>, size=672, nrcpt=1 (queue active)
  109. Aug 18 09:24:40 mail spamd[434]: prefork: child states: II
  110. Aug 18 09:24:40 mail postfix/submission/smtpd[1305]: disconnect from hostname.domain.tld[123.123.123.123] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
  111. Aug 18 09:24:40 mail postfix/smtp[1316]: 2319060040: to=<receiver@some.tld>, relay=host.domain.tld[312.312.312.312]:25, delay=0.48, delays=0.33/0.02/0.01/0.12, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 8B91A1000B8)
  112. Aug 18 09:24:40 mail postfix/qmgr[643]: 2319060040: removed
  113. Aug 18 09:24:40 mail dovecot: imap-login: Login: user=<me@domain.tld>, method=PLAIN, rip=123.123.123.123, lip=222.222.222.222, mpid=1318, TLS, session=<wCWxBQJXNrNVphKX>
  114. Aug 18 09:24:40 mail dovecot: imap(me@domain.tld): Logged out in=538 out=532
  115. Aug 18 09:24:40 mail dovecot: imap-login: Login: user=<me@domain.tld>, method=PLAIN, rip=123.123.123.123, lip=222.222.222.222, mpid=1320, TLS, session=<LDy1BQJXOLNVphKX>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement