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.

I tried to add mydestination to parent_domain_matches_subdomains, it
doesn't change anything.

I found than using an explicit transport map fix the issue:
host.subdomain.domain.com smtp:host.subdomain.domain.com

But it's a bit painful to list every host inside subdomain.domain.com
there. I'm obviously missing something trivial here, but I can't
understand what exactly.
-- 
BOFH excuse #300:

Digital Manipulator exceeding velocity parameters

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to