[Exim] dated addresses (example)

Top Page
Delete this message
Reply to this message
Author: Kirill Miazine
Date:  
To: exim-users
New-Topics: [Exim] dated addresses (ACL version)
Subject: [Exim] dated addresses (example)
Greetings

Below follows an Exim filter snip to deal with addresses that will
expire at given numer of seconds since epoch (and a valid address will
be bounced back to the sender):

    if $local_part_suffix matches "\\N^-dated-0*(\\d{10,12})$\\N" then
        add $tod_epoch to n7
        add ${eval:$n7+86400} to n8
        add $1 to n9
        if $n9 is below 1041375600 then
            fail "Address not yet valid, try <$local_part-dated-$n8@$domain>"
        elif $n9 is below $n7 then
            fail "Address no longer valid, try <$local_part-dated-$n8@$domain>"
        endif
    endif


(Useful for those who like the idea of addresses that expire, but do not
want to install a monster like TMDA just to get dated addresses.)

Here is how one generates an address that will expire in 15 minutes
(used at http://km.krot.org/mailto):

    print 'km-dated-', (time + 900), '@krot.org', "\n";


Best wishes
Kirill

--

Er en viljeserklæring forvansket ved feiltelegrafering, blir den, som har
avgit den, ikke bundet ved erklæringen i den skikkelse, den er kommet frem.