Thanks Sam, Nat Sakimura writes:
>> Hi. >> >> I am using dynamic delivery instruction in >> /etc/courier/aliasdir/.courier-default . >> The external program makes a lookup into a database and decides where is the >> final destination. I want to make it such that if the lookup fails, the mta >> returns 550 User unknown to the client program. >> >> How can I achieve it? > > If the lookup fails, have the external program generate a: > > | echo "550 User unknown" Do you mean that I should just generate "550 user unknown" ? Say, a perl program lookup.pl was called from /etc/courier/aliasdir/.courier-default. The /etc/courier/aliasdir/.courier-default looks like as follows: || /etc/courier/aliasdir/lookup.pl lookup.pl make a query to a database, and if it finds a record, it prints a email address like: [EMAIL PROTECTED] to the standard output. Now, when the lookup fails, should I just print "550 user unknown" to the standard output? I have created a .courier-550 in my home directory to test it. The file is a very simple one: #!/usr/bin/perl print "550 User unknown"; The smtp session is as follows: It does not seem to work. What am i doing wrong? Connected to localhost. Escape character is '^]'. 220 vrenpo.com ESMTP helo kitty 250-vrenpo.com Ok. 250-AUTH LOGIN 250-AUTH=LOGIN X-NETSCAPE-HAS-BUGS 250-STARTTLS 250-XVERP=Courier 250-XEXDATA 250-XSECURITY=NONE,STARTTLS 250-PIPELINING 250-8BITMIME 250-SIZE 250 DSN mail from:<[EMAIL PROTECTED]> 250 Ok. rcpt to:<[EMAIL PROTECTED]> 250 Ok. rset 250 Ok quit 221 Bye. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
