On 4/27/2010 3:46 AM, Guillaume Rousse wrote:
Hello.
I'm trying to set up an SMTP gateway for a subdomain
(subdomain.domain.com) of a larger organisation (domain.com). The host
is declared as the MX for foo.domain.com. I'd like it to be able to
collect mails sent to @foo.domain.com, and redispatch them to individual
hosts inside this subdomain, for specific processing.
Here is my main.cf file:
aemon_directory = /usr/lib64/postfix
inet_interfaces = all
mynetworks =
129.175.144.0/24
172.18.213.0/24
195.83.212.0/24
195.83.213.0/24
193.51.235.0/24
193.51.236.0/24
193.55.250.0/23
193.49.212.0/23
193.49.213.64/26
195.83.212.48/28
myorigin = $mydomain
delay_warning_time = 4h
smtpd_banner = $myhostname ESMTP $mail_name
mydestination =
$myhostname
$mydomain
relayhost = smtp.domain.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
Here is my alias file:
foo: [email protected]
With this configuration, a mail sent to [email protected] is
accepted, then forwarded to host.subdomain.domain.com as expected. But
instead of directly sending it to host.subdomain.domain.com, it is
immediatly relayed to the relay host, smtp.domain.com, whereas it is
supposed to be a local mail address.
Rather than relayhost you might be able to use a
transport_maps something like:
.domain.com :
* relay:[smtp.domain.com]
Otherwise, transport_maps entries are required to override
relayhost.
-- Noel Jones