I have an rarely used /etc/aliases
entry
vmailusers: :include:/usr/local/etc/vmailusers
The /usr/local/etc/vmailusers
file is generated by a cronjob executing
ls /home/vmail | grep -v lists > /usr/locale/etc/vmailusers
chmod 0640 /usr/local/etc/vmailusers
chmod mailnull:mail /usr/local/etc/vmailusers
Is there a way to avoid having to run a cron job but rather execute the ls
command in the very moment the vmailusers
alias is used?
With exim you need no
/etc/aliases
anymore. All that you have to do - is to define redirect router like that:Refer to the exim spec chapter 9.3 describing lookup in the files by lsearch. At least, lsearch'ed files have the same syntax as
/etc/aliases
so you haven't mess with converting your current /usr/local/etc/vmailusers to some freaky format. Don't forget to place that router before any accepting router in your config.Exim lookup for given key each time the message is processed, so all your changes become actual just when you save your aliases file.