spf-discuss
[Top] [All Lists]

Re: Exim implementation of sender cookies

2004-02-19 11:18:51
Hi,

Thinking along the lines of "it's not rocket science", I decided to put
together an Exim implementation of sender cookies.  It turned out to
be just a few lines of Exim config.
Same with me, based on Daniel Roethlisberger it was a evenings work.
Though note that I only later learned about localpart length constraints
and the crypto discussion. 
If there is enough interest, I would invest another evening to bring it
up to the recent findings.

This should word with Exim 4.20 and higher. The full exim.conf and an
explanation can be found at http://gnuher.de/dot-files/exim/ if you are
interested.

Martin

__snip__
rpr_lookup_mx:
  driver = dnslookup
  senders = ! *(_at_)+local_domains
  ignore_target_hosts = 127.0.0.0/8
  domains = ! +local_domains
  verify = false 
  address_data = ${eval:
                   ${sg {${sg {$sender_address}{([=#%_])}{_\$1}}}{(_at_)}{#}}=\
                   ${sg {$original_local_part}{([=#%_])}{_\$1}}\
                   ${if eq {$domain}{$original_domain}\
                     {%$original_domain(_at_)$primary_hostname}\
                     {(_at_)$original_domain}}
  # Check for empty sender_address and prevent bounces from being rewritten
  condition = ${if and {{!eq {$sender_address}{}}\
                        {!match {$h_X-RPR-Return:
                       }{1}{0}}
  headers_add = "X-RPR-Rewrite:
                 \tSee RPR_EXPLAIN_URL"
  errors_to = bounce-${md5:
  transport = remote_smtp

rpr_return:
  driver = redirect
  local_part_prefix = bounce-
  senders = :
  condition = ${if match {$local_part}{\N^([0-9a-f]{32})-(\d+=(?:
  data = ${if match {$local_part}{\N^[0-9a-f]{32}-(\d+)=((?:
  headers_add = "X-RPR-Return:
                 \tSee RPR_EXPLAIN_URL"

rpr_error_checksum:
  driver = redirect
  local_part_prefix = bounce-
  senders = :
  condition = ${if match {$local_part}{\N^([0-9a-f]{32})-(\d+=(?:
  data = postmaster(_at_)gnuher(_dot_)de
  headers_add = "X-RPR-Alert:

rpr_error_nodsn:
  driver = redirect
  local_part_prefix = bounce-
  condition = ${if match {$local_part}{\N^([0-9a-f]{32})-(\d+=(?:
  data = postmaster(_at_)gnuher(_dot_)de
  headers_add = "X-RPR-Alert:




<Prev in Thread] Current Thread [Next in Thread>