From: "P.A" on
Hi, hoping someone can help.



I have a situation that I want to send all outgoing mail to 3 servers that
are part of a spam cluster which will check the email for spam and deliver
it.



I was thinking of creating a host in DNS, for example smtp-relay and have it
point to 3 different ip addresses that correspond to the 3 spam cluster
servers. Will this create an issue if postfix does a dns lookup for
smtp-relay and gets an ip that is down, will it try again, or is it best to
just use all 3 servers names in the relayhost option?





Another question is, suppose all three servers are down, can I have postfix
directly deliver the email if all relayhosts are down, how can I do this?
Sorry if this has been answered I looked and couldn't find it.



Thanks, Paul

From: Noel Jones on
On 8/12/2010 9:43 AM, P.A wrote:
> Hi, hoping someone can help.
>
> I have a situation that I want to send all outgoing mail to 3
> servers that are part of a spam cluster which will check the
> email for spam and deliver it.
>
> I was thinking of creating a host in DNS, for example
> smtp-relay and have it point to 3 different ip addresses that
> correspond to the 3 spam cluster servers.

Yes, this is the proper procedure.

> Will this create an
> issue if postfix does a dns lookup for smtp-relay and gets an
> ip that is down, will it try again,

If one is down, postfix will use the others. If all are down,
postfix will retry delivery for maximal_queue_lifetime
(default 5 days).

> or is it best to just use
> all 3 servers names in the relayhost option?

No, only one relayhost destination may be specified.
http://www.postfix.org/postconf.5.html#relayhost

> Another question is, suppose all three servers are down, can I
> have postfix directly deliver the email if all relayhosts are
> down, how can I do this?

You can remove the relayhost setting and reload postfix.
Postfix won't do this automatically, but you could use a
monitoring script of some type. Before you do this ask
yourself the question of why use a relayhost at all if you
don't mind delivering the mail directly.

-- Noel Jones

From: "P.A" on
Noel, thanks for the quick reply.

I don't mind delivering directly if all the relayhosts are down, because
it's better than the email sitting in the queue waiting. The only reason I
want the email to be forward is so it can be checked for spam. I think this
would be a good feature for future versions of postfix.

Paul.


-----Original Message-----
From: owner-postfix-users(a)postfix.org
[mailto:owner-postfix-users(a)postfix.org] On Behalf Of Noel Jones
Sent: Thursday, August 12, 2010 11:01 AM
To: postfix-users(a)postfix.org
Subject: Re: relayhost question

On 8/12/2010 9:43 AM, P.A wrote:
> Hi, hoping someone can help.
>
> I have a situation that I want to send all outgoing mail to 3
> servers that are part of a spam cluster which will check the
> email for spam and deliver it.
>
> I was thinking of creating a host in DNS, for example
> smtp-relay and have it point to 3 different ip addresses that
> correspond to the 3 spam cluster servers.

Yes, this is the proper procedure.

> Will this create an
> issue if postfix does a dns lookup for smtp-relay and gets an
> ip that is down, will it try again,

If one is down, postfix will use the others. If all are down,
postfix will retry delivery for maximal_queue_lifetime
(default 5 days).

> or is it best to just use
> all 3 servers names in the relayhost option?

No, only one relayhost destination may be specified.
http://www.postfix.org/postconf.5.html#relayhost

> Another question is, suppose all three servers are down, can I
> have postfix directly deliver the email if all relayhosts are
> down, how can I do this?

You can remove the relayhost setting and reload postfix.
Postfix won't do this automatically, but you could use a
monitoring script of some type. Before you do this ask
yourself the question of why use a relayhost at all if you
don't mind delivering the mail directly.

-- Noel Jones