Sun Java System Messaging Server 6 2005Q4 Administration Guide

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:

Steps
  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
    !
    ! lmtp native
    .lmtpn  $E$F$U%$H.lmtpn@lmtpcn-daemon
    .lmtpn  $B$F$U%$H@$H@lmtpcn-daemon
    !
  2. Set the mailbox DELIVERY_OPTIONS to:


    #*mailbox=@$X.LMTP:$M%$\$2I$_+$2S@lmtpcs-daemon
  3. Set the native DELIVERY_OPTIONS clause to:


    #*native=@$X.LMTPN:$M+$2S@native-daemon
  4. Add the channel keywords multigate connectcanonical to each of the tcp_lmtp* channel blocks.

  5. 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.

  6. 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=*,\
        #*native=@$X.LMTPN:$M+$2S@native-daemon,\
        #*unix=@$X.LMTPN:$M,\
        #*file=@$X.LMTPN:+$F,\
        #&@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
    !
    ! lmtp native
    .lmtpn  $E$F$U%$H.lmtpn@lmtpcn-daemon
    .lmtpn  $B$F$U%$H@$H@lmtpcn-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
    
    !
    ! tcp_lmtpcn (LMTP client - native)
    tcp_lmtpcn defragment lmtp multigate connectcanonical port 226 \
       nodns single_sys subdirs 20 maxjobs 7 pool SMTP_POOL 
       dequeue_removeroute
    lmtpcn-daemon

To Configure Back End Stores with LMTP and No MTA

The back end stores need no MTA if they are receiving messages over LMTP. This means that they have no job controller, and none of the address rewriting machinery associated with the MTA. They do however still require a dispatcher and a simple MTA configuration. In particular they need a dispatcher.cnf file and a mappings file which comprise the only significant part of the MTA configuration.

The dispatcher.cnf file must contain the following:


! 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
!
[SERVICE=LMTPSN]
PORT=226
IMAGE=IMTA_BIN:tcp_lmtpn_server
LOGFILE=IMTA_LOG:tcp_lmtpsn_server.log
PARAMETER=CHANNEL=tcp_lmtpsn
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.

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|1.2.3.4|* $Y
  TCP|*|226|1.2.3.4|* $Y
  TCP|*|225|1.2.3.5|* $Y
  TCP|*|226|1.2.3.5|* $Y
  TCP|*|*|*|*   $N500$ Do$ not$ connect$ to$ this$ machine
         

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:

! tcp_lmtpss (LMTP server - store)
tcp_lmtpss lmtp 
tcp_lmtpss-daemon

!
! tcp_lmtpsn (LMTP server - native)
tcp_lmtpsn lmtp 
tcp_lmtpsn-daemon

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

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

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=
!
! rfc 2033 LMTP server - native
!
[SERVICE=LMTPSN]
PORT=226
IMAGE=IMTA_BIN:tcp_lmtpn_server
LOGFILE=IMTA_LOG:tcp_lmtpsn_server.log
PARAMETER=CHANNEL=tcp_lmtpsn
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.