On Monday 22 December 2003 20:01, Claas Langbehn wrote:

> I would like to use /var/qmail/control/rcpthosts or virtualdomains
> instead of doing
> --local-domains `cat /var/qmail/control/rcpthosts | tr "\\n" ","`
> every time i add a new domain.
>
> Is there a patch to do this?

Quick and dirty:

-----------------------------------------
use FileHandle;
my $QMAILCONTROLPATH='/var/qmail/control';
/var/qmail/control/virtualdomains
my @local_domains_array;
my $fh = new FileHandle("$QMAILCONTROLPATH/virtualdomains") || 
&error_condition("Cannot open $QMAILCONTROLPATH/virtualdomains!");
my @fh_lines = <$fh>;
my $fh_line;
my @fh_tmp;
my $fh_domain;
foreach $fh_line (@fh_lines) {
  @fh_tmp = split(m":", $fh_line);
  push(@local_domains_array, @fh_tmp[0]);
}
close $fh;
-----------------------------------------

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz

/*
"Oh my!  An `inflammatory attitude' in alt.flame?  Never heard of such
a thing..."
-- Allen Gwinn, [EMAIL PROTECTED]
*/



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to