Re: [Exim] getting list of files from directory

Top Pagina
Delete this message
Reply to this message
Auteur: Jim Knoble
Datum:  
Aan: exim-users
Onderwerp: Re: [Exim] getting list of files from directory
Circa 2000-Aug-01 18:24:23 -0700 dixit Marc MERLIN:

: I setup virtual domains as outlined in the exim docs:
:
: local_domains = "lsearch;/etc/mail/virtualdomainlist:(...)"
:
: virtual:
: driver = aliasfile
: domains = lsearch;/etc/mail/virtualdomainlist
: no_more
: file = /etc/mail/virtualdomains/$domain
: search_type = lsearch
:
:
: Instead of simply listing domains in virtualdomainlist, I'd like exim to do
: an ls of /etc/mail/virtualdomains and use the filenames as list of domains.
: Is that possible without using perl?

How about this:

Contents of /etc/mail/update-virtual-domain-list:

    #!/bin/sh
    ls -1 /etc/mail/virtualdomains >/etc/mail/virtualdomainlist


Excerpt from /etc/crontab:

    * * * * * root /etc/mail/update-virtual-domain-list


--
jim knoble | jmknoble@??? | http://www.jmknoble.cx/