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

Re: rejecting unknown users



On Fri, Nov 07, 2003 at 02:43:25PM +0100, Damir Horvat wrote:
> Hi list!
> 
> I'm freshmen with zmailer and em annoyed with the fact, that I just
> can't figure out how to reject mail for unknown users.
> 
> I'm running zmailer-2.99.51_1 on FreeBSD 4.9-REL.

From the transcript below I see that you are running with interactive
router enabled.

Now the "unknown user" behaviour depends on what router does.
I am not exactly sure, but at that version there is probably following
in the end of router's  aliases.cf  script:


  ------ sample out of  aliases.cf ---------

# 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)))

    ------- end of sample --------

It should be enough to disable (comment out) the "ending case #1"
part of the script.

In latter versions a ZENV variable   ROUTEUSER_IN_ABNORMAL_UNIX
was defined to control selection of which ending code to use.
When the variable isn't defined, or is empty, the router will
behave as if user recognition will know the final answer already.


> it accepts mail from <not_here@x-si.org> and then sends failure notice
> to the sender:
> --
> 02064OSUU#      connection from hydra.aufbix.org ipcnt 0 childs 1 ident:
> IDENT-NOT-QUERIED
> 02064OSUUw      220 mail.x-si.org (NO UCE)(NO UBE) our local time is now
> Fri, 7 Nov 2003 14:28:04 +0100
> 02064OSUU#      remote from [212.93.228.66]:60629
> 02064OSUUr      ehlo
> 02064OSUUw      250-Invalid `ehlo' parameter!
> 02064OSUUw      250-Err: RFC821: No input
> 02064OSUUw      250-mail.x-si.org expected "EHLO hydra.aufbix.org"
> 02064OSUUw      250-SIZE 10000000
> 02064OSUUw      250-8BITMIME
> 02064OSUUw      250-CHUNKING
> 02064OSUUw      250-ENHANCEDSTATUSCODES
> 02064OSUUw      250-DSN
> 02064OSUUw      250-X-RCPTLIMIT 10000
> 02064OSUUw      250 HELP
> 02064OSUUr      mail from: <d@aufbix.org>
> 02064OSUUw      250 Ok (verified) Ok
> 02064OSUUr      rcpt to:<not_here@x-si.org>
> 02064OSUUw      250 Ok (verified) Ok
> 02064OSUUr      data
> 02064OSUUw      354 Start mail input; end with <CRLF>.<CRLF>
> 02064OSUUw      250 2.6.0 S669AbTKGN21 message accepted
> 02064OSUU#      S669AbTKGN21: 153 bytes
> 02064OSUUr      quit
> 02064OSUUw      221 2.0.0 mail.x-si.org Out
> 1068211707 669-1784 13 5 error local/not_here@x-si.org
> 1068211726 681-1786 9 1 ok3 smtp/aufbix.org
> --
> 
> smtpserver.conf has enable-router and 
> 	\[*\]  999 ftveR
> 	*      999 ftveR
> set up.
> 
> What em I missing?

Something rather non-obvious...
I hope what I wrote above will be enough to help you.

> Regards,
> Damir Horvat
-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi