[comp.mail.uucp] MMDF mail not delivered

david@twg.com (David S. Herron) (08/13/90)

In article <254@iscden.UUCP> jbev@iscden.UUCP (J.Bevier at Home on Hipeak) writes:
>In article <1990Aug05.144539.5500@vlr@litwin.com> vlr@vlr@litwin.com (Vic Rice) writes:
>>I recently discovered a problem with my mail system. I am using
>>SCO Opendesktop (SYSV R3.2) which uses MMDF as its MTA. 
>>My problem is with mail arriving but not being delivered. I 

[Describes discovering mail he thought had disappeared sitting
 in a spooling directory]

>The general problem here is that locks are used while mail is being
>delivered.  If a second piece of mail arrives to be delivered to a
>mail box being updated, it will be put in /usr/spool/mmdf/lock/home/msg.*
>to be delivered later.  However, this can not take place unless deliver
>is called to deliver the mail!  Either run deliver manually or put the
>following entry in the /etc/rc.d/7/udaemons file to have deliver run
>in the background.


That is exactly the cause for the problem.  It is an extremely good
ides to run a background deliver to catch those pieces of mail which
don't get delivered immediately.

Something slightly different you might want to do is turn off mod=imm
on all of your channels and run a background deliver on 'em all.  The
command line would be: "deliver -cchan,chan,chan -b" ..

What this will do is force all deliveries into the background daemon,
with a useful side-effect.  Because a deliver can only deliver one message
at a time then you are limiting the load that MMDF will put on the
system to 2-3 processes at a time.  With other mail systems, and with
MMDF if you configure with mod=imm, the system will generate as many
delivery daemons as it can all at the same time.  (Assuming that you
have bursts of mail coming in).

For instance ... one of the old problems with sendmail is that it
will start up lots and lots and lots of sendmail's when there's
lots of stuff in the queue.  Systems have been known to crash because
of that.  But with mod=imm turned off on MMDF you're limited to as
many mail-delivery "streams" as you have deliver's.





-- 
<- David Herron, an MMDF weenie, <david@twg.com>
<- Formerly: David Herron -- NonResident E-Mail Hack <david@ms.uky.edu>
<-
<- Sign me up for one "I survived Jaka's Story" T-shirt!

dionj@sco.COM (Dion L. Johnson) (08/25/90)

This is a new "it" script we are just loading out on SCO BBS "sosco".
Thanks, David Herron, for your comments which inspired this posting.
Thanks, SCO Support folks, for this itscript.


PROBLEM: MMDF either delivers mail twice or doesn't deliver it at all.

RELEASE: All Releases of SCO UNIX and SCO Open Desktop Release 1.0.0

CAUSE: Mail may occasionally be delivered twice due to the fact that
       by default, mail is delivered immediately. Thus if two people
       attempt to send mail at the same time, two deliver demons are
       started up, and they both look at the same queue. When this
       happens, mail may delivered two or more times.

       Mail coming in from a remote site may not be delivered at all
       due to a problem with the deliver program. 

SOLUTION: The solution for both of these problems is the same.
          It consists of running one or more background deliver demons.
          To do this, take the following steps:

                1. Log in as mmdf.

                2. Edit the file /usr/mmdf/mmdftailor and change
                   the strings "mod=imm" to "mod=reg". This
                   change will occur in the MCHN entries.
                   It is only necessary to change those MCHN entries
                   that are in use. In other words, if you are only
                   sending local mail and mail over uucp, you only need
                   to change the MCHN entries for local and uucp.

                3. Edit /etc/rc2.d/S88USRDEFINE, and add the following 
                   line:

        /bin/su mmdf -c "/usr/mmdf/bin/deliver -clocal,uucp,smtp,... -T60 -b"

                   Replace the ... with each of the names of the MCHN 
                   entries that you changed in step 2. For example,
                   if you changed the MCHN entries for local and for 
                   uucp in step 2, then the line would read:

        /bin/su mmdf -c "/usr/mmdf/bin/deliver -clocal,uucp -T60 -b"

                4. Reboot the system.

        This will now cause, upon bootup, a deliver demon to run in the
        background (-b), and look for mail in the channels specified with
        the second -c option every 60 seconds (-T60). This will prevent
        mail from being delivered twice and will prevent the problem where 
        mail was not delivered at all. You can have more than one deliver
        demon running if you want different delivery times for different
        channels. For example, if you want smtp mail to be checked for
        every 10 minutes, and you want local mail to be delivered every
        minute, you could run the following two deliver demons:
        

        /bin/su mmdf -c "/usr/mmdf/bin/deliver -clocal -T60 -b"
        /bin/su mmdf -c "/usr/mmdf/bin/deliver -csmtp -T600 -b"

        Additionally, you must have the following line in /usr/mmdf/mmdftailor
        if you wish to use the uucp channel:

        UUXSTR  "uux -"

        Note that the concept of delivery in all of these instances does not
        necessarily mean that the mail is put in a mailbox file. It usually
        means that the mail is transferred from the mmdf spool directories
        (/usr/spool/mmdf), to the appropriate spool directories for the
        channel that is being used. For example, if the uucp channel is
        being used, the mail ends up under /usr/spool/uucp. Depending on
        how the channel is setup, transfer of mail to the channel's spool
        directories may or may not trigger immediate transfer of mail to
        its destination.