Request for advice (qmail-remote) Part II
Thankyou to those who have already replied to my first posting. However, as Charles Cazabon pointed out, I probably should have backed up a step to describe exactly what I am trying to achieve; and in doing so see if that makes the advice offered by Arjen van Drie and Dave Sill change in any way. Okaythe end result I would like to achieve is this: I want to put in a single machine that acts as a central mail gateway for an organization. All mail for every domain related to the organization will initially arrive there and be farmed out to the various branch mail servers (each which have one or more individual domains). Next I would like to offer every user in the organization a mail address <[EMAIL PROTECTED]> (Regardless of where they reside in the organization). Taking the case where I have 4 users: [EMAIL PROTECTED] [Located in the head office...connects directly to the central mail server] [EMAIL PROTECTED] [Located in branch1...connects to the branch1 mail server and has an alternate mail address [EMAIL PROTECTED]] [EMAIL PROTECTED] [EMAIL PROTECTED] [Located in branch2...connects to the branch2 mail server and have alternate mail addresses [EMAIL PROTECTED]] For all branch mail users I was planning on creating .qmail files on the central mail server that forward mail for <[EMAIL PROTECTED]> through to So far so good...that part is easy. The problem I am trying to resolve is where mails at the address <[EMAIL PROTECTED]> I do not want the mail to be sent back to the central mail server and then returned to the address <[EMAIL PROTECTED]>. Instead I would like the branch mail server to realise that is a local user and just deliver the mail to 's local mail store. I hope that this outline clarifies exactly what I am trying to achieve, and doesn't sound too confusing. Thanks in advance, once again, for any advice anyone can provide. Regards, Greg Elliott E-mail: [EMAIL PROTECTED]
Request for advice (qmail-remote)
Greetings All, I am currently in the planning stages of setting up a moderately large distributed email system and have run into a little snag in the way I would like the system to work. I believe I know how I would like to architect the solution to the problem; but I am unsure of how to execute the changes and was wondering if anyone had some advice or ideas on the following: a) I would like to rename the program qmail-remote to qmail-remote.real and insert another program in its place. (Likely to be a shell script). b) The script would look at the domain of the intended recipient and if it matched maildomain.com (for example) it would then look at the username being sent to. A small(ish) text file would be kept on the mail server with a list of usernames. If the username was found in the list, then the script would modify the recipient's email address to [EMAIL PROTECTED] and place the message back into the qmail-queue (or qmail-inject if that is better). If no match is found then the message would be handed onto qmail-remote.real for normal processing. [The effect would be to 'hijack' (for legitimate reasons) mail for a subset of an upstream domain, and deliver it locally. (Attempting to cut down on WAN traffic)]. Is this possible, and easily achievable? (I think my biggest problem (related to qmail :-p ) is my lack of understanding about how to read the parameters from stdinput in a shell script, manipulate them, and then how to pass control back to qmail-remote.) Thanks in advance, Greg Elliott E-mail: [EMAIL PROTECTED]