Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AIX Sendmail

Status
Not open for further replies.

crmayer

Programmer
Nov 22, 2002
280
US
we have a program that gives a user the ability to send mail from our unix box with AIX 4.3.3, the problem is when they send something it goes out as first name and first letter of last name (this is the login for the user on the unix server).

example....
John Doe, this would be sent at johnd@company.com

The problem I am running into is that John Does actual e-mail address is john.doe@company.com. So if somebody replies to it, it comes back as undeliverable, could not find johnd@company.com. Well, that is not a valid e-mail address. I want the reply to go to John's pop server account that he has set up for the company.

Is there a way in sendmail to say if John Doe (johnd) sends something via mail it will put john.doe@company.com instead of johnd@company.com?
 
Yes, try setting the masquerade_domain and masquerade_as settings.

 
Sorry, but I am not that familar with sendmail and unix, is that part of the sendmail program?

If so, where would that file be located at?
 
First make a backup of your /etc/mail/sendmail.cf file!
cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.old

Note: Usually there should be a symlink between /etc/sendmail.cf and /etc/mail/sendmail.cf

You want to edit the /etc/mail/sendmail.cf file

Search for this
# who I masquerade as (null for no masquerading) (see also $=M)
DMyourdomainname

Try sending yourself an email, and see what happens...


 
That is already set up for our actual domain..(fcc_inc.com) Now What I need to do is set up the mapping to say if I (username: joeb) sends and e-mail use joe.blow instead of joeb.
 
One other thing, I do not have a /etc/sendmail.cf, I have a /etc/sendmail.cf file?

Is that what you are saying that is it might be in one of those two places?
 
Yes, it should be /etc/sendmail.cf (I was looking at AIX 5.2).

Regarding the mapping, if a user su - joe, and sends an email, it will have joe@whateverdomain.com

Is this what you want?
 
Lets say we have a user, Joe Something. Currently if he sends an e-mail it sends it out as joe@whateverdomain.com. We have an email provider and his actual email address is joe.something@whateverdomain.com. So, I want sendmail to replace joe with joe.something. So somebody can reply to the e-mail.
 
Okay. Where are you sending the email joe@whateverdomain.com from? from mail/mailx or somewhere else?
 
The joe@whateverdomain.com would be sent from the Unix box using sendmail. But I would want it to appear to be send from my pop mail account. In turn, if somebody were to reply to it, I would want it to come to my pop mail account, not back to the unix box.
 
Thanks, but it looks like that is for replacing the recipient of the e-mail. I am trying to replace the sender. I will keep looking.

Thanks for the help.
 
Is there something that I should be doing in the sendmail.cf file to get this genericstable file to show up?

 
Yes, this needs to be enabled in the sendmail.mc file and sendmail.cf re-created.
Check:
for instructions on how to do it.

This is why I'm not a big fan of sendmail :)

As an alternative, check out QMail



"If you always do what you've always done, you will always be where you've always been."
 
Did you figure out the problem?

Try running sendmail in those mode:

sendmail -bt

# make sure the domain is in class w:
$=w
# is the map working?
/map virtuser joe@yourdomain.com
/map virtuser jane@yourdomain.com
/map virtuser @yourdomain.com
# is the rewriting working?
3,0 joe@yourdomain.com
3,0 some@yourdomain.com

Checkout:
 
Nope, I do not have this working yet. I am running into problems trying to create those files that I need. When I run sendmail -bt I get an error saying that my alias file does not match or is out of date, something like that.
 
OK, when I try that, I am seeing the computername.mydomain.com, but not just mydomain.com.

Then when I try to use the map, it tells me that the map named "username" is not found.
 
Did you build the virtual user table?

makemap dbm /etc/mail/virtusertable < sourcefile

The sourcefile would be a textfile like this:

joe@yourdomain.com
joe+foo@yourdomain.com
joe+reallylongextrapart@yourdomain.com

 
Hi Crmayer

If you just want to get the replyed mail to john.doe@company.com. you can edit the /etc/aliases file:

johnd:john.doe@company.com





good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top