Sun Java System Messaging Server 6.3 Administration Guide

16.5 To Configure LMTP Delivery

Configuring the LMTP delivery mechanism requires configuration on both the relay machines and on the back end stores. On the relays, the DELIVERY_OPTIONS MTA option (in option.dat) has to be changed so that messages being delivered to the stores are passed to the LMTP channel. The back end store must be configured with the dispatcher, but does not need the job controller. The dispatcher must be configured to run the LMTP server.

In a typical multi-tier deployment, users are provisioned on different backend message store machines. One or more of these backend machines may not have LMTP turned on and therefore the front-end relays need to be aware of which store machines are LMTP aware. This is achieved by using the General Database facility to explicitly name those message stores which are configured to accept LMTP delivery.

ProcedureTo Configure the Inbound MTA Relays with LMTP

To configure inbound MTA relays to use LMTP, do the following:

  1. Modify your imta.cnf file and change the LMTP rewrite rules to read:


    ! lmtp
    .lmtp   $E$F$U%$H.lmtp@lmtpcs-daemon
    .lmtp   $B$F$U%$H@$H@lmtpcs-daemon
    !
  2. Set the mailbox DELIVERY_OPTIONS to:


    #*mailbox=@$X.LMTP:$M%$\$2I$_+$2S@lmtpcs-daemon
  3. Add the channel keywords multigate connectcanonical to each of the tcp_lmtp* channel blocks.

  4. Add the following channel keywords to the tcp_lmtpcs channel:


    fileinto @$4O:$U+$S@$D

    Note that the 'O' in the keyword above is a capital letter O, not a zero.

  5. The incoming MTA relay configuration settings should look like this:

    The option.dat entry for DELIVERY_OPTIONS should look like this:


    !------------------------------------------
    ! Modified DELIVERY_OPTIONS to activate LMTP 
    ! delivery from a frontend to the backend store
    !--------------------------------------------
    !
    DELIVERY_OPTIONS=\
        #*mailbox=@$X.LMTP:$M%$\$2I$_+$2S@lmtpcs-daemon,\
        #&members=*,\
        #&@members_offline=*,\
        #/hold=@hold-daemon:$A,\
        #program=$M%$P@pipe-daemon,\
        #forward=**,\
        #*^!autoreply=$M+$D@bitbucket
    !

    After your changes the modified imta.cnf rewrite rules should look like this:


    ! lmtp
    .lmtp   $E$F$U%$H.lmtp@lmtpcs-daemon
    .lmtp   $B$F$U%$H@$H@lmtpcs-daemon
    !

    The changed channel blocks should look like this:


    !
    ! tcp_lmtpcs (LMTP client - store)
    tcp_lmtpcs defragment lmtp  multigate connectcanonical \
       fileinto @$4O:$U+$S@$D port 225 nodns single_sys \
       subdirs 20 maxjobs 7 pool SMTP_POOL dequeue_removeroute
    lmtpcs-daemon

16.5.1 To Configure Back End Stores with LMTP and a Minimal MTA

The back end stores require only a minimal MTA if they are receiving messages over LMTP. They require a dispatcher, a job controller and a simple MTA configuration. In particular they need a dispatcher.cnf, job_controller.cnf and a mappings file which comprise the only significant part of the MTA configuration.

The dispatcher.cnf file must contain the following:


! VERSION=1.1
! IMTA default dispatcher configuration file
!
! Global defaults
!
MIN_PROCS=1
MAX_PROCS=10
MIN_CONNS=30
MAX_CONNS=50
MAX_SHUTDOWN=2
MAX_LIFE_TIME=86400
MAX_LIFE_CONNS=10000
MAX_IDLE_TIME=600
HISTORICAL_TIME=0
!
! rfc 2033 LMTP server - store
!
[SERVICE=LMTPSS]
PORT=225
IMAGE=IMTA_BIN:tcp_lmtp_server
LOGFILE=IMTA_LOG:tcp_lmtpss_server.log
PARAMETER=CHANNEL=tcp_lmtpss
STACKSIZE=2048000
! Uncomment the following line and set INTERFACE_ADDRESS to an
! appropriate host IP (dotted quad) if the dispatcher needs to
! listen on a specific interface (e.g. in a HA environment).
! INTERFACE_ADDRESS=!
! rfc 2033 LMTP server - native
!

Note that by default, the LMTP services in the dispatcher.cnf file are commented out. You must uncomment them to get LMTP to work.

The normal dispatcher options of MAX_CONNS, MAX_PROCS, MAX_LIFE_CONNS, and MAX_LIFE_TIME can also be set, but need to be set appropriately for your hardware.

The PORT_ACCESS mapping is important. The LMTP implementation for the back end servers is intended as a private protocol between Sun Java System Messaging Server relays and back end stores. You must use the PORT_ACCESS mapping to make sure that only such relays can connect to these services. Your mapping file should look like this:


PORT_ACCESS

  TCP|*|225|192.18.74.206|* $Y
  TCP|*|226|192.18.74.206|* $Y
  TCP|*|225|192.18.74.129|* $Y
  TCP|*|226|192.18.74.129|* $Y
  TCP|*|*|*|*   $N500$ Do$ not$ connect$ to$ this$ machine

The IP address above are LMTP server and client IP address. You should replace the sample IP addresses specified in the PORT_ACCESS mapping table here with the IP addresses of your relays on the network that connect to the back end stores.

There has to be an imta.cnf file, but it is there merely to make the configuration complete. A minimal imta.cnf file consists of the following channel definitions:

!
! IMTA configuration file
!
! tcp_lmtpss (LMTP server - store)
tcp_lmtpss lmtp flagtransfer
tcp_lmtpss-daemon

Note that by default, the LMTP channel definitions are commented out. You must uncomment them if you want LMTP to work.

You can use the default job_controller.cnf file created on installation. No modification of this file is required.

16.5.2 Configuring Relays for Sending Messages Via LMTP to Back End Systems with Message Stores and Full MTAs

There are situations where you might want the back end stores to have the full capabilities of the MTA but still to have the load savings of using LMTP. For example, you might want program delivery on the back end store. In this case the relays should be configured as described above in To Configure the Inbound MTA Relays with LMTP

16.5.3 Configuring LMTP on Back End Message Store Systems Having Full MTAs

The only changes from the configuration of a back end store messaging system to one with LMTP direct delivery to the store are that the following lines need to be added to the end of the dispatcher.cnf file:


! rfc 2033 LMTP server - store
[SERVICE=LMTPSS]
PORT=225
IMAGE=IMTA_BIN:tcp_lmtp_server
LOGFILE=IMTA_LOG:tcp_lmtpss_server.log
PARAMETER=CHANNEL=tcp_lmtpss
STACKSIZE=2048000
! Uncomment the following line and set INTERFACE_ADDRESS to an 
! appropriate host IP (dotted quad) if the dispatcher needs to 
! listen on a specific interface (e.g. in a HA environment).
!INTERFACE_ADDRESS=

         

Note that by default, the LMTP services in the dispatcher.cnf file are commented out. You must uncomment them to get LMTP to work. Also, the LMTP port numbers are just examples, and can be anything you choose.

This is the same as the whole dispatcher.cnf file described above for when the back end store is configured only for LMTP. The mappings file also requires the PORT_ACCESS mappings as described for LMTP only back end stores.

16.5.4 Handling 4.2.1 Mailbox Busy Error in Response to LMTP Message Data

If the LMTP channel option MAILBOX_BUSY_FAST_RETRY is set to 1 (the default) a 4.2.1 Mailbox busy error in response to LMTP message data is handled by retrying the message after a random but short interval; normal message backoff values do not apply. Setting the option to 0 disables this behavior.