[comp.mail.misc] A synchronous version of sendmail?

rsm@math.arizona.edu (Robert Maier) (04/24/89)

I'm looking for a synchronous sendmail-type program.  It should read a
mail message from its standard input, and in real time transfer it via
SMTP to its destination.

To do this it should read the From: line.  If it's of the form
"user@domain", the program should look up the `A' (or `MX' if
necessary) record for "domain", and forward the message to the
appropriate SMTP server.  If it can't get through, or if it can't
locate the record, it should forward the message to a default SMTP
server.  If it can't even do that, it should return an error code.

Has anyone written such a synchronous mail-sending program?

----------------------------------------------------------------------
Robert S. Maier   | Internet: rsm@math.arizona.edu	[128.196.128.99]
Dept. of Math.    | UUCP: ..{allegra,cmcl2,hao!noao}!arizona!amethyst!rsm
Univ. of Arizona  | Bitnet: maier@arizrvax
Tucson, AZ  85721 | Phone: +1 602 621 6893  /  +1 602 621 2617

steved@longs.LANCE.ColoState.Edu (Steve Dempsey) (04/25/89)

> I'm looking for a synchronous sendmail-type program.  It should read a
> mail message from its standard input, and in real time transfer it via
> SMTP to its destination.
> 
> To do this it should read the From: line.  If it's of the form
> "user@domain", the program should
[1]
>look up the `A' (or `MX' if
> necessary) record for "domain", and forward the message to the
> appropriate SMTP server.  If it can't get through, or if it can't
> locate the record, it should
[2]
> forward the message to a default SMTP
> server.  If it can't even do that, it should
[3]
> return an error code.
> 
> Has anyone written such a synchronous mail-sending program?


These conditions are not too far from the normal operation of sendmail.
Condition [1] is the way things normally happen.  Condition [2] may
be tricky because sendmail will want to queue the message if both the
destination host and secondary exchanger(s) are unresponsive.  Pushing it
off to some (presumably local) forwarding agent seems to conflict with
your goal of synchronous transmission.  Chances are pretty good that 
if you can't get there, your 'default SMTP server' probably can't either.
Condition [3] would require fiddling with timeouts such as reducing the
normal three days to something smaller than your normal queue run,
perhaps 15 minutes.

Finally, just because you figure out some way to pass the hot potato
very quickly from your site does not mean the other guy won't queue it
up for hours or days.  Are you really sure you want or need to do this?


        
        Steve Dempsey,  Center for Computer Assisted Engineering
  Colorado State University, Fort Collins, CO  80523    +1 303 491 0630
INET: steved@longs.LANCE.ColoState.Edu, dempsey@handel.CS.ColoState.Edu
UUCP: boulder!ccncsu!longs.LANCE.ColoState.Edu!steved, ...!ncar!handel!dempsey