1 |
Dan Farrell said the following: |
2 |
> Hi all! I have a central mailhub for my network and I want it to |
3 |
> recieve mail for all hosts on the network. It is the only host capable |
4 |
> of actually recieving mail and so I would like anything addressed to |
5 |
> *.spore.ath.cx to go to spore.ath.cx instead. |
6 |
> |
7 |
Hi Dan, |
8 |
I might be wrong on this, but I think this will work: |
9 |
|
10 |
The idea is to have your mail.spore.ath.cx box process all your mail. |
11 |
If I understand you correctly, you want any mail, whether sent |
12 |
internally, or received externally, to end up on this box. So first of |
13 |
all, it has to recognize that it should be the final destination for |
14 |
mail addressed like that. |
15 |
|
16 |
(a preliminary step, which it looks like you've already done, is to have |
17 |
your router pass any incoming SMTP traffic to mail.spore.ath.cx) |
18 |
|
19 |
1) mydestination = |
20 |
- change it to include all the other hosts on your local network |
21 |
that you want to accept mail for. |
22 |
ex: mydestination = $mydomain, localhost.$mydomain, mail.$mydomain, |
23 |
davey.$mydomain, foo.$mydomain |
24 |
|
25 |
Now, that's all well and good, but it also has to know what an |
26 |
acceptable <user>@*.spore.cth.cx is. |
27 |
|
28 |
2) local_recipient_maps = |
29 |
- this one may or may not need to be changed, I don't know enough |
30 |
about it to give you any solid advice - check the documentation on this |
31 |
one. It will depend on how you're authenticating users, too... |
32 |
|
33 |
Once those things are done, any external email that's addressed to any |
34 |
of your machines should be nicely deposited on your mailserver. |
35 |
|
36 |
The next thing to consider is mail that gets sent internally. For that, |
37 |
each of the machines on your network should use mail.$mydomain as their |
38 |
relay host. For this to work, a) the mailserver has to be willing to |
39 |
relay their mail, and b) they need to know that they should relay mail |
40 |
to the mailserver. |
41 |
|
42 |
3a)(on the mailserver) mynetworks= |
43 |
- this should be set to allow your local network to relay mail |
44 |
through the mailserver. It looks like you've set it up already. |
45 |
|
46 |
3b)(on each machine) relayhost= |
47 |
- here, I'm assuming that you're using postfix to send mail on each |
48 |
of your hosts. You'll want to put in mail.$mydomain as your relay host. |
49 |
|
50 |
Oh, and actually, you also need: |
51 |
mydestination=<blank> on each local machine - this is assuming you want |
52 |
all logs and such going to the mailserver too - I'm not sure if that's |
53 |
what you want or not... You could play around with this by allowing |
54 |
localhost as a destination on each machine, and specifying |
55 |
root@localhost as the log email destination, for example. |
56 |
|
57 |
Hope that helps, |
58 |
- nkm |
59 |
-- |
60 |
gentoo-user@g.o mailing list |