How to adjust hostname info for Sendmail

Hello folks,When sending mail from the command line in Solaris, the emails always say they are from admin@solarixbox.example.comWhat I'd like instead would be admin@example.comWhat file must I edit to make this happen?Many thanks in advance.Lurch
[289 byte] By [Lurch99a] at [2007-11-26 13:23:34]
# 1

You need to generate a new sendmail.cf.

On solaris 9 cd to /usr/lib/sendmail/cf

copy main.mc to local.mc

edit it and add the line

MASQUERADE_AS(example.com)

before the MAILER lines

do a "make local.cf".

Copy local.cf to /etc/mail/sendmail.cf

and restart sendmail.

On solaris 10, the process is similar, but the directory involved is /etc/mail/cf/cf

robert.cohena at 2007-7-7 17:56:10 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

It also heavily depends what you use to send the mail. Normally the so called MUA (mail user agent) can set its own 'from' adress. So, suppose you're using the 'mail(1)' command tool then all you'd need to do is include a 'From:' header.

IMO thats a lot better than to mess with sendmail since modifying sendmail behaviour will change this system-wide, so all users who send mail will have the same kind of from domain, which isn't always what you want.

Lion-Oa at 2007-7-7 17:56:10 > top of Java-index,Solaris Operating System,Solaris 10 Features...