Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi ,
i have solaris machine i use to send mails to some email addresses daily , but i could n't able to send mails. with this command #mail -s "subj" address@a.com < file
for sending mail with MAIL command , is any configuration to the machine is required..
I TRIED MAILX command also no use
pls help me.
Last edited by ravi sankar; 01-20-2011 at 03:37 AM.
Also, if you're using Solaris 10, you have to make sure sendmail is configured to email stuff outside the system (it defaults to local-only, and will be reset when you patch the server).
1) If it's Solaris 10, do this;
svcprop -p config/local_only sendmail
If it says "true"...
By chance have you made any changes to the /etc/mail/sendmail.cf file?
Have you configured a domain name on the server? (the dnsdomainname command)
The service has started, right? (you see it when you 'ps -ef', and 'svcs -av|grep smtp' shows it as enabled?)
Also, this might help.
Well, I think I mentioned something about that in my previous post;
Quote:
Have you configured a domain name on the server? (the dnsdomainname command)
Yep, there it is. Of course, I was a little off, the actual command is just 'domainname'.
You'll want to make sure you set your domainname on the server.
Example:
If the hostname is "lone_server" and your DNS domain is "lone-network.org" (which would make your FQDN 'lone_server.lone-network.org'), then you would simply run;
Code:
domainname lone-network.org
As for "where the hostname goes"
On Solaris, you should have an /etc/hostname.nic file (one for each plumbed device. Example:
/etc/hostname.bge0
/etc/hostname.hme0
/etc/hostname.e1000g0
Each one of these files contains just one line; the DNS name that the nic is supposed to respond to.
That DNS name is going to have to be in your /etc/hosts file (because the system will lookup the IP address at boot).
You might also want to google the exact error message that's popping up in your /var/log/mail.log
Here's the man page
Code:
System Administration Commands domainname(1M)
NAME
domainname - set or display name of the current domain
SYNOPSIS
domainname [name-of-domain]
DESCRIPTION
Without an argument, domainname displays the name of the
current domain name used in RPC exchanges, usually referred
to as the NIS or NIS+ domain name. This name typically
encompasses a group of hosts or passwd entries under the
same administration. The domainname command is used by vari-
ous components of Solaris to resolve names for entries such
as are found in passwd, hosts and aliases. By default, nam-
ing services such as NIS and NIS+ use domainname to resolve
names.
With appropriate privileges (root or an equivalent role [see
rbac(5)]), you can set the name of the domain by specifying
the name as an argument to the domainname command.
The domain name for various naming services can also be set
by other means. For example, ypinit can be used to specify a
different domain for all NIS calls. The domain name of the
machine is usually set during boot time through the domain-
name command by the svc:/system/identity:domain service. If
the new domain name is not saved in the /etc/defaultdomain
file, the machine reverts to the old domain after it
reboots.
The sendmail(1M) daemon, as shipped with Solaris, and the
sendmail implementation provided by sendmail.org (formerly
referred to as "Berkeley 8.x sendmail") both attempt to
determine a local host's fully qualified host name at
startup and both pursue follow-up actions if the initial
search fails. It is in these follow-up actions that the two
implementations differ.
Both implementations use a standard Solaris or Unix system
call to determine its fully qualified host name at startup,
following the name service priorities specified in
nsswitch.conf(4). To this point, the Solaris and
sendmail.org versions behave identically.
If the request for a fully qualified host name fails, the
sendmail.org sendmail sleeps for 60 seconds, tries again,
SunOS 5.10 Last change: 8 Mar 2006 1
System Administration Commands domainname(1M)
and, upon continuing failure, resorts to a short name. The
Solaris version of sendmail makes the same initial request,
but then, following initial failure, calls domainname. If
successful, the sleep is avoided.
On a Solaris machine, if you run the sendmail.org version of
sendmail, you get the startup behavior (omitting the domain-
name call) described above. If you run the Solaris sendmail,
the domainname call is made if needed.
If the Solaris sendmail cannot determine the fully qualified
host name, use check-hostname(1M) as a troubleshooting aid.
This script can offer guidance as to appropriate corrective
action.
FILES
/etc/defaultdomain
/etc/nsswitch.conf
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWcsu |
|_____________________________|_____________________________|
SEE ALSO
NIS+(1), nischown(1), nispasswd(1), svcs(1), check-
hostname(1M), hostconfig(1M), named(1M), nisaddcred(1M),
sendmail(1M), svcadm(1M), ypinit(1M), sys-unconfig(1M),
aliases(4), defaultdomain(4), hosts(4), nsswitch.conf(4),
passwd(4), attributes(5), rbac(5), smf(5)
NOTES
The domainname service is managed by the service management
facility, smf(5), under the service identifier:
svc:/system/identity:domain
SunOS 5.10 Last change: 8 Mar 2006 2
System Administration Commands domainname(1M)
Administrative actions on this service, such as enabling,
disabling, or requesting restart, can be performed using
svcadm(1M). The service's status can be queried using the
svcs(1) command.
SunOS 5.10 Last change: 8 Mar 2006 3
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.