* [gentoo-user] Postfix to relay mail even if acting as primary MX host?
@ 2011-10-13 10:11 Pandu Poluan
2011-10-13 10:17 ` [gentoo-user] " Pandu Poluan
2011-10-15 1:13 ` [gentoo-user] " kashani
0 siblings, 2 replies; 7+ messages in thread
From: Pandu Poluan @ 2011-10-13 10:11 UTC (permalink / raw
To: gentoo-user
Okay, I'm still scratching my head here.
Scenario: Having a Postfix server in the cloud to act as the primary
MX, but actually forwarding the emails to my company's email server
behind the firewall.
For the purposes of my scenario, here are the relevant (but mangled) settings:
*) Domain is "example.com"
*) Postfix server is "mailer.example.com" with the IP 55.66.77.88
*) Company email server is accessible via 11.22.33.44:5225
*) Firewall only allows incoming traffic to 11.22.33.44:5225 from 55.66.77.88
*) I want to set MX for "example.com" to "mailer.example.com"
I saw the "relay_domains" and "relayhost" settings, oh good. But then
I ran smack-drab to the following "NOTE":
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).
So, if I set "relay_domains = example.com" and "relayhost =
[11.22.33.44]:5225", yet have "mailer.example.com" as the primary MX
for the domain "example.com", the emails won't be relayed to
11.22.33.44:5225, right?
Can anyone help me configure Postfix to actually do what I want, e.g.,
to *still* relay emails destined to @example.com to the address
11.22.33.44:5225?
TIA.
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: Postfix to relay mail even if acting as primary MX host?
2011-10-13 10:11 [gentoo-user] Postfix to relay mail even if acting as primary MX host? Pandu Poluan
@ 2011-10-13 10:17 ` Pandu Poluan
2011-10-13 17:56 ` Michael Orlitzky
2011-10-15 1:13 ` [gentoo-user] " kashani
1 sibling, 1 reply; 7+ messages in thread
From: Pandu Poluan @ 2011-10-13 10:17 UTC (permalink / raw
To: gentoo-user
On Thu, Oct 13, 2011 at 17:11, Pandu Poluan <pandu@poluan.info> wrote:
> Okay, I'm still scratching my head here.
>
> Scenario: Having a Postfix server in the cloud to act as the primary
> MX, but actually forwarding the emails to my company's email server
> behind the firewall.
>
> For the purposes of my scenario, here are the relevant (but mangled) settings:
>
> *) Domain is "example.com"
> *) Postfix server is "mailer.example.com" with the IP 55.66.77.88
> *) Company email server is accessible via 11.22.33.44:5225
> *) Firewall only allows incoming traffic to 11.22.33.44:5225 from 55.66.77.88
> *) I want to set MX for "example.com" to "mailer.example.com"
>
> I saw the "relay_domains" and "relayhost" settings, oh good. But then
> I ran smack-drab to the following "NOTE":
>
> # NOTE: Postfix will not automatically forward mail for domains that
> # list this system as their primary or backup MX host. See the
> # permit_mx_backup restriction description in postconf(5).
>
> So, if I set "relay_domains = example.com" and "relayhost =
> [11.22.33.44]:5225", yet have "mailer.example.com" as the primary MX
> for the domain "example.com", the emails won't be relayed to
> 11.22.33.44:5225, right?
>
> Can anyone help me configure Postfix to actually do what I want, e.g.,
> to *still* relay emails destined to @example.com to the address
> 11.22.33.44:5225?
>
I found this:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
is that the configuration I should use?
Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~
• LOPSA Member #15248
• Blog : http://pepoluan.tumblr.com
• Linked-In : http://id.linkedin.com/in/pepoluan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Postfix to relay mail even if acting as primary MX host?
2011-10-13 10:17 ` [gentoo-user] " Pandu Poluan
@ 2011-10-13 17:56 ` Michael Orlitzky
2011-10-14 1:02 ` Pandu Poluan
0 siblings, 1 reply; 7+ messages in thread
From: Michael Orlitzky @ 2011-10-13 17:56 UTC (permalink / raw
To: gentoo-user
On 10/13/2011 06:17 AM, Pandu Poluan wrote:
>
> I found this:
>
> http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
>
> is that the configuration I should use?
>
More or less. I think you may even be able to simplify it a little. I'm
honestly not sure what that warning is referring to, you might ask on
the postfix list, I'm kinda curious. Anyway, the relay* settings work
the way you think they do. We have the same setup here. This is part of
the config on mx1.example.com.
local_transport = error:local mail delivery is disabled.
mydestination =
relay_domains = cdb:/etc/postfix/maps/relay_domains
relay_recipient_maps = cdb:/etc/postfix/maps/relay_recipient_maps
relayhost = mail1.example.com
virtual_transport = error:virtual mail delivery is disabled.
You can set relayhost to do what you want:
http://www.postfix.org/postconf.5.html#relayhost
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Postfix to relay mail even if acting as primary MX host?
2011-10-13 17:56 ` Michael Orlitzky
@ 2011-10-14 1:02 ` Pandu Poluan
0 siblings, 0 replies; 7+ messages in thread
From: Pandu Poluan @ 2011-10-14 1:02 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
On Oct 14, 2011 1:01 AM, "Michael Orlitzky" <michael@orlitzky.com> wrote:
>
> On 10/13/2011 06:17 AM, Pandu Poluan wrote:
> >
> > I found this:
> >
> > http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
> >
> > is that the configuration I should use?
> >
>
> More or less. I think you may even be able to simplify it a little. I'm
> honestly not sure what that warning is referring to, you might ask on
> the postfix list, I'm kinda curious. Anyway, the relay* settings work
> the way you think they do. We have the same setup here. This is part of
> the config on mx1.example.com.
>
> local_transport = error:local mail delivery is disabled.
> mydestination =
> relay_domains = cdb:/etc/postfix/maps/relay_domains
> relay_recipient_maps = cdb:/etc/postfix/maps/relay_recipient_maps
> relayhost = mail1.example.com
> virtual_transport = error:virtual mail delivery is disabled.
>
> You can set relayhost to do what you want:
>
> http://www.postfix.org/postconf.5.html#relayhost
>
Ah, thanks!
Yeah, that "note" is quite puzzling. Neither man page nor Google-fu
explained what that note's supposed to mean, and no other
information/warning or even HOWTO to alleviate the supposedly 'problematic'
situation.
I'm going to ask my question in the Postfix list and relay my findings here.
Rgds,
[-- Attachment #2: Type: text/html, Size: 1917 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix to relay mail even if acting as primary MX host?
2011-10-13 10:11 [gentoo-user] Postfix to relay mail even if acting as primary MX host? Pandu Poluan
2011-10-13 10:17 ` [gentoo-user] " Pandu Poluan
@ 2011-10-15 1:13 ` kashani
2011-10-15 5:00 ` Pandu Poluan
1 sibling, 1 reply; 7+ messages in thread
From: kashani @ 2011-10-15 1:13 UTC (permalink / raw
To: gentoo-user
On 10/13/2011 3:11 AM, Pandu Poluan wrote:
>
> # NOTE: Postfix will not automatically forward mail for domains that
> # list this system as their primary or backup MX host. See the
> # permit_mx_backup restriction description in postconf(5).
The point of this is to say, "If some dude points DNS at your server
and/or configures their mail server to send mail to yours, it's not
going to relay mail for them. You have to actually configure the domains
to be relayed."
Since you're planning to configure the domain you should be fine. Also
less overthinking and more testing solves most of this stuff quicker.
kashani
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix to relay mail even if acting as primary MX host?
2011-10-15 1:13 ` [gentoo-user] " kashani
@ 2011-10-15 5:00 ` Pandu Poluan
2011-10-15 20:41 ` kashani
0 siblings, 1 reply; 7+ messages in thread
From: Pandu Poluan @ 2011-10-15 5:00 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
On Oct 15, 2011 8:16 AM, "kashani" <kashani-list@badapple.net> wrote:
>
> On 10/13/2011 3:11 AM, Pandu Poluan wrote:
>>
>>
>> # NOTE: Postfix will not automatically forward mail for domains that
>> # list this system as their primary or backup MX host. See the
>> # permit_mx_backup restriction description in postconf(5).
>
>
> The point of this is to say, "If some dude points DNS at your
server and/or configures their mail server to send mail to yours, it's not
going to relay mail for them. You have to actually configure the domains to
be relayed."
>
> Since you're planning to configure the domain you should be fine.
>
Ah, thanks! That's a very succinct yet clearest explanation! :-)
>Also less overthinking and more testing solves most of this stuff quicker.
>
I prefer to arm myself with enough knowledge before deploying -- even in a
testing setup -- to reduce any 'WTF?!' moments :-)
Rgds,
[-- Attachment #2: Type: text/html, Size: 1203 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix to relay mail even if acting as primary MX host?
2011-10-15 5:00 ` Pandu Poluan
@ 2011-10-15 20:41 ` kashani
0 siblings, 0 replies; 7+ messages in thread
From: kashani @ 2011-10-15 20:41 UTC (permalink / raw
To: gentoo-user
On 10/14/2011 10:00 PM, Pandu Poluan wrote:
> >Also less overthinking and more testing solves most of this stuff quicker.
> >
>
> I prefer to arm myself with enough knowledge before deploying -- even in
> a testing setup -- to reduce any 'WTF?!' moments :-)
Research is good, but you'll learn way more from banging on it yourself
for a bit. Also it's a chance to break it or see how it fails and what
errors get kicked out. This way you're not at a loss when it does break
or it can help make your config more robust. Lastly the further you get
in your career the less help Google, mailing lists, etc become. At that
point your own experience and 5-10 minutes of testing is going to
produce better results.
kashani
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-15 20:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 10:11 [gentoo-user] Postfix to relay mail even if acting as primary MX host? Pandu Poluan
2011-10-13 10:17 ` [gentoo-user] " Pandu Poluan
2011-10-13 17:56 ` Michael Orlitzky
2011-10-14 1:02 ` Pandu Poluan
2011-10-15 1:13 ` [gentoo-user] " kashani
2011-10-15 5:00 ` Pandu Poluan
2011-10-15 20:41 ` kashani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox