LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Sendmail

[ILUG] Sendmail

Feargal Reilly feargal at helgrim.com
Tue Jul 6 20:33:28 IST 2004


On Tue, 6 Jul 2004 16:33:08 +0100
Greg McRandal <mcrandal at maths.tcd.ie> wrote:

> Hi,
> 
> I've got sendmail 8.11.6-15 installed on a box here.  Our main
> mail server is relaying mail sent to A at B.com to this machine. 
> I want sendmail reveive this mail on box Z and give it to user
> A on the sendmail box.

Not sure if that was the clearest explanation of your problem,
here's how I interpreted it thus:

Server 1 relays mail addressed to B.com to Server 2.
Server 2 is to deliver mail for A at B.com to user ted.

I'm assuming the first part is working. I'm also assuming 
the email address does not change between Servers 1
and 2- i.e. that Server 1 sends the mail to Server 2 maintaining
the address A at B.com, and not changing it to something like
A at Server2.B.com.

> Editing /etc/aliases to 
> A at B.com: ted
> gives a 
> /etc/aliases: line 63: A at B.com... cannot alias non-local names:
> Error -30990/etc/aliases: 40 aliases, longest 10 bytes, 395
> bytes total

Yeah, that'll never work - the LHS of the aliases table cannot
contain a domain part. The aliases file operates on a username
level, and is only invoked during local delivery.

There are a number of ways to achieve what you want, depending on
whether you're handling one or many domains, and whether Server B
is meant to handle all mail for B.com, or just mail sent to
A at B.com. From my guess, this is what you want:

Tell Server 2 to deliver mail addressed for B.com locally. 
If Server 2's hostname is server2.B.com, then by default sendmail
will only accept mail addressed to A at server2.B.com. Thus we need
to tell it that it should accept mail addressed
to B.com

This is done by adding B.com to the local-host-names file on
Server 2. The exact name of this file can vary depending on
distribution, look for "confCW_FILE" in your.mc file, or"Fw-o" in
your.cf file. Add the following line to the file:

B.com

Now mail addressed to A at B.com will be delivered to local user A.
The aliases table can then be used to map local user A to another
user as follows:

A: ted

There are many ways to achieve the same thing, this may not be
the best solution; it depends how you want your servers to
behave.

For example, if Server 2 also accepted mail for C.com and
D.example, then the configuration I just gave you would
result in mail for A at B.com, A at C.com, and A at D.example all being
delivered to ted, which may not be what you actually want.

-fr.

-- 
Feargal Reilly.
PGP Key: 0x1554900B (expires 09-Jun-2005)
Web: http://www.helgrim.com/ | ICQ: 109837009 | YIM: ectoraige
Visit http://ie.bsd.net - BSDs presence in Ireland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20040706/0500f695/attachment.pgp


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell