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

Re: SMTP address verification



...
> To be specific, I turned on the "-sft" option to "smtpserver" so that it
> will converse with router to check the addresses. Unfortunately, the router
> apparently doesn't check whether the address is in /etc/aliases or
> /etc/passwd when it passes as a local address, which is the one check I
> most want!

  You can have that too, although it isn't default..
See your  $MAILSHARE/cf/aliases.cf  around line 600 (see the extract below).

Comment away the "Ending case 1", then you get the desired behaviour.
Oh, you may want to change the error 'host' a bit down there, though.
Hmm... more like you have to write a file for it into $MAILSHARE/forms/
directory with name given in the 'host' field ('err.nosuchuser').

mail from:<>
250 Ok (sourcechannel 'error' accepted) Ok
rcpt to:<nobody@localhost>
250 Ok (verified) Ok
rcpt to:<no-su-kdsf-sdf@localhost>
554 unresolvable address: <no-su-kdsf-sdf@localhost> Failed
rcpt to:<mea@localhost>
250 Ok (verified) Ok


Oh yes,  your   $MAILSHARE/smtpserver.conf  does define in its
final lines how it behaves with the addresses it receives:
	#
	# HELO/EHLO-pattern     style-flags
	localhost           999 ftveR
	*                   999 veR
That means, 'helo localhost' will do 'f&t' processing, anything
else WON'T -- the startup parameter stays put only if none of
these match patterns exist.   Change that '*' case to be 'ftveR',
and you get what you want.



# Ending case 1: If not POBOX, let local channel handle it
	case "x$POBOX" in
	x)	db add expansions "$key" local
		if [ -z "$localdoesdomain" ]; then
			domain=""
		fi
		quad=($chan "$host" "$user$plustail$domain" $attr)
		return (($quad))
		;;
	esac

# Ending case 2: If not POBOX, nor homedirectory defined, then
#                fall to "error" case below.

	case "${hashomedir}x$POBOX" in
	1x)	db add expansions "$key" local
		if [ -z "$localdoesdomain" ]; then
			domain=""
		fi
		quad=($chan "$host" "$user$plustail$domain" $attr)
		return (($quad))
		;;
	esac

	return (((error err.nosuchuser "$user$plustail$domain" $attr)))
}

> And no, I don't give a damn about the security implications of allowing a
> remote to verify addresses in this fashion. There are none of any
> consequence.
> 
> Have any of you succeeded in making zmailer do this? Or do I have to
> convert back to sendmail again to get this simple functionality?
> 
> 	Erik <fair@clock.org>

/Matti Aarnio <mea@nic.funet.fi>