Sending email


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sending email
# 1  
Old 02-16-2005
Error Sending email

I have an Solaris 8 machine running a managment application. One of the features of this application is to configure alarm forwarding to an email undress.

When i configured the application to do that, it asked me only about the recipient email address.

Quesiton: how to configure my Solaris 8 machine to send emails.
i added a default gateway, and i don't have a DNS server.
i can ping the mail server.

Waiting for your urgent answer.
# 2  
Old 02-16-2005
Set your sendmail to send mail to the mail server. Look in /etc/mail/ for sendmail.cf - save a copy of it - edit it and look for Smart relay host. Put your mailserver host/domain in as the relay.

Example:
# "Smart" relay host (may be null)
DSmymailserver.mydomain.com

Test that Sendmail is 'happy' with everything:
$ /usr/lib/sendmail -d0.1 -bt < /dev/null

This command will give you output of the sendmail config - if you aren't running DNS, you have a major problem since sendmail works with DNS to insure a your server doesn't become a illegal mail relay. See the Sendmail FAQ for trying to set up sendmail without DNS.
# 3  
Old 02-17-2005
i tried it and this is the result....

root@inc1 # $ /usr/lib/sendmail -d0.1 -bt < /dev/null
$: not found
root@inc1 # /usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.11.6+Sun
Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS
QUEUE SCANF SMTP USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = inc1
(canonical domain name) $j = inc1.
(subdomain name) $m = <null>
(node name) $k = inc1
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> root@inc1 #


do you think it will not work if i don't have a domain name or if i am not configured with a DNS?????
# 4  
Old 02-17-2005
You need to read the FAQ on sendmail's site - link was provided in other post.
# 5  
Old 02-17-2005
hi again;

is there a special format i should put my hostname in my /etc/hosts??

thanks
# 6  
Old 02-20-2005
This is really confusing:

in /etc/hosts i added.

<IP> myhost myhost.domainname
<IP> mailserver mailhost mailserver.anotherdomainname

i can ping the mail server and telnet to port 25 and send an email from there.

i changed the configuration of sendmail.cf as described above by our freind RTM.

i am trying to send mail like this:
mail from root@inc1
to: name@anotherdomainname
this is a test mail
.

but still the mail is not received.!!!!
# 7  
Old 02-21-2005
What happens to the mail? Check /var/adm/messages (or check your /etc/syslog.conf for where email errors are logged to - look for mail) for the errors if any.

% grep mail /etc/syslog.conf
daemon.none,cron.info,user.info,mail.none /var/logs/messages
kern.info,cron.info,auth.info,mail.none /var/logs/syslog
mail.info /var/logs/maillog

In this example, you would look for the messages in /var/logs/maillog - messages will look something like this:


Feb 21 09:50:43 console2 sendmail[12716]: j1LEodnO012713: to=<john.smith@mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120356, relay=p00.mydomain.com. [172.16.1.35], dsn=2.0.0, stat=Sent (Ok.)
Feb 21 09:50:43 console2 sendmail[12718]: j1LEodnO012714: to=<john.doe@mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120358, relay=p00.mydomain.com. [172.16.1.35], dsn=2.0.0, stat=Sent (Ok.)


Also, check to see if mail is still waiting to go out - use the mailq command - it may show why the email has not gone.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Sending an email using mutt...

I wanted to send "config.log" to the usergroup that handles open source support for Octave 3.8.0, a programming language as there were build errors. In order to send an email from unix command line, I am trying to use mutt, and I need a straightforward way of sending emails, as the commands... (1 Reply)
Discussion started by: jon80
1 Replies

2. Shell Programming and Scripting

Sending HTML Email

1) Can you please provide me with a best example of how to send an HTML email via mutt or mail or send email commands using bash shell. 2) I tried below but i am not able to get the variable values in the HTML email output. (cat <<-EOT <html> <head><title></title> </head> <body> <p>Hello,... (9 Replies)
Discussion started by: Ariean
9 Replies

3. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

4. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

5. UNIX for Advanced & Expert Users

Sending email to different domain

Hi, I am looking for info based on direct experience in using DataStage EE with Unix. A scenario in the client remote desktop I work for company Switch, my client is Master. Notification Activity Stage (IBM Asential Data Stage component) SMTP Mail server name is blank. Sender... (1 Reply)
Discussion started by: dsnaveen
1 Replies

6. Linux

sending an email

I have used an already-built ActiveX control to send email from my asp web pages. One of the parameters I fill is FromName which defines the tittle the recipient will see in the From entrance in his Inbox. Now Iīm trying to use mail to send an email from a Shell but I havenīt found the... (1 Reply)
Discussion started by: RandomAccess
1 Replies

7. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

8. Shell Programming and Scripting

sending an attachment through email

As a part of requirement I need to send out mails with attachment from UNIX. I have to take query the Oracle DB and send the result of the query in an attachment through mail. I use the following script for the same. #!/bin/csh #!/bin/bash #!/bin/ksh ATTFILE=/folder1/test.xls cd... (1 Reply)
Discussion started by: Sgiri1
1 Replies

9. Programming

Sending email to a User from C++

How do i send a mail to User from c++? (1 Reply)
Discussion started by: debu
1 Replies

10. UNIX for Dummies Questions & Answers

sending email

hi, is there any possiblity to send email from the command prompt, for eg i want to send alert to any mail id like /data/logs is 80% to my hotmail account , xxx@hotmail.com is this really possible,, if not, then what are the prerequistes need to do this (1 Reply)
Discussion started by: vasikaran
1 Replies
Login or Register to Ask a Question