Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

User level message delivery rules

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


qmail at top-consulting

May 2, 2011, 8:43 AM

Post #1 of 6 (1866 views)
Permalink
User level message delivery rules

Is it possible with Qmail to do user level delivery rules ?

For example, we have a Qmail box that hosts some accounts for
domainA.com and an Exchange server that hosts some accounts also for
domainA.com

We want to place another box ( Qmail ideally ) in front of these two
and to select which server the messages goes to based on the recipient.

If it's recipients 1,2,3 go to serverA, if it's recipients 4,5,6 then
go to serverB.


mbhangui at gmail

May 2, 2011, 9:01 AM

Post #2 of 6 (1799 views)
Permalink
Re: User level message delivery rules [In reply to]

On Mon, May 2, 2011 at 9:13 PM, <qmail [at] top-consulting> wrote:
>
> Is it possible with Qmail to do user level delivery rules ?
>
> For example, we have a Qmail box that hosts some accounts for domainA.com and an Exchange server that hosts some accounts also for domainA.com
>
You could write a wrapper around qmail-remote and have that called in
.qmail files for re-directing the mails to the exchange server

>
> We want to place another box ( Qmail ideally ) in front of these two and to select which server the messages goes to based on the recipient.
>
> If it's recipients 1,2,3 go to serverA, if it's recipients 4,5,6 then go to serverB.
>
>
For recipients 4, 5, 6 create a .qmail which calls qmail-remote to
send the email to the exchange server. If you search for 'qmail-remote
wrapper' in google, you might get a better idea.

At the cost of beating my own drum, If you want an elegant solution,
look at IndiMail which does the same thing without having the need to
create users on the qmail box as well as the exchange box. IndiMail
modifies qmail-rspawn to lookup users in a MySQL table for the host
which has the user's mailbox.

In fact IndiMail started as a way to migrate corporates in India
seamlessly out of exchange. IndiMail does not require you to have a
hard cutover to migrate out of exchange and users can continue to be
on both the servers as long as you with.


qmail at top-consulting

May 2, 2011, 9:15 AM

Post #3 of 6 (1792 views)
Permalink
Re: User level message delivery rules [In reply to]

Quoting Manvendra Bhangui <mbhangui [at] gmail>:

> On Mon, May 2, 2011 at 9:13 PM, <qmail [at] top-consulting> wrote:
>>
>> Is it possible with Qmail to do user level delivery rules ?
>>
>> For example, we have a Qmail box that hosts some accounts for
>> domainA.com and an Exchange server that hosts some accounts also
>> for domainA.com
>>
> You could write a wrapper around qmail-remote and have that called in
> .qmail files for re-directing the mails to the exchange server
>
>>
>> We want to place another box ( Qmail ideally ) in front of these
>> two and to select which server the messages goes to based on the
>> recipient.
>>
>> If it's recipients 1,2,3 go to serverA, if it's recipients 4,5,6
>> then go to serverB.
>>
>>
> For recipients 4, 5, 6 create a .qmail which calls qmail-remote to
> send the email to the exchange server. If you search for 'qmail-remote
> wrapper' in google, you might get a better idea.
>
> At the cost of beating my own drum, If you want an elegant solution,
> look at IndiMail which does the same thing without having the need to
> create users on the qmail box as well as the exchange box. IndiMail
> modifies qmail-rspawn to lookup users in a MySQL table for the host
> which has the user's mailbox.
>
> In fact IndiMail started as a way to migrate corporates in India
> seamlessly out of exchange. IndiMail does not require you to have a
> hard cutover to migrate out of exchange and users can continue to be
> on both the servers as long as you with.
>

The .qmail calling .qmail-remote appears to be the best solution. If
we end up using a proxy - like Indimail - then mail sent locally will
never hit the proxy and generate an error instead. Is there a
workaround for this ?

So the final setup would be something like:

Exchange set up with dual delivery.

E-mail comes in, goes to our Barracuda box. Barracuda forwards all to
Exchange which also delivers to Qmail. Qmail is setup with the aliases
on Exchange and delivers there remotely for those accounts. This
sounds like it might work but involves a lot of .qmail file maintenance!


mbhangui at gmail

May 2, 2011, 10:47 AM

Post #4 of 6 (1790 views)
Permalink
Re: User level message delivery rules [In reply to]

On Mon, May 2, 2011 at 9:45 PM, <qmail [at] top-consulting> wrote:
> The .qmail calling .qmail-remote appears to be the best solution. If we end
> up using a proxy - like Indimail - then mail sent locally will never hit the
> proxy and generate an error instead. Is there a workaround for this ?
>

Yes, it is handled by the local delivery program which calls
qmail-remote for local users whose mailbox is absent on the local
system

> So the final setup would be something like:
>
> Exchange set up with dual delivery.
>
> E-mail comes in, goes to our Barracuda box. Barracuda forwards all to
> Exchange which also delivers to Qmail. Qmail is setup with the aliases on
> Exchange and delivers there remotely for those accounts. This sounds like it
> might work but involves a lot of .qmail file maintenance!
>

You could write a shell script which creates/deletes the .qmail file
as per your scheme. The Shell script could also write the information
for the user in one common place or a database. Having the information
for all such users in one central place will ease your .qmail file
maintenance


feh at fehcom

May 2, 2011, 12:40 PM

Post #5 of 6 (1787 views)
Permalink
Re: User level message delivery rules [In reply to]

Hi,

On Mon, 02 May 2011 11:43:12 -0400
qmail [at] top-consulting wrote:

> Is it possible with Qmail to do user level delivery rules ?
>
> For example, we have a Qmail box that hosts some accounts for
> domainA.com and an Exchange server that hosts some accounts also for
> domainA.com
>
> We want to place another box ( Qmail ideally ) in front of these two
> and to select which server the messages goes to based on the recipient.
>
> If it's recipients 1,2,3 go to serverA, if it's recipients 4,5,6 then
> go to serverB.

Check for the fastforward package.

It is easy to implement some rules here for particular recipients; either in a per-user dedicated .qmail file or using qmail's alias user mechanism.

regards.
--eh.

>
>
>
>


--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de


amb-sendok-1306980475.pmoffceehojjbniebpbp at bradfo

May 2, 2011, 7:07 PM

Post #6 of 6 (1803 views)
Permalink
Re: User level message delivery rules [In reply to]

Thus said qmail [at] top-consulting on Mon, 02 May 2011 11:43:12 EDT:

> Is it possible with Qmail to do user level delivery rules ?

Yes. man dot-qmail and man qmail-send

> For example, we have a Qmail box that hosts some accounts for
> domainA.com and an Exchange server that hosts some accounts also for
> domainA.com

You can use fastforward to accomplish this kind of thing, or you can
just use individual dot-qmail files. Using fastforward will probably
give you the most flexibility (unless you roll your own).

Andy

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.