[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for SMTP



> Here's a patch for smtp that fixes the problem previously discussed on
> this list. Replace the following lines in deliver ():

	I was afraid you would mean this kind of 'fix'...
...
> With the following code:
> 
> -------------------------------------------------------------------
...
>       if (strchr (strchr (startrp->addr->link->user, '@'), '.')) /* FQDN ?*/
>           sprintf (SMTPbuf, "MAIL From:<%s>", startrp->addr->link->user);
>       else                /* no, convert to route */
>           sprintf (SMTPbuf, "Mail From:<@%s:%s>", myhostname, startrp->addr->link->user);
...
> --------------------------------------------------------------------

	BETTER way is to use address in style:

		"foo@bar"@myhostname

	as the source route 1) demands FQDN addresses in the first place,
	which is why 2) it is depreciated mode.
	(And using quotes is a bit tricky too -- quotes in the quoted
	 material must be quoted properly...)

> Perhaps it would be best to do it in the cf files. I don't have the
> time to figure it out. If someone else does, and it is better, I would
> certainly appreciate it.

	Yes, using cross-bar should do it.
	When it notices origination address that is not in FQDN
	format, it should rewrite that into:
		foo%bar@my.host.name
	Alternatively, when it noticed email delivery FROM an UUCP
	node (of known nodes), then it could do that rewrite, and
	othervice just leave things as they are..

(I don't have time to make that addition into the scripts now, SunOS 4
 turns out to be full of surprises, when it comes to GNU autoconfig ..
 Basically the autoconfig says that  _res  -structure can be found from
 the standard libc, and so it can, but when the linker tries to refer
 to it, it complains...

 Also DEC OSF/1 v3.2D gives me surprises with its resolver -- or is that
 bind-4.9.3/4.9.4 -lresolv ? -- anyway, when it gets to look up a hostname
 without F.Q.Domain, it gets a SIGSEGV when it reads address of some character
 pointer from a string, and gets something in style of 0x6547772030, which
 used as an address does cause indigestion problems :-(

 I think I have had this resolver problem longer, and it does not relate to
 the autoconfig per se, I just happened to test it now more deeply.. )

> sdb

	/Matti Aarnio