OT: using bogofilter as gateway to Exchange server

Eric Wood eric at interplas.com
Wed Nov 12 17:36:16 CET 2003


Sort of off topic.

I customer of my use MS Exchange.  They like (and I like) how bogofilter
works and we would like to know if anyone has set up a mail server as a
gateway filter.  In other words,  mail hits a linux box, goes through
bogofilter and good mail goes on through to the Exchange box.

Now some theories on how it could be done:
1.  Set sendmail up to accept the mail as a "virtual domain".  That way is
doesn't check for the existance of users.  Users will only be listed on the
Exchange box anyway.
2. set the Mvirtual stanza to use procmail as the delivery agent.
3. set up procmail recipe to bogofiler email to SPAM and HAM inboxs.
4. Use a lock file when writing mail to both SPAM and HAM inboxes.
5. Have cron  run a script:
   A. test for the HAM_lock file !existance and FORMAIL_lock file
!existance.  Create HAM_lock. Create FORMAIL_lock.
   B. copy the HAM inbox to HAM_COPY, Clear HAM inbox and clear HAM_lock so
procmail can get delivering messages again.
   D split up the HAM_COPY inbox into multiple messages
   E use formail to change to To address to include the Exhange FQDN name.
eric at xyz.com => eric at exchange.xyz.com
   F. pipe each message through sendmail, which then attaches to the true
Exchange box for delivery.
   G loop through each message then clear FORMAIL_lock when done.

Any people doing this?
-eric wood







More information about the Bogofilter mailing list