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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP server and Unix mail programs

Status
Not open for further replies.

nivone

Programmer
Jul 2, 2002
33
IL
HI,

There are many ways for sending mail from a Unix box, mailx, mail, sendmail, mailx that uses sendmail and smtpmail and as I search the Interent I find more bizar ways to send emails from Unix.
My question is simple, and yet I couldn't find an answer on the net.
Suppose I use mailx for sending out emails, do I need to have a SMTP server? Is there a way to send emails with mailx without configuring a SMTP server?

I'm a developer, and the product that I work on sends mails with mailx. I have written a SMTP client to replace the mailx, but I'm not sure how the customers will react.

Working with SMTP requires SMTP server, but I'm not sure that they have one since I don't fully understand how mailx sends emails.

Thanks

Nivo
 
Which Unix?

It will always need to use an SMTP server somewhere, although it doesn't have to be configured on the localhost.

On Solaris mailx calls sendmail -i address@somewhere so it still depends on sendmail.

Annihilannic.
 
Thanks for your reply Annihilannic.

Regarding your question: AIX, SUN, HP, OSF, Linux, NCR, Unixware and irix
 
My guess is that the most portable way (and least work for you) would be to call sendmail directly (although I have little experience of HP-UX, OSF/1, NCR and Irix).

Annihilannic.
 
As an example, on our AIX systems the security guys insist that the sendmail service is shut down unless esential. As we don't receive any incoming mail we have the service disabled. However sending mail out works fine using sendmail.

Columb Healy
 
mailx does invoke the local sendmail. The local sendmail.cf must be configured correctly to route mail. By default, many are setup to relay to "mailhost", so if that name/MX exists, it will automagically relay to that host. If you don't assign that name, then mail can only be locally delivered with most out of the box sendmails and sendmail.cf(s).

I believe by using mailx without a daemon you will lose the periodic queue management. If the relay is down, it will queue the message but there is no daemon to periodically retry sending the message.

I manage the sendmail where I work, but I would say most sites are leery of running it on any or all systems.

Most of my apps tend to specify:

the smtp server/relay
the port number(25)
login/password if authentication is required AND the application is "spoofing" a virtual user.

Then the application itself manages it's own mail queue.
I can think of 3 such examples that we run that work this exact method.

Often, we queue to the local running sendmail, but I don't think in the general case that is true.

 
Suggest they use qmail instead of sendmail loads easier to configure and 100% more secure.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top