[Mimedefang] Slightly OT Sendmail virtusertable/mailertable Q.

Jon R. Kibler Jon.Kibler at aset.com
Sun Feb 22 20:46:05 EST 2004


Rolf wrote:
> 
> hello
> 
> Not Mimedefang specifically but I thought it worth asking.
> 
> I have configured my sendmail.mc to use the mailertable feature, the
> virtusertable feature and since 8.10 (or is it 8.11) also the
> virtuser_domain_file: VIRTUSER_DOMAIN_FILE(`/etc/mail/virtuser-domains')dnl
> entry.
> 
> This allows the situation whereby both mailertable functions and
> virtusertable functions can co-exist. Previously if the domain was in
> local-host-names then mailertable would ignore it and that if it wasn't
> then virtusertable would ignore it.
> 
> So I can forward mail on a domain basis using mailertable and also have an
> entry respected in virtusertable if I place the domain that is in
> virtusertable in the specified VIRTUSER_DOMAIN_FILE. As I understand it.
> 
> My question is in what order are these various settings processed?
> And where in that sequence are entries in /etc/mail/aliases expanded?
> 
> The idea is that there are few users on this mail server, the mailertable
> sending everything onwards. But I would like msgs to postmaster at ... and a
> couple of others to be delivered to a local user. Virtusertable entry of
> postmaster at ...  localusername
> doesn't seem to be working. And I would like that localusername in one
> instance to actually be an alias to several users elsewhere, and setting
> that up is not clear.
> 
> Will be most appreciative of any help.
> 
> Thanks.
> 
> rolf.


First, I assume that you are using sendmail 8.12.10 or higher.

Regarding order: virtusertable is processed prior to the canonify,parse
operations of CHECK_RCPT when the SMTP RCPT To command is received.
mailertable is processed when determining delivery agent. aliases are
processed during the parse operation of CHECK_RCPT.

The VIRTUSER_DOMAIN_FILE adds hosts to $=R (domains to be relayed). 
For an entry like
	postmaster@	postmaster
to work in virtusertable, the domain has to belong to $=W (local
domains). 

If I was you, I would abandon mailertable, and only use
virtusertable. Either way, your fix for the postmaster@ problem
is to create multiple entries for local delivery, one per $=R
domain, such as:
	postmaster@	postmaster
	postmaster at dom.one	postmaster
	postmaster at dom.two	postmaster
	...etc...
You can also create an alias entry for postmaster that will
deliver to several people (virtusertable processed first),
such as:
	postmaster: joe,susie,bob,mary,root

You can use virtusertable to replace mailertable by creating
entries such as:
	@dom.one	%1 at mail.dom.one
	@dom.two	%1 at mail.dom.two
	...etc...
All you have to do is create dns zones that have only an MX
record for the mail.whatever entries.

The other advantage of using virtusertable only (and this
may not be appropriate for all environments) is that you can
filter for valid users before mail reaches the final destination.
	user1 at dom.one	user1 at mail.dom.one
	user2 at dom.one	user2 at mail.dom.one
	user3 at dom.one	user3 at mail.dom.one
	user4 at dom.one	user4 at mail.dom.one
	@dom.one	ERROR:5.1.1:"550 No such user in domain dom.one"
        ...etc...

Hope this helps.

Jon K.

P.S. The 3rdEd of the Bat Book covers all this in gruesome detail.
-- 
Jon R. Kibler
Chief Technical Officer
A.S.E.T., Inc.
Charleston, SC  USA
(843) 849-8214




==================================================
Filtered by: TRUSTEM.COM's Email Filtering Service
http://www.trustem.com/
No Spam. No Viruses. Just Good Clean Email.



More information about the MIMEDefang mailing list