thanks bill,
works fine now except that i'm not quite sure if i have to define all the local users (ID) in the /etc/aliases file.
sorry, i got the materials from IBM (attached below) site but not descriptive enough to apply in my system.
==========================================================
Change the Cw setting
You must tell sendmail to accept mail addressed to <user>@test.com. This is accomplished by changing the setting of the Cw macro in the sendmail.cf file.
Using your preferred editor, open the sendmail.cf file:
/etc/sendmail.cf
Find the following entries:
#Cw localhost $w $?m$w.$m$. YourHostAliases
#Cm $m YourOtherDomainNames
Cwlocalhost
Change to the following:
Cw localhost $w $?m$w.$m$. test.com
#Cm $m YourOtherDomainNames
#Cwlocalhost
--------------------------------------------------------------------------------
Remove the system's hostname in the "from line"
Now tell sendmail to remove the system's hostname in the from line. This is necessary to allow recipients to reply to messages sent out. Assume that the relay machine's full name is relay.test.com.
By default, any mail sent out from this relay will be from the following:
<user>@relay.test.com
The conventional method will have the from line display the message below:
<user>@test.com
You will need to make two changes to the sendmail.cf file for configuration.
Set the DM macro:
The original setting follows:
# who I masquerade as (null for no masquerading) (see also $=M) DM
Change this setting to the following:
DMtest.com
Modify a ruleset:
Original setting:
###################################################################
### Ruleset 94 -- convert envelope names to masqueraded form ###
###################################################################
S94
R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
#R$+ $@ $>93 $1 <-
[This last line may not be listed.]-----------
Change this to:
###################################################################
### Ruleset 94 -- convert envelope names to masqueraded form ###
###################################################################
S94
R$+ $@ $>93 $1
Save the /etc/sendmail.cf file.
--------------------------------------------------------------------------------
Refresh the sendmail.cf file
Enter the following command:
refresh -s sendmail
This updates sendmail with the new configurations. If sendmail is not running, you need to check to see if it is active using the following command:
lssrc -s sendmail
Information similar to the following will be displayed.
Subsystem Group PID Status
sendmail mail 5424 active
If it is not active, start it up by issuing the following command:
startsrc -s sendmail -a "-bd -q30m"
--------------------------------------------------------------------------------
Create aliases
sendmail must be told where to send mail it receives for users that do not exist on the relay machine. This is done using the /etc/aliases file. For example, if a user has a username of John on machine nixon.test.com, we must add the following entry to this alias file:
john:john@nixon.test.com
NOTE: If you want a specific message to be delivered to more than one user, just add another alias separated by a comma and a space.
For example:
john:john@nixon.test.com, frank@venus.test.com
After saving the aliases file, you need to run:
newaliases
This rebuilds the alias database. Now, when mail is sent to john@test.com, it will be relayed to john@nixon.test.com.
NOTE: Other machines within the network should also revise their from lines to exclude the hostname. This is done by repeating step two on each host, followed by a refresh of the sendmail daemon. This is called masquerading and is necessary so that mail from john@nixon.test.com goes out as john@test.com. This will allow john to receive message replies.
i just need clarification from this doc.
1. can i attach file in sendmail?
2. do i have to define all users in /etc/aliases?
3. is there any parameters that i can use to fully read the complete e-mail address of the user who sent me reply? or sent me the e-mail?
any help highly appreciated...