Hosted by PSE.pl | Created: 2002-11-11 | Last update: 2004-03-17 07:40:32 UTC | GnuPG signature of this page
anfiTop | anfiUp | Andrzej Filip | Mirror Sites | GnuPG Keys | New!google
googleMy Postings | slashdotJournal | Showing Gratitude
Personal | Sendmail | Exim | General MTA | Cyrus IMAP | UUCP

Real Time Cyrus Integration - fstat map (sendmail,cyrus)

Obsoleted

Obsoleted by Real Time Cyrus Integration Version 2

Abstract

The document describes how to make sendmail check in real time presence of cyrus mailbox using fstat map.

It uses FSTATMAP - For Future Release proposal submited by me for sendmail 8.12.7 and rejected by sendmail.org.


Copyright (c) 2002 Andrzej Filip

Usage

It will make sendmail check (after alias expansion) if cyrus mailbox exists when no corresponding system account can be detected.

Install

  1. Compile your sendmail with FSTATMAP
  2. Modify *.mc file you use to generate your sendmail.cf (as separate file with gpg signature):

    dnl It makes sendmail define user map in sendmail.cf
    define(`LUSER_RELAY')
    LOCAL_CONFIG
    # fstat - map for file stat checking 
    Kfstat fstat
    # cyrus directory with user mailboxes directories
    D{CyrusUserDir} /var/spool/cyrus/user
    LOCAL_RULESETS
    SLocal_localaddr
    # Treat system mailboxes as usual
    R$+             $: $(user $1 $)
    R$+ <>          $@
    # Detect cyrus mailboxes - deliver via cyrus mailer
    R$-             $: $1 <$(fstat d $@ ${CyrusUserDir}/$1 $: $)>
    R$- <OK>        $# cyrus $: @$1
    # Treat remaning as usuall
    R$*             $@
    

Tests

sendmail -d60.5 -bv os_account_name
sendmail -d60.5 -bv cyrus_account_with_no_os_account
sendmail -d60.5 -bv no_account

Additional