Gentoo Archives: gentoo-user

From: Kan-I Jyo <cecilhsujp@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: [gentoo-user] [Sendmail]Relay only one specific mail address and REJECT any other
Date: Tue, 11 Aug 2009 13:42:26
Message-Id: 1e8a3dd0908110642j71da963y4b590540f56b9aa6@mail.gmail.com
1 Dear list,
2
3 By taking a look into the sendmail README, it has come up to my mind
4 if I can relay only one specific mail address and REJECT all other mails
5 from {any_user}@whatever.domain.
6
7 Here is my test environment:
8
9 +---------+ +-----------+
10 +-----------+
11 + MUA +-------(SMTP)------+ MTA_1 +------(RELAY)------+ MTA_2 +
12 +---------+ +-----------+
13 +-----------+
14
15 MTA_2 above is set as teshost2, which is the destination of relaying.
16
17 Following lines have been put into the /etc/mail/access in MTA_1.
18
19 <code>
20 localhost.localdomain RELAY
21 localhost RELAY
22 127.0.0.1 RELAY
23 To: testuser@×××××××××.testdomain RELAY
24
25 After editing, 'makemap hash access.db < access' has been
26 issued to rebuild the access database.
27
28 The mail relay works fine while all other mails like
29 testuser{2,3,4}@testhost2.testdomain
30 get relayed as well.
31
32 My question is, if it is possible, is there some kind of settings
33 within sendmail
34 (sendmail.mc / access / etc.) could meet my needs?
35
36 Any comment would be greatly appreciated.
37 --
38 Sincerely,
39
40 Jyo