cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail and su

Andrew Young_2
Honored Contributor

sendmail and su

Hi.

I am sending email from a batch processing system which uses su to set up the correct users. I have recently upgraded from sendmail 8.11 to sendmail 8.13.3

Emails are now being sent with logname and not the real ID as the sender.

Any ideas how to change this behavior?

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes
3 REPLIES
Rita C Workman
Honored Contributor

Re: sendmail and su

It sounds like a scripting problem, but I'm not sure I am getting a clear picture.

logname? Do you mean login id?

Are you trying to change the FROM address for each user that your batch processing does it's "su" to?

To change the FROM, you could:

Create a file /etc/mail/userdb
Edit this file with the format:
:mailname
:maildrop

Example to change root to my addr:
root:mailname rita.workman@mycom.com
rita.workman@mycom.com:maildrop root

You would do this for each user in the file, then run:

#makemap btree /etc/mail/userdb.db < /etc/mail/userdb

Edit /etc/mail/sendmail.cf and unrem the following line:
O UserDatabaseSpec=/etc/mail/userdb.db

Stop/start sendmail
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

/rcw
Dennis Handly
Acclaimed Contributor

Re: sendmail and su

>which uses su to set up the correct users.

Are you using su or "su -"?
Andrew Young_2
Honored Contributor

Re: sendmail and su

Hi.

To confirm su -

Regards

Andrew Y
Si hoc legere scis, nimis eruditionis habes