Configuring Sendmail in Solaris

I have a solaris 8, that I'd like to configure a sendmail. However, I am very new to this and I have not a clue where to begin.  I have sendmail running on the system when I checked the processes, but I don't know how to configure sendmail.cf file to put to a POP3 mail server.  What I am trying to do is send mail from the SUN box to a the corporate mail server.  Please help.
samdebAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
fim32Connect With a Mentor Commented:
can you clarify your use of the telnet xxxxx?  that's a method of manually testing the connectivity, but if the sendmail.cf file is set up, you should just be able to use the sendmail command:

echo 'test' | /usr/lib/sendmail user@wherever

by forwarding all mails through the remote relay, you're not limiting sending of mails to users of the relay server, you're relying on the remore server to continue relaying your messages out.

to send to groups of users, you can do:
echo 'test' | /usr/lib/sendmail user1@wherever user2@wherever...

if you want to try to set up a group, you'll have to use aliases.  but since you'd have to enable local mail processing (running sendmail as a process) to do that.  your other alternative is to set up a group on your relay mail server (like setting up a mail group on the corporate mail server, and sending mails through that)
0
 
fim32Commented:
well, there's no need to POP3 anything, if all you want to do is forward mail to the corporate mail server.  in particular, when mail servers talk to one another, they use SMTP.  POP3, IMAP, and the other, fancier protocols are for user interaction

mainly, it's a question of domains.  if you're running the default sendmail.cf file, it sends mail through a relay server named "mailhost.yourdomain.com" or "mailhost" if solaris hasn't been set up with a domainname.

you got 2 choices.  you can make solaris discover outbound mail servers on it's own (by unsetting the relay variable) or you can just tell it to forward all mail to the mailhost server (like setting your corporate mail server as your mailhost server).
0
 
samdebAuthor Commented:
I have done all these.  I have define dns in resolv.conf, and sswitch.conf and the host is using FQDN in hosts file entry.  Do I need to configure anything in sendmail.cf.  That file looks very confusing to me.  And how or where do I specified the IP address or the hostname of the corporate mail server.  The corporate mail server is the one that is going to be mailhost server.  Byt the way thanks for your answer.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
fim32Commented:
then this'll be much easier :P  you don't have to go too far down the sendmail.cf file, after a certain point, when you see what looks like a whole lot of garbage (but is actually mail processing rules), that part is entirely generated.

the variable we'll look at is "DS", the line before should say "Smart" relay host (may be null), it should say:
DSmailhost$?m.$m$.

which translates to mailhost.`domainname`

if it's blank, or something different, or, if you already have a name fro you corp mail server you want to use, liek "bob" or "bob.mycompany.com", then you just set it:
DSbob
or
DSbob.mycompany.com.

otherwise, just edit the mailhost entry in your /etc/hosts file:
x.x.x.x mailhost mailhost.yourdomain.com

lastly, as this host doesn't look like it'll be receiving any mails, you can disable running sendmail as a process (pkill sendmail), and then just try sending mails out:
echo "test" | /usr/lib/sendmail you@yourdomain.com
0
 
samdebAuthor Commented:
Thanks, I'll give it a try and I'd let you know the outcome
0
 
samdebAuthor Commented:
Thank you very much for all your help.  However, what the users want is something weird. They just want me to send them a log of a job on the server to their inbox on corporate mail.  I think sendmail is perfect for this.  However, their are groups of them.  Is there a place in sendmail.cf where you can define a group.  So I can send the log to this group.  

One other thing I realize is that in other for me to send mail using sendmail, I had to first use this command:

telnet xx.xx.xx.xx 25

then MAIL FROM:<username@domain.com>
RCPT TO:<username@mailserver.domain.com>
DATA

I then have to use QUIT to end this session.

My question is, is there a way for me to configure all of these so I don't have to specifie recipient mailserver.  I am not going to know the external mail server addresses.  More so, I don't want to be suing this command every time I wanna send e-mail.

The server is not going to receive any e-mail what so ever. It just sends it.

Thanks a million.
0
 
samdebAuthor Commented:
It works using this command
echo 'test' | /usr/lib/sendmail user@wherever

But it sends it in a BC (blind copy), how can I make it look like it is sending it from and To the recipents.

I am going to accept your comments on your next reply, I think you have done a lot by helping me

Thanks again
0
 
TintinCommented:
man mailx
man aliases
0
 
fim32Commented:
been a while :P

well, actually using
  echo 'test' | /usr/lib/sendmail user@wherever
instructs sendmail to do what it has to do to get the mail out, but by default sendmail doesn't set headers.  if you'd like default header performance, you can do something like this:

cat <<END | /usr/lb/sendmail user@wherever
To: user@wherever
Wrom: STTZRCL
Subject: this is my subject
here is the text of my email
END

that's all it takes to set headers. OR, you can use mail wrappers, like mailx as tintin has suggested.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.