Hosted by PSE.pl | Created: 2002-05-16 | 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

Cyrus Aliases (sendmail)

Abstract

The document describes how to make sendmail select non default local mailer (e.g. cyrus) for some local addresses via aliases, virtusertable or forward file.

It will make sendmail reject during SMTP session delivery attempt to addresses handled by no local mailer unlike typical similar solutions (including cyrusv2.mc from cyrus distribution).

It can be used to select original local mailer delivery for some addresses when cyrus is used as as local mailer.


Copyright (c) 2002 Andrzej Filip

Usage

In aliases file you can put entries like the ones given below:

# deliver to cyrus mailbox
user2:  user2@CYRUSV2
# deliver to cyrus mailbox, system mailbox, and mailbox on another host
user1:  user1@CYRUSV2, \user1, userx@another.host
  

Messages to local address jamesbond will be delivered via to cyrus mailbox kgb.

Sample virtusertable entries:

#
# deliver messages to all mailboxes in example.net to cyrus mailer
#
@example.net    %1@CYRUSV2
#
# redirect one use to cyrus mailbox
#
user1@example.com       %1@CYRUSV2
#
# deliver messages to "valid" mailboxes in example.org to cyrus
# reject remaining addresses in example.org
#
userx@example.org       userx@CYRUSV2
usery@example.org       usery@CYRUSV2
@example.org    error:nouser User unknown

Sample ~login/.forward file:

login@CYRUSV2
\login
somebody@another.host
  

Install

  1. Make sendmail resolve (canonify) *@CYRUS addresses without DNS lookups

    In *.mc file add

    LOCAL_CONFIG
    CPCYRUS CYRUSV2 LOCAL
    
  2. Deliver messages to *@CYRUS using cyrus mailer [requires FEATURE(`mailertable')].

    mailertable:

    CYRUS    cyrus:inbox
    CYRUSV2  cyrusv2:inbox
    LOCAL    local:
    

    cyrus will try to deliver messages to user.USERID.inbox mailbox with user.USERID (default destination) being a fall-back. You must specify something after : otherwise mailertable does not work properly.

  3. Do not accept messages to *@CYRUS via SMTP [requires FEATURE(`access_db') and FEATURE(`blacklist_recipients')]

    access:

    to:CYRUS   REJECT
    to:CYRUSV2 REJECT
    to:LOCAL   REJECT
    

Tests

You can use commands given below for testing the feature:

while read addr; do sendmail -C sendmail-test.cf -bv $addr ; done <<END
user1
user1@example.com
nosuchuser
END

Additional