Operating System - HP-UX
1834921 Members
3083 Online
110071 Solutions
New Discussion

Help w/ Sendmail configuration...

 
scott vick
Advisor

Help w/ Sendmail configuration...

Hello,

I don't know a great deal about Sendmail, so please be gentle.

How do you configure the "From:" display for a user. I have a user who wants the "From:" display to be the same from all of the systems that he gets mail from.

All help is appreciated.
Too ugly to live, too weird to die, too stupid to know the difference.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Help w/ Sendmail configuration...

I'm attaching a script.

If you read it carefully, you will see how in a sendmail script the from: is set.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
scott vick
Advisor

Re: Help w/ Sendmail configuration...

Thanx for the response, but that's not what I was really looking for. I guess I didn't explain myself well enough. I've included a generic scenario to try and explain better.

I have a user whom we'll called bill_king. Bill wants the e-mails generated from his cron and batch jobs to have the following format:
From: Bill King (bill_king@company.com)

How do I configure senmail to show the above "alias" for Bill's account whenever it sends out an e-mail?
Too ugly to live, too weird to die, too stupid to know the difference.
Steven E. Protter
Exalted Contributor

Re: Help w/ Sendmail configuration...

all this depends on how you generate the email out of cron.

WE generally use mailx. It has limited abilities in this error.

You can use the prior script as follows.

Send output from cron to a file and use mailfile2 to send the output as an attachment.

We don't do that.

Here is another approach:

lets say the user name is bill

in /etc/mail/aliases

bill@company.com: bill


tab delimited.

To make this work, you may need to compile sendmail macros. See the script http://www.hpux.ws/buildmail.hpux.text

Another approach is:
/etc/mail/virtusertable

bill@company.com bill

tab delimited no colon

/etc/mail/genericstable

bill bill@company.com

tab delimited.

Also, the sendmail database is compliled by the script linked in above.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com