LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 06-28-2005, 10:33 AM   #1
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31
Question 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 sendmail.cf file.

FEATURE(genericstable)dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')

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

root someone@somewhere.com
daemon someone@somewhere.com

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

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.
 
Old 06-28-2005, 12:08 PM   #2
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Rep: Reputation: 30
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...

Hope I helped. Good luck.
 
Old 06-28-2005, 12:14 PM   #3
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Original Poster
Rep: Reputation: 31
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:
http://www.linuxhomenetworking.com/l...n/sendmail.htm

Look for "Sendmail Masquerading Explained"

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

Very annoying.
 
Old 06-28-2005, 12:17 PM   #4
newuser455
Member
 
Registered: May 2004
Location: Texas
Posts: 277

Rep: Reputation: 30
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.
 
Old 06-30-2005, 07:13 AM   #5
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Original Poster
Rep: Reputation: 31
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 sendmail.cf:
FEATURE(`genericstable', `dbm /etc/mail/genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain`)dnl

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

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

Create genericstable
vi /etc/mail/genericstable. Add the users you want to change the email address for. The format is 'user email@domain.com'. 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 sendmail.cf into place
Now that everything else is done, move /tmp/sendmail.cf to /etc/mail. Restart sendmail if it is actively running on the system.

YOU'RE DONE!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables (changing source address) rickthemick Linux - Networking 12 11-05-2004 07:43 AM
ip address keeps changing barrys Mandriva 2 12-06-2003 02:52 PM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM
Changing the ip address saravanan1979 Linux - Software 1 01-28-2002 04:19 AM
Changing IP address harry Linux - Networking 1 05-29-2001 01:36 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration