Relaying all outbound mail to MX servers

Relaying all outbound mail to MX servers

am 21.10.2007 23:42:54 von Michael Mansour

Hi,

I have a setup where I have two inbound MX servers which receive all
email, and then deliver that mail to another internal sendmail server
which holds the actual user inboxes.

For outbound mail, clients use SMTPAUTH on that internal server, and it
then attempts to deliver their messages for them directly to remote smtp
servers.

What I want to do is have that internal sendmail server forward all it's
outbound mail to both of the MX servers ie. when the mail clients
SMTPAUTH and deliver mail to be sent to a destination smtp server, to
forward their outbounds to the MX servers and get them to deliver the
messages outbound, instead of the internal server doing that work.

How can I do this?

Of course I'd want "undeliverable" messages bounced back to the original
sender if the MX server cannot deliver the message after 5 days, but I
guess that would be automatic since the server will know how to get to
the original sender anyway.

Thanks.

Michael.

Re: Relaying all outbound mail to MX servers

am 22.10.2007 15:37:19 von bill

On Mon, 22 Oct 2007 07:42:54 +1000, Michael Mansour wrote:

> Hi,
>
> I have a setup where I have two inbound MX servers which receive all
> email, and then deliver that mail to another internal sendmail server
> which holds the actual user inboxes.
>
> For outbound mail, clients use SMTPAUTH on that internal server, and it
> then attempts to deliver their messages for them directly to remote smtp
> servers.
>
> What I want to do is have that internal sendmail server forward all it's
> outbound mail to both of the MX servers ie. when the mail clients SMTPAUTH
> and deliver mail to be sent to a destination smtp server, to forward their
> outbounds to the MX servers and get them to deliver the messages outbound,
> instead of the internal server doing that work.
>
> How can I do this?
>
> Of course I'd want "undeliverable" messages bounced back to the original
> sender if the MX server cannot deliver the message after 5 days, but I
> guess that would be automatic since the server will know how to get to the
> original sender anyway.
>
> Thanks.
>
> Michael.

I know you can have it forced to 1 server using the smarthost option in
sendmail. Unless you have some kind of load balancer Im not sure how you
would get it to select MX from two servers. Setting mx1.foo.com as the
smarthost would force mail from that server to send mail out through
mx1.foo.com. I know this does not send to the 2 servers, but it is a way
to force it atleast one way.

BillP

Re: Relaying all outbound mail to MX servers

am 22.10.2007 17:24:18 von Michael Mansour

Hi Bill,

Bill wrote:
> On Mon, 22 Oct 2007 07:42:54 +1000, Michael Mansour wrote:
>
>> Hi,
>>
>> I have a setup where I have two inbound MX servers which receive all
>> email, and then deliver that mail to another internal sendmail server
>> which holds the actual user inboxes.
>>
>> For outbound mail, clients use SMTPAUTH on that internal server, and it
>> then attempts to deliver their messages for them directly to remote smtp
>> servers.
>>
>> What I want to do is have that internal sendmail server forward all it's
>> outbound mail to both of the MX servers ie. when the mail clients SMTPAUTH
>> and deliver mail to be sent to a destination smtp server, to forward their
>> outbounds to the MX servers and get them to deliver the messages outbound,
>> instead of the internal server doing that work.
>>
>> How can I do this?
>>
>> Of course I'd want "undeliverable" messages bounced back to the original
>> sender if the MX server cannot deliver the message after 5 days, but I
>> guess that would be automatic since the server will know how to get to the
>> original sender anyway.
>>
>> Thanks.
>>
>> Michael.
>
> I know you can have it forced to 1 server using the smarthost option in
> sendmail. Unless you have some kind of load balancer Im not sure how you
> would get it to select MX from two servers. Setting mx1.foo.com as the
> smarthost would force mail from that server to send mail out through
> mx1.foo.com. I know this does not send to the 2 servers, but it is a way
> to force it atleast one way.

Hmm. would it be a problem if I made that SMARTHOST a hostname, say
"smtp-out.example.com" and then gave two A records to that name which
are the A records of my MX servers? This should allow me to use the DNS
round robin for the internal sendmail server to be able to SMARTHOST to
any of the machines (and if one is down, it'll try the other one after a
while).

Would this be feasible?

Michael.

> BillP

Re: Relaying all outbound mail to MX servers

am 24.10.2007 00:25:45 von phoenix

On Oct 22, 11:24 am, Michael Mansour wrote:
> Hi Bill,
>
>
>
> Bill wrote:
> > On Mon, 22 Oct 2007 07:42:54 +1000, Michael Mansour wrote:
>
> >> Hi,
>
> >> I have a setup where I have two inbound MX servers which receive all
> >> email, and then deliver that mail to another internal sendmail server
> >> which holds the actual user inboxes.
>
> >> For outbound mail, clients use SMTPAUTH on that internal server, and it
> >> then attempts to deliver their messages for them directly to remote smtp
> >> servers.
>
> >> What I want to do is have that internal sendmail server forward all it's
> >> outbound mail to both of the MX servers ie. when the mail clients SMTPAUTH
> >> and deliver mail to be sent to a destination smtp server, to forward their
> >> outbounds to the MX servers and get them to deliver the messages outbound,
> >> instead of the internal server doing that work.
>
> >> How can I do this?
>
> >> Of course I'd want "undeliverable" messages bounced back to the original
> >> sender if the MX server cannot deliver the message after 5 days, but I
> >> guess that would be automatic since the server will know how to get to the
> >> original sender anyway.
>
> >> Thanks.
>
> >> Michael.
>
> > I know you can have it forced to 1 server using the smarthost option in
> > sendmail. Unless you have some kind of load balancer Im not sure how you
> > would get it to select MX from two servers. Setting mx1.foo.com as the
> > smarthost would force mail from that server to send mail out through
> > mx1.foo.com. I know this does not send to the 2 servers, but it is a way
> > to force it atleast one way.
>
> Hmm. would it be a problem if I made that SMARTHOST a hostname, say
> "smtp-out.example.com" and then gave two A records to that name which
> are the A records of my MX servers? This should allow me to use the DNS
> round robin for the internal sendmail server to be able to SMARTHOST to
> any of the machines (and if one is down, it'll try the other one after a
> while).
>
> Would this be feasible?
>
> Michael.
>
> > BillP

Yes you can very much use hostname in the following format:
define(`SMART_HOST',`[smtp-out.example.com]')dnl

Re: Relaying all outbound mail to MX servers

am 25.10.2007 01:21:21 von per

In article <471CC0A2.6030203@gmail.com> Michael Mansour
writes:
>
>Hmm. would it be a problem if I made that SMARTHOST a hostname, say
>"smtp-out.example.com" and then gave two A records to that name which
>are the A records of my MX servers?

You can do better than that - create MX records for smtp-out.example.com
pointing to your MX servers, sendmail will obey them, and if they all
have the same prio sendmail will randomize the choice (per standard MX
specs - it uses exactly the same logic as if it had been sending to
user@smtp-out.example.com). Or you can order/group them however you
want.

--Per Hedeland
per@hedeland.org