LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 01-20-2011, 03:35 AM   #1
ravi sankar
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Rep: Reputation: 0
problem in sending mails with solaris


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.
 
Old 01-20-2011, 04:01 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Greetingz!

Well, not that I've tried your way to send emails, however you might want to consider this;
Code:
cat filename | mailx -s "Subject Line" user@domain.com
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"...

2) Then do this;
svcadm disable sendmail && svccfg -s svc:/network/smtp:sendmail setprop config/local_only = false
svcadm refresh svc:/network/smtp:sendmail && svcadm enable svc:/network/smtp:sendmail

3) Then check the config again;
svcprop -p config/local_only sendmail
It should say "false" this time around.

Rememeber: If you patch the server, the service reverts back to the defaults!

Last edited by xeleema; 01-20-2011 at 04:36 AM.
 
Old 01-20-2011, 04:14 AM   #3
ravi sankar
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Original Poster
Rep: Reputation: 0
even also i couldn't able to get mail in my inbox
if i use this command
#svcprop -p config/local_only sendmail
given false
 
Old 01-20-2011, 04:43 AM   #4
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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.
 
Old 01-20-2011, 05:43 AM   #5
ravi sankar
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Original Poster
Rep: Reputation: 0
lets these things aside ,

pls tell me , in which places hostname must be present like /etc/hosts , while sending mail with MAIL command

initially i got error message like unable to qualify hostname
 
Old 01-20-2011, 07:15 AM   #6
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
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
Happy hunting!

Last edited by xeleema; 01-20-2011 at 07:17 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending mails through zimbra gokahd Linux - Software 1 12-13-2008 06:52 PM
Problem sending e-mails from K-Mail client through Exchange Server kaplan71 Linux - Software 2 12-01-2008 01:49 PM
Sending mails sanjibgupta Linux - General 1 06-08-2006 05:40 PM
Iptables problem sending mails Tekorei Linux - Networking 2 02-16-2006 07:56 PM
Problem sending nonlocal mails in sendmail s1mpl1c1ty Linux - Newbie 4 08-29-2005 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration