[H-GEN] sendmail aliases
Nikolai Lusan
nikolai at humbug.org.au
Mon Apr 15 00:29:01 EDT 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
On Mon, 15 Apr 2002, Tony Nugent wrote:
> > # sendmail -bv mtjoke
> > pgs... deliverable: mailer local, user pgs
> > ewane at tenmail.mincom.oz.au.DIRECT... deliverable: mailer smtp, host
> > tenmail.mincom.oz.au, user
> > ewane at tenmail.mincom.oz.au
>
> Hang on... user "pgs" is a local mailbox, but email for "ewane" is
> being sent elsewhere.
This is perfectly acceptable behaviour.
> > The problem;
> > Any attempt to send a message to that new alias results in an SMTP error
> > response 550 (User unknown) being returned from the mail server and the email
>
> I suspect that the problem would be for the copy to "ewane" (who
> apparently does not have a local user account or mailbox).
I would think that the problem was more than likely an misconfigured
alias for ewane - the alias needs to point to a delivered address, if
the right hand side (RHS) of the alias is not deliverable you will get a
550, but not from your own server. In this case I would suggest that
ewane at tenmail.mincom.oz.au is not a valid email address.
> Sendmail aliases files only apply to email being delivered locally.
> That is, you can't use aliases like this to divert local email to
> another mail server:
> ewane: ewane at tenmail.mincom.oz.au
Actually the aliases relate to mail being delivered for the local
machine. In the example you provide the email address
ewane@<insert_machine_name> is being sent on to
ewane at tenmail.mincom.oz.au, this is ferfectly fine and quite normal. To
say that the alias is not legal is simply wrong and misleading.
> No, that won't work at all. To achive that, you need to use
> /etc/mail/virtusertable (not aliases).
Wrong, infact a virtusertable is more useful for machines hosting more
than one domain or more than one hosts mail. It allows multiple aliases
for different hosts i.e.
user at host1.com foo at bar.com
user at host2.com foo
In this case user at host1.com is forwarded to an external email address
and user at host2.com is passwd through for local delivery. If there is
then an alias entry that says:
foo: bar at foo.com
the the email for user at host2.com will be sent to the external address
bar at foo.com.
> However, you'll still get hiccups with it, since creating a virtual
> user entry for that email address does not create a local "ewane"
> account... sendmail aliases need to expand to locally deliverable
> mailboxes.
Wrong again, please clear up your misconceptions about how the aliases
file works - the mail does not need to be destined for a local mailbox,
it simply needs to be accepted for delivery to a domain hosted on that
machine.
> You could try it like this... remove the aliases.local alias, then
> in /etc/mail/virtusertable:
> mtjoke at mincom.oz.au pgs, ewane at tenmail.mincom.oz.au
> (I'm not sure if you can have multiple recients on the RHS like
> that, it should work).
It should and does work, but only if the local machine is delivering
mail for mincom.oz.au, I wouldn't suggest that it was the cleanest way
to do things though.
Nikolai
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list