Re: SMTP routing based on From: address?
Charles Cazabon writes: > Grant Edwards <[EMAIL PROTECTED]> wrote: > > > > Alternatively, is there any way I could use two different "sendmail" > > binaries/wrappers to pre-determine which SMTP server the mail is routed to? > > Have two different qmail installs (/var/qmail1 and /var/qmail2), each of > which has an smtproutes entry to the appropriate mailserver. Then write > a wrapper script around qmail-queue. Check the envelope sender in that, > and based on it's contents, call either /var/qmail1/bin/qmail-queue or > /var/qmail2/bin/qmail2-queue. It turns out to be even simpler than that. There are two different MUA configurations being used (that's what generates the From: addresses), and I can specify in the MUA config which "sendmail" pathname to use. -- Grant Edwards [EMAIL PROTECTED]
Re: SMTP routing based on From: address?
On Tue, Feb 13, 2001 at 02:47:21PM -0700, Andy Bradford wrote: > On Tue, 13 Feb 2001 21:39:22 GMT, "Grant Edwards" wrote: > > > It's sort of an odd request, but I'd like to route outgoing mail to one of > > two SMTP servers, but I don't want to do it based on the destination > > address. I would like to do it based on the From: address in the header. > > You could probably handle something like this in ~alias/.qmail-default > and then based on the local part in the address reinject the message to > the *real* mail server. Or, you could have two separate qmail installations, with a separate smarthost for each. Then, you could call whichever wrapper you needed to. --Adam
Re: SMTP routing based on From: address?
Adam McKenna writes: > On Tue, Feb 13, 2001 at 02:47:21PM -0700, Andy Bradford wrote: > > On Tue, 13 Feb 2001 21:39:22 GMT, "Grant Edwards" wrote: > > > > > It's sort of an odd request, but I'd like to route outgoing mail to one of > > > two SMTP servers, but I don't want to do it based on the destination > > > address. I would like to do it based on the From: address in the header. > > > > You could probably handle something like this in ~alias/.qmail-default > > and then based on the local part in the address reinject the message to > > the *real* mail server. > > Or, you could have two separate qmail installations, with a separate > smarthost for each. Then, you could call whichever wrapper you needed to. That's what I thought I might need to do. It sounds like overkill, but it's probably the simplest thing to do. -- Grant Edwards [EMAIL PROTECTED]
Re: SMTP routing based on From: address?
On Tue, 13 Feb 2001 21:39:22 GMT, "Grant Edwards" wrote: > It's sort of an odd request, but I'd like to route outgoing mail to one of > two SMTP servers, but I don't want to do it based on the destination > address. I would like to do it based on the From: address in the header. You could probably handle something like this in ~alias/.qmail-default and then based on the local part in the address reinject the message to the *real* mail server. Andy
Re: SMTP routing based on From: address?
Grant Edwards <[EMAIL PROTECTED]> wrote: > > Alternatively, is there any way I could use two different "sendmail" > binaries/wrappers to pre-determine which SMTP server the mail is routed to? Have two different qmail installs (/var/qmail1 and /var/qmail2), each of which has an smtproutes entry to the appropriate mailserver. Then write a wrapper script around qmail-queue. Check the envelope sender in that, and based on it's contents, call either /var/qmail1/bin/qmail-queue or /var/qmail2/bin/qmail2-queue. Charles -- --- Charles Cazabon<[EMAIL PROTECTED]> GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---