This was taken from Alabanza's knowledgebase.
you have to have root access
To allow access to your mail relay:
1. Get, from the customer, the full domain name of their local ISP, that is, connection service.
2. Add this ISP to the file "/etc/mail/relay-domains"
Example:
SSH to server box, type at the command prompt:
~# vi /etc/mail/relay-domains
[press <Shift+G> to go to the end of the file]
[press <i> for insertion mode]
[add domain, like the following example:]
-------------
wcom.net
[you can also add IP ranges]
209.241.123.
[this would add all IP's from 209.241.123.1 to 209.241.123.255]
209.241.
[this would add all IP's from 209.241.1.* to 209.241.255.*]
--------------
<Esc>
<:wq>
Try to keep this as limited as possible, the more IP's in a range, the greater chance of a server being exploited for spam.
Do not use '*' as a wildcard. Just leave a dot at the end and it will work as a wildcard.
Now update the database by running command:
~# /etc/mail/updatedb
Also, sendmail will need to be restarted:
~# /etc/rc.d/init.d/sendmail restart