From: Noel Jones on 27 Apr 2010 08:20 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: foo(a)host.subdomain.domain.com > > With this configuration, a mail sent to foo(a)subdomain.domain.com 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
From: Noel Jones on 27 Apr 2010 09:55 On 4/27/2010 8:36 AM, Guillaume Rousse wrote: > Le 27/04/2010 14:20, Noel Jones a écrit : >> Otherwise, transport_maps entries are required to override relayhost. > My point is, why should I have to override relayhost for email adresses > inside my local domain, whereas I do have in my configuration: > mydestination = > smtp.$mydomain > $myhostname > $mydomain mydestination is for mail delivered on the local machine; just this one box. > > The 'Postfix on a local network' section, in > http://www.postfix.org/STANDARD_CONFIGURATION_README.html > > just uses an alias files on the mailhost for sending mails to internal > machines: > /etc/aliases: > joe: joe(a)joes.preferred.machine > jane: jane(a)janes.preferred.machine Only if you don't set relayhost. http://www.postfix.org/postconf.5.html#relayhost > Anyway, if I really need a transport map, is there a way to have a > global entry, instead of explicitely declaring each internal machine: > > x.subdomain.domain.com: smtp:[x.subdomain.domain.com] > y.subdomain.domain.com: smtp:[y.subdomain.domain.com] Yes, see my previous email and also read http://www.postfix.org/transport.5.html -- Noel Jones
|
Pages: 1 Prev: monitoring sevreal postfix serevrs. Next: forward based on message size |