How can I make an alias expand to a list of recipients returned by a command?
- by Frerich Raabe
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?