[H-GEN] sendmail aliases

Tony Nugent tony at linuxworks.com.au
Sun Apr 14 23:48:54 EDT 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On Mon Apr 15 2002 at 11:24, Ewan Edwards wrote:

> I have created an aliases.local file and added a new AliasFile line to

> mtjoke: ewane,pgs

> # newaliases
> Warning: .cf file is out of date: sendmail 8.9.3 supports version 8, .cf file
> is version 6

  Hmm, that's an interesting warning - sendmail has been upgraded
  but the config file has not.  This is telling you that your .cf
  file is probably not 100%, so you need to recreate a new .cf from
  your original .mc config file.  8.9.x is also an old version of
  sendmail.

> /etc/mail/aliases.local: 1 aliases, longest 9 bytes, 15 bytes total

(good)

> I have run sendmail in verify mode to check that the alias was okay and
> deliverable.

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

> My mail client is configured to use the Solaris box as the SMTP server for
> sending mail.  For incoming mail, I have an ordinary user account on one of
> the other mail servers.

So you are pop'ing your "ewane" email from tenmail.mincom.oz.au
after getting it diverted there.

> 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
> client telling me that the address is undeliverable.  I don't know what else
> to look for to try to get this working.  Any clues will be appreciated.

At this point?  I'd read the actual error message, it would contain
important information.  Which of the expanded alias names it is
actually barfing on?

I suspect that the problem would be for the copy to "ewane" (who
apparently does not have a local user account or mailbox).

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

No, that won't work at all.  To achive that, you need to use
/etc/mail/virtusertable (not aliases).

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.

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

To get the mail server to forward email to tenmail, then there
needs to be either an MX record for it pointing to that server, or
you'll need an entry in /etc/mail/mailertable...

tenmail.mincom.oz.au	smtp:[tenmail.mincom.oz.au]

The LHS is the destination address, the RHS is the protocol and
destination.  The square backets mean to ignore the MX records and
instead deliver this email to that specific host.

(I suspect that this is happening already).

Again, you cannot externally redirect email from expansions of local
email aliases, even if that alias exists in virtusertable.

  (However this has changed radically in sendmail 8.12.x, but that
  is another story... 8.12 treats all sources of email as non-local,
  even to the point of no longer running suid-root).

If all else fails, then keep the virtusertable/mailertable entries,
create a local "ewane" account and have a .forward file redirect
this email onto your tenmail account.

> Regards,
> Ewan

Hope this points you in the right direction.

There are two really useful doc files that come with sendmail that
explains much of this black magic... the op.{ps,txt} files in the
doc/ directory, and the README file in the cf/ directory.

Also, I'd highly recommend to things... (1) an upgrade to sendmail
8.12.3 (or 8.11.6 if the changes are too much of a leap); and (2)
generate a more functional .cf file for the version of sendmail that
you are running.

Cheers
Tony
---*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=---
  Tony Nugent <Tony at linuxworks.com.au>
  LinuxWorks - Gold Coast Qld Australia

--
* 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