[comp.mail.sendmail] Optional MXing and looping smtp receivers

smart@manta.mel.dit.csiro.au (Robert Smart) (07/25/90)

I hope these matters are unrelated!

1) I strongly favour use of MXes being optional in sendmail. I.e. you
should be able to force some mail to go a particular route. For example
the 5.64+IDA package has an option for a RELAY_HOST. But actually you
could end up sending mail meant for the RELAY_HOST to a secondary MX
of the RELAY_HOST, which might not be the same thing.

My previously offered code for this was to only do MX if the $h was left
off the [IPC] parameters in the M line. This had the mysterious effect
that sendmail in daemon mode would not try to deliver to MX destinations
when running the queue. Running the queue by hand worked fine. So instead
I now have [IPC] and [IMX] mailers and the diff looks like this:


*** deliver.c	Sun Jul 15 20:44:32 1990
--- deliver.c~	Fri Jul 13 14:24:46 1990
***************
*** 436,447 ****
  	{
  		rcode = EX_OK;
  #ifdef NAMED_BIND
- #ifdef OPTMX
- 		if (host[0] && host[0] != '[' && 
- 		    strcmp( m->m_mailer, "[IMX]") == 0)
- #else
  		if (host[0] && host[0] != '[')
- #endif
  		{
  			expand("\001w", buf, &buf[sizeof(buf) - 1], e);
  			Nmx = getmxrr(host, MxHosts, buf, &rcode);
--- 436,442 ----
***************
*** 797,803 ****
  		return (0);
  	}
  
! 	if (strcmp(m->m_mailer, "[IPC]")==0 || strcmp(m->m_mailer, "[IMX]")==0)
  	{
  #ifdef HOSTINFO
  		register STAB *st;
--- 792,798 ----
  		return (0);
  	}
  
! 	if (strcmp(m->m_mailer, "[IPC]") == 0)
  	{
  #ifdef HOSTINFO
  		register STAB *st;
-----------------------------------------------------------------------

And this seems to work fine.

2) I built my sendmail on a SunOS 4.0.3 machine with BIND 4.8.2 (beta?)
libraries. Later I installed it on a SunOS 4.1 machine with default Sun
resolver library running Yellow Pages (NIS?). This had the effect that
incoming SMTP calls from a couple of hosts would make the receiver
process go into an infinite loop chewing up cpu time. The hosts in question
did not have reverse lookups for their IP adresses and indeed the names
they report on the HELO line are not in the DNS. I installed the sendmail
binary linked on my 4.0.3 machine and the problem went away. Any suggestions
would be welcome. 

Bob Smart <smart@mel.dit.csiro.au>