-   AIX (
-   -   Changing sendmail source address (

looseCannon 06-28-2005 10:33 AM

Changing sendmail source address
Maybe an odd request, but still a legit one.

I need to change the 'from' address for mail coming from some users. I've tried using the 'genericstable' and 'genericsdomain' options. So far nothing is working.

I added the following options to the *.mc file I used to create the file.


In genericsdomain I listed only the hostname of the server. I created /etc/mail/genericstable.tmp, which contains the following lines:


I used the makemap command create genericstable.db, which is referenced in the

Yet, when I send a message from root or daemon the genericstable isn't used. I'm stumped on this and would appreciate any hep someone can lend.

newuser455 06-28-2005 12:08 PM

I am not sure that genericstable is what you want. You need to masquerade the domains. Sorry I cannot really help you any more... I have never done this manually. I have always used Webmin to do it for me... :D

Hope I helped. Good luck.

looseCannon 06-28-2005 12:14 PM

I have masquerading set up for the domains. That was easy enough to get going. But now what I need to do is something similar on a per-user basis.

I found some instructions on how to do this at:

Look for "Sendmail Masquerading Explained"

Despite following these instructions I still can't get this thing to work.

Very annoying.

newuser455 06-28-2005 12:17 PM

Masquerading will work on a per domain basis. Other than that, I do not know what to tell you. You might try another mail server such as Postfix.

looseCannon 06-30-2005 07:13 AM

Finally got it working, so if anyone else is trying to do the same thing this is what you have to do:

Add the following to your mc file used to generate
FEATURE(`genericstable', `dbm /etc/mail/genericstable')dnl

Of course you can change the names of the files to be what you want. These are only suggestions.

use the m4 command to do this. While in /usr/samples/tcpip/ run the command:
m4 ../m4/cf.m4 > /tmp/

Create genericstable
vi /etc/mail/genericstable. Add the users you want to change the email address for. The format is 'user'. The file is tab delimited.

After you have made the file use the makemap command to get it ready for sendmail to use. 'makemap dbm genericstable < genericstable'

Create genericsdomain
Run the following command as root:
sendmail -bt -d0.1 < /dev/null

This will give you an idea of what you need to place in the genericsdomain file. This does not need to have anything done to it, so just leave the file as it is.

Move into place
Now that everything else is done, move /tmp/ to /etc/mail. Restart sendmail if it is actively running on the system.


All times are GMT -5. The time now is 11:12 PM.