Thanks to:
Alexander Pennace
Petr Novotny
They both stated:
> if [ $RESPONSE = $STRING ];
Make this "$RESPONSE" = "$STRING" and try again.
And Alexander noted:
Also note that if fastforward is sending the error on standard error it
might not be caught.
So my final .qmail-default contents are: (ALL ON ONE LINE)
| RESPONSE=`/var/qmail/bin/fastforward -nd /etc/aliases.cdb 2>&1`;
STRING='Sorry, no mailbox here by that name. (#5.1.1)';
if [ "$RESPONSE" = "$STRING" ];
then /var/qmail/bin/forward "$EXT"~"$HOST"@smtp.loadmail.com;
else /var/qmail/bin/fastforward -d /etc/aliases.cdb; fi
I tested it and it works great!
Thanks for all your help
-----Original Message-----
From: Timothy Lorenc [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 30, 2000 1:13 PM
To: qmail
Subject: .qmail-default contents incorrect
Qmailers:
I have the following in my /var/qmail/etc/.qmail-default file:
(all on one line)
| RESPONSE=`/var/qmail/bin/fastforward -nd /etc/aliases.cdb`;
STRING='Sorry, no mailbox here by that name. (#5.1.1)';
if [ $RESPONSE = $STRING ];
then /var/qmail/bin/forward "$EXT"~"$HOST"@smtp.bigmaildomain.com;
else /var/qmail/bin/fastforward -d /etc/aliases.cdb; fi
I am getting the following error message in /var/log/syslog
Aug 30 10:38:44 smtp01.load.com qmail: [ID 748625 mail.info]
967657124.271047 starting delivery 1: msg 972173 to local
[EMAIL PROTECTED]
Aug 30 10:38:44 smtp01.load.com qmail: [ID 748625 mail.info]
967657124.273059 status: local 1/10 remote 0/20
Aug 30 10:38:44 smtp01.load.com qmail: [ID 748625 mail.info]
967657124.328453 delivery 1: deferral:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)//bin/sh:_test:_unknown_operato
r_Sorry,/
Now I have an /etc/aliases.cdb file which does not contain the email
address: [EMAIL PROTECTED]
and I want to check if it will be able to be passed through to a default
forward line.
The reason for this is that it seems that using fastforward with
/etc/aliases.cdb and virtualdomains are kind
of mutually exclusive. The virtualdomains file gets processed before any
check of the /etc/aliases.cdb file is
performed thus bypassing fastforward. And if there are several (100's) of
emails which don't stay local, then
I have hundreds of .qmail files for the exceptions.... seems to me that
would be very inefficient.
Here is an example of my environment:
I have some very fast front-end smtp (qmail) systems that receive mail to be
either forwarded to an external
email address or forwarded to an internal email database. So....
Say I have a virtual domain: virtdom.com and most mail gets delivered
internally and forwarded to the mail database
system in the format of username~[EMAIL PROTECTED] and some
other emails get forwarded via an aliases file to an external email address.
Would the above .qmail-default file work if correctly formatted.
Thanks.
-- Specializing in computer and network consulting...
Timothy Lorenc USmail: Lorenc Advantage, Inc.
Consultant/President 6732 E. State Blvd.
PMB 304
Email: [EMAIL PROTECTED] Fort Wayne, IN 46815-7762