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

Re: local delivery - localdoesdomain?



On Wed, 21 May 2003, Matti Aarnio wrote:

Hi Matti,

I've tried to alter my aliases.cf as you suggest below, with little luck.
Here is what happens.

If I simply insert the line

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

somewhere near the top of the routeuser() function in aliases.cf, this works
as expected - all local delivery is bounced, citing no such user. However,
it seems as though deliveries to "user@host"@localhost do not actually go
through this path to begin with, since they are still directed to the SMTP
channel.

z# router '"someone@else"@localhost'
<aperel.interactive@eris.datamodel.ca>: address: "someone@else"@localhost
(((smtp else someone@else default_attributes)))

Any suggestions?

Would rtrace output help?

Regards,

Alex Perel

> On Tue, May 20, 2003 at 05:34:10PM -0400, Alex Perel wrote:
> > Hi,
> > 
> > This has probably been asked in the past, and if anyone has a link to 
> > relevant documentation, I would be eternally grateful. My own searches
> > didn't yield anything.
> > 
> > I am trying to prevent my zmailer server from relaying mail addressed to
> > something of the form <"someone@else"@localhost>. I've tried fiddling with
> > various options to mailbox, router, the scheduler.conf file, the 
> > localdoesdomain switch in router.cf, all to no end.
> > 
> > Is there a way to toggle this? If not, what do I need to modify to get these
> > types of deliveries to bounce?
> 
> The deliveries should, definitely, bounce (from  mailbox channel delivery,
> that is.)  If you want to have them bounce from smtpserver interactive
> processing, THAT is entirely another pickle...
> 
> (I pulled version 2.99.50-s3, and installed it separately to test things.)
> 
> z# rtrace
> z# router '"someone@else"@localhost'
>     router '"someone@else"@localhost'
> ...
>         return (return (((smtp localhost '"someone@else"@localhost' default_attributes)))) <0>
> (((smtp localhost '"someone@else"@localhost' default_attributes)))
> z# 
> 
> 
> In the   $MAILSHARE/cf/aliases.cf   file around lines 425-440 the end of
> routeuser()  function, there is:
> 
> 
> 
> 	case "$user" in
> 	uid#*)	return $(rrouter postmaster "$host" $attr "" "$domain")
> 		;;
> 	esac
> 
> 
> 	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
> 
> 	return (((error err.nosuchuser "$user$plustail$domain" $attr)))
> }
> 
> 
> 
> Normal execution path returns that composed quad.
> 
> 
> Now if you want the incoming smtp to reject those, you need to
> add following in front of that case:
> 
>     if [ -z "$homedir" ] ; then
> 	return (((error err.nosuchuser "$user$plustail$domain" $attr)))
>     fi
> 
> which would then explicitely return reject for nonexistent users, when
> used with  smtpserver.conf  style-flags:
> 
>     *   999 ftveR
> 
> What I _am_ a bit worried is the way how interactive router gets
> its input data in that version you are running.  There are some 
> dangers in there up to, and including various instances of 2.99.50.
> 
> My   buglog  page says this:
> 
> <H2>ZMailer 2.99.50s17 (10-May-1999)</H2>
> 
> <A HREF="securitybug.html">A security bug at smtpserver</A> was found,
> and cured at this version, anything older is not listed.
> 
> > I am running ZMailer 2.99.50 on FreeBSD 3.4.  Yeah, I know, it's very old. :)
> > Your help is kindly appreciated!
> > 
> > Regards,
> > Alex Perel
> 
> 

-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi