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

Bug found



Hi *

I found a bug in the Zmailer. Assume our local address is aahost.bbb.ccc and
userid of one local user is "murphy". We try router by invoke a "router -i"
command and issue something like:

	z# router murphy@aahost.bbb.ccc
	<root.interactive@aahost.bbb.ccc>: address: murphy@aahost.bbb.ccc
	(((local - murphy default_attributes)))

Ok, no problem there, but let's try following:

	z# router murphy@AAHOST.bbb.ccc
	<root.interactive@aahost.bbb.ccc>: address: murphy@AAHOST.bbb.ccc
	(((smtp aahost.bbb.ccc murphy@aahost.bbb.ccc default_attributes)))

That causes you sometimes found some messages in the queue and "mailq"
produce following output:

	[aahost.bbb.ccc]
	0 entries in router queue: idle
	0 entries in scheduler queue: scheduling transports
	5 messages in transport queue
	smtp/aahost.bbb.ccc:
		28:	(retry in 1m5s, expires in 2d23h)
		29:	(retry in 1m5s, expires in 2d23h)
		27:	(retry in 1m5s, expires in 2d23h)
		26:	(retry in 1m5s, expires in 2d23h)
		19:	(retry in 1m5s, expires in 2d23h)

Where is problem ? The rrouter procedure comparing two addreses to find out
whether "to" address is localhost's one. If it is false, rrouter trying find
a channel able to transmit message. In case of comparison:
[ AAHOST.bbb.ccc = aahost.bbb.ccc ] it realize that is not same and decide
to route message via smtp.
Removing the bug is simple. Just put between the lines in rroute.cf:

	rrouter (address, A) {
		local tmp tee seenuucp

		seenuucp=false
	# Recasing address					<<<
		tmp="$(recase -l "$address")"			<<<
		address="$tmp"					<<<
	# done							<<<
		sift "$address" in
		# first make canonical
		(.*)<(.*)
		.
		.
		.

If course except '<<<' marks. They are only for highlighting.

--------------------------
K a m i l   K U K U R A
Kamil_Kukura@ccsun.tuke.cs
--------------------------