Quantcast

Multiple SMTP Relay for single domain

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple SMTP Relay for single domain

Umar Draz
Hi

I want to use multiple SMTP relays for my domain @example.com through sender_dependent_relayhost

Here is my sender_dependent_relayhost_maps

@example.com       smtp.post1.com
@example.com       smtp.post2.com
@example.com       smtp.post3.com

when I restart my postfix I got error  

postmap: warning: relayhost_map.db: duplicate entry: "@example.com".

Would you please anybody help how i can use multiple smtp relays for single domain or single email?

Br.

Umar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Viktor Dukhovni
On Sat, May 18, 2013 at 10:38:23AM -0700, Umar Draz wrote:

> I want to use multiple SMTP relays for my domain @example.com through
> sender_dependent_relayhost

You probably don't really want to do this (or more precisely you
think you want this, but lack the right information to conclude
that this is a mistake and there is a much better solution).

> Here is my sender_dependent_relayhost_maps
>
> @example.com       smtp.post1.com
> @example.com       smtp.post2.com
> @example.com       smtp.post3.com

This is not how Postfix maps work, but almost certainly we need
not bother to correct this, since what you're trying is likely
not the right approach in the first place.

What is your actual goal?  Are you operating a border MX host?
An internal mailhub?  A submission server?  A mailbox hosting
SMTP server?  Or some combination of the above?

Which email messages are you trying to deliver? where are you trying
to deliver them?  Why?

My guess is you have a border server, and you want to send to multiple
internal relays, in that case, you need a transport table:

    main.cf:
        indexed = ${default_database_type}:${config_directory}/
        transport_maps = ${indexed}transport

    transport:
        example.com relay:[relay.example.com]

    DNS:
        relay.example.com. IN A 192.0.2.1
        relay.example.com. IN A 192.0.2.2
        relay.example.com. IN A 192.0.2.3

If you can't add A records to the zone file for example.com, you
can always add these to the "localhost." zone on the MTA.

    transport:
        example.com relay:[relay.example.com.localhost.]

    DNS:
        relay.example.com.localhost. IN A 192.0.2.1
        relay.example.com.localhost. IN A 192.0.2.2
        relay.example.com.localhost. IN A 192.0.2.3

with the localhost zone served by the caching resolver on the MTA.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Umar Draz
In reply to this post by Umar Draz
Hi Victor,

Thanks for your reply,

I want this

http://www.cyberciti.biz/faq/postfix-multiple-isp-accounts-smarthost-smtp-client/

I have 4 different username and passwords for remove smtp servers.

Br.

Umar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Viktor Dukhovni
On Sat, May 18, 2013 at 11:02:04AM -0700, Umar Draz wrote:

> Thanks for your reply,
>
> I want this
>
> http://www.cyberciti.biz/faq/postfix-multiple-isp-accounts-smarthost-smtp-client/

That's more of a solution, not a problem description.

> I have 4 different username and passwords for remote smtp servers.

For what purpose?  To use all 4 in parallel, regardless of sender
address?  Or to direct mail from specific sender addresses via the
corresponding ISP?  Or else explain in more detail.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Umar Draz
Hi Victor,

We have created a Frontend software for sending emails, we want to send emails in bulk.

From that frontend software we will just pass

from address : e.g mail@example.com
and smtp server which is defenitly our server
and to address (a loop of address around 500,000)

now We want above 500,000 emails should deliver through 4 SMTP relays through our Postfix email server.

the from address will be mail@example.com

Br.

Umar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Viktor Dukhovni
On Sat, May 18, 2013 at 11:24:27AM -0700, Umar Draz wrote:

> We have created a Frontend software for sending emails, we want to send
> emails in bulk.
>
> From that frontend software we will just pass
>
> from address: e.g., [hidden email]
> and smtp server: which is definitely our server
> and to address: (a loop of address around 500,000)
>
> Now we want above 500,000 emails should deliver through 4 SMTP relays
> through our Postfix email server.
>
> the from address will be [hidden email]

Who operates the SMTP relays?  From your earlier description these
4 four relays have username + password login access, which sounds
like mail submission services for end-users operated by ISPs, not
bulk mail delivery services for businesses.

It would be unwise to try to deliver 500,000 email messages through
4 user accounts intended for people typing a few email messages a
day sent to one correspondent or a group of friends.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Umar Draz
Here is

postmarkapp.com
mandrillapp.com
www.mailjet.com
mailgun.org

Now my question is, is this possible? if yes then how?

Br.

Umar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Viktor Dukhovni
On Sat, May 18, 2013 at 11:42:30AM -0700, Umar Draz wrote:


> postmarkapp.com

    http://developer.postmarkapp.com/

    Things You Should Know

        Postmark is for transactional email only. You may not send
        newsletters, announcements to your lists or any other bulk email. If
        you're uncertain if your email qualifies as 'transactional', you can
        always contact support and we'll review your usage.

> mandrillapp.com
> www.mailjet.com
> mailgun.org

Similar considerations may apply to the others.  If you're sending 500,000
messages at once, that does not sound "transactional" to me.

> Now my question is, is this possible? if yes then how?

You can use a different sender address to direct individual messages
to each of the 4 providers via sender dependent relayhost settings.
No promises this will work for very long, as most likely your mail
is spam.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Umar Draz
So

I can not use @example.com for these 4 SMTPs instead I need to do this

user1@example.com smtp1.com
user2@example.com smtp2.com
user3@example.com smtp3.com
user4@example.com smtp4.com

?

Br.

Umar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Viktor Dukhovni
On Sat, May 18, 2013 at 12:16:15PM -0700, Umar Draz wrote:

> I can not use @example.com for these 4 SMTPs instead I need to do this
>
> [hidden email] smtp1.com
> [hidden email] smtp2.com
> [hidden email] smtp3.com
> [hidden email] smtp4.com

Yes. And don't send unsolicited bulk email.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple SMTP Relay for single domain

Umar Draz
Hi Vicktor,

Thanks for your help.

Br.

Umar
Loading...