Like most mail related functions, catchall addresses can be managed through the command line or through the VAdmin Web interface. To create a catchall from the command line, open a Telnet or SSH connection to your Freedom account and follow the steps below:
Go to your /etc/mail directory and open the catchall file in pico or another text editor:
> cd /etc/mail
> pico catchall
Add the domain name and a destination email address where unknown email addresses should be forwarded. Use the following format, and be sure to separate the domain and the destination with a space or tab:
domain destination
The domain must be a complete domain name (such as example.com) that is hosted on your Freedom account, and the destination must be a valid alias, virtmap, email account, or a complete email address located on another server.
IMPORTANT NOTE:
The destination CANNOT be an email address on the same domain; otherwise, you will encounter excessive recursion errors. The following is an example of an improper catchall entry because it points to an email address on the same domain:
example.com bad@example.com
You can include a separate catchall entry, one per line, for each domain name that is hosted on your Freedom account; however, you can only have one catchall entry per domain.
Run the mailctl restart command to update the catchall database:
> mailctl restart
All improperly addressed mail that includes "@domain.com" will now be forwarded to the destination email address.