<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://www.cassiel.com/rdf'>
    <s:Snip rdf:about='http://www.cassiel.com/rdf#Tech+Notes/System/Qmail+and+Friends/Running+TMDA'
         s:cUser='nick'
         s:oUser=''
         s:mUser='nick'>
        <s:name>Tech Notes/System/Qmail and Friends/Running TMDA</s:name>
        <s:content>We install as per documentation, building and running RPM&apos;s (as root):&#xA;&#xA;{code:none}&#xA;rpmbuild -tb --nodeps tmda-1.0.tgz&#xA;rpm -Uvh /usr/src/RPM/RPMS/noarch/tmda-1.0-1.noarch.rpm&#xA;{code}&#xA;&#xA;(With appropriate version number and source RPM path).&#xA;&#xA;Run ~~tmda-keygen~~ (as the user requiring the TMDA service), create and protect ~~\~/.tmda/crypt_key~~ (perms 600).&#xA;&#xA;Create ~/.qmail-tmda, containing&#xA;&#xA;{code:none}&#xA;|preline /usr/bin/tmda-filter&#xA;./Maildir/&#xA;{code}&#xA;&#xA;and symlink ~~.qmail-tmda-default~~ to this. So: we accept (and process) any mail to an address ~~&lt;user&gt;-tmda~~ and ~~&lt;user&gt;-tmda-*~~.&#xA;&#xA;(Modify the second line to taste, if delivery is to other than a maildir.)&#xA;&#xA;Mail to be challenged (from procmailrc) should be routed to the address ~~&lt;user&gt;-tmda~~.&#xA;&#xA;In our procmailrc, we replace ~~Reply-To~~ with the (old) &apos;From &apos; before forwarding (otherwise the forwarding causes us to receive our own challenges!). Note: the &quot;CHALLENGE ?? 1&quot; part is the test for suspect (spam) mail.&#xA;&#xA;{code:none}&#xA;:0&#xA;* CHALLENGE ?? 1&#xA;{&#xA;&#9;# SpamAssassin seems to lose Return-Path:, so we use envelope:&#xA;&#xA;&#9;SENDER=`formail -x &apos;From &apos; | sed -e &apos;s/ .*//&apos;`&#xA;&#xA;&#9;# Since we&apos;re about to forward, make sure challenges go the&#xA;&#9;# the original (envelope) sender, not me!&#xA;&#xA;&#9;:0 f&#xA;&#9;| formail -i &quot;Return-Path: &lt;$SENDER&gt;&quot;&#xA;&#xA;&#9;# Forward:&#xA;&#xA;&#9;:0&#xA;&#9;!nick-tmda&#xA;}&#xA;{code}&#xA;&#xA;Auto-whitelisting: ~~\~/.tmdarc~~ contains&#xA;&#xA;{code:none}&#xA;CONFIRM_APPEND = os.path.expanduser(&quot;..../auto-whitelist&quot;)&#xA;{code}&#xA;&#xA;~~\~/.tmda/filters/incoming~~ contains&#xA;&#xA;{code:none}&#xA;from-file ..../auto-whitelist accept&#xA;to *@cassiel.com hold&#xA;{code}&#xA;&#xA;(We are holding, rather than challenging.)&#xA;&#xA;Daily interrogation of the pending list: our crontab looks like&#xA;&#xA;{code:none}&#xA;0 4 * * *&#9;&#9;tmda-pending -C -b -s&#xA;{code}&#xA;</s:content>
        <s:mTime>2005-12-19 21:20:47.0</s:mTime>
        <s:cTime>2005-12-19 21:20:47.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Tech Notes/System/Qmail and Friends'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Tech Notes/System'/>
                <rdf:li rdf:resource='#nick'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Tech Notes'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Tech Notes/System/Qmail and Friends/Running Binc IMAP'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Projects/Audio Bounce'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Projects/Triptychos'/>
                <rdf:li rdf:resource='http://www.cassiel.com/rdf#Gearhead/Korg Wavestation SR'/>
            </rdf:Bag>
        </s:snipLinks>
        <s:attachments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
    </s:Snip>
</rdf:RDF>
