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

Re: Dotted usernames

I am going thru my backlog of unanswered ZMailer questions.

> Zmailer still refuses to deliver messages to local dotted usernames.
> I have a lot of users with a dot in his login account. 

	At their login ids ?  Huh!

	The way these scripts are made is such where dotfull login
	ids form quite a problem indeed.

	You could edit your   rrouter.cf  file around line 250 onwards
	to be altered from current:

		# Okay... Not in our special fullname/newsgroup-files,
		#         lets see if it is in the traditional one ?
		if [ $(aliases "$address") ]; then
			# It can be found from the normal aliases,
			# run the alias processing!
			tmp=(local "$origaddr" "$address" $A)
			return $(routeuser $tmp "$domain")
		return (((error norealname "$address" $A)))
		return (((error nonewsgroup "$address" $A)))


		tmp=(local "$origaddr" "$address$plustail" $A)
		return $(routeuser $tmp "$domain")

	That is, unless the fullname database can find anything,
	everything is shunted into  routeuser processing.


	Now that I think about it, I wonder if the entire tail part
	(since line 211 or thereof) of the  rrouter()  function
	could be replaced with those two lines.

	There needs to be some additional code within  aliases.cf
	to manage fullnamemap(), and newsgroup()  relation usages,
	if they are used at all...

	The ZMailer way to handle these aliases could be unified
	so that some external script will be used to combine
	and what others you may dream of into:
	which is then translated into binary alias database by
	means of running 'newaliases' -- but that requires changes
	into the newaliases script, and that each line of input
	follows rules of alias files, namely:

		<label> <lwsp> <dataline> <opt cont comma>
			<opt cont line> <opt cont comma...>

	where <label> is a string without linear white-space in
	it, and it ends with colon.  Example:

		postmaster: root,

	I think per default the 'fullnames' input does not have
	colon, nor it has continuation lines.  Same with usenet's
	'active' database.  (The "newaliases" command would be
	most interesting script then...)

	In theory the  aliases.cf  could determine that the user
	does not exist at all, and then yield an error about non-
	existent user, but current behaviour is such where the
	local users go to 'local' channel, and it will tell what
	ever happened to the user.

	The report on error cases might not be as explicite as one
	could wish for, but at least it lets dotfull login-names go in.

> I don't like to maintain two databases (fullnames and passwd) to map dotted
> usernames. With other mailers there is no problems with this kind of
> usernames.

	You could try also following:

. /etc/zmailer.conf # or whereever it is located at your system
cut -d: -f1 /etc/passwd | egrep -e '\.' | awk '{printf "%s %s\n",$1,$1}' \
	> $MAILVAR/db/aliases2

	but that needs extra work at adding the new alias databases,
	or writing the input file merger.

> Alfredo

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