The document describes how to make sendmail select non default local mailer (e.g. cyrus) for some local addresses.
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).
Version 8.2 released 2003-11-24 can handle user+detail syntax. For "user+detail" address it will lookup for "user+detail", "user+*", user in localtable. %1 will contain "detail".
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHOR NAME MUST BE QUOTED IN ANY WORK DERIVATED FROM THE WORK.
In localtable file you can put entries like the ones given below:
# local_address local_like_mailer:delivery_address zyz cyrus:zyz j23 cyrus:%0 007 cyrus:m5 folder1 cyrusbb:folder1 bb+folder2 cyrusbb:folder2 bb+folder3 cyrusbb:%1
Messages to local addresses zyz and j23 will be delivered via cyrus mailer. Messages to 007 local address will be delivered to cyrus mailbox m5.
Create /etc/mail/localtable file and compile it using makemap.
Copy provided localtable.m4 file into cf/feature directory (localtable.m4 signature).
Use "Save as" command in your browser. In some cases "copy and paste" looses required info (e.g. tabs - \t)
In *.mc file you use to generate sendmail.cf add:
FEATURE(`localtable')dnl
and generate new sendmail.cf or sendmail-test.cf.
(Optional) Install makelocaltable script for synchronization of localtable with cyrus (makelocaltable signature).
Modify configuration variables in the script to fit your cyrus and sendmail installations. First time run "makelocaltable -f".
You can use commands given below for testing the feature:
while read addr; do sendmail -C sendmail-test.cf -bv $addr ; done <<END xyz xyz@localhost.localdomain 007 root nosuchuser END
The posting
Subject: localtable - using map to send some local addresses to cyrus
Date: 2002-04-15
Newsgroups: comp.mail.sendmail
Message-ID: <3CBAE781.106@bigfoot.com>
Google shows only one of three text/plain mime parts