Ubuntu - Mailx config

Posted on 2007-04-10
Last Modified: 2013-12-15
OS: Ubuntu 6.06

I need to change the SMTP server name/ip that mailx uses to send email through?

Instead of sending mail via our ISP I want to change it to go through our exchange server. If its local, it then doesn't have to leave the building.
Question by:virtualworks
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 31

Expert Comment

ID: 18884591
I suppose someone told mailx what SMTP server to use during initial setup. This must be possible to edit. At what point do you experience a problem?
LVL 24

Expert Comment

ID: 18886414
There are a few ways to point mailx to an smtp server.  So, it really depends on "how" it was done.  For a start, I would recommend you to try to check:

$ echo $smtp
$ cat ~/.mailrc

and see if you can get a clue there.

Author Comment

ID: 18887747
I didn't set the machine up - I have inherited it. I also have no idea how it was done.

the echo $smtp command returned a blank line.

the cat `/.mailrc returned a new line with a >

I was logged in as root when I ran the commands.

Any ideas?
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

LVL 24

Expert Comment

ID: 18887776
Could you check if you have /etc/mail/mailx.rc or /etc/mail/Mail.rc and if you have them what are their content?

Author Comment

ID: 18887827
I have /etc

but I do not have /etc/mail folder
LVL 24

Expert Comment

ID: 18887892
Try locating the files then:

# locate mailx.rc
# locate Mail.rc

Author Comment

ID: 18888562
location was /etc/mail.rc

contents are as follows:

set ask askcc append dot save crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To
LVL 24

Accepted Solution

slyong earned 125 total points
ID: 18892769
Ubuntu uses Postfix as the default MTA.  Could you check /etc/postfix/ if there is a relayhost entry in it?

Author Comment

ID: 18896278
And that's exactly where the old setting was!



Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question