The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SCO 5.0.7 Sendmail. Need help on how to configure SMTP miles556 SCO 3 02-22-2008 10:28 PM
C Smtp grotesque High Level Programming 1 02-15-2008 07:55 AM
Enabling sendmail with SMTP adel8483 SUN Solaris 2 02-18-2007 11:32 AM
SMTP with sendmail 0ktalmagik IP Networking 1 05-11-2006 01:31 AM
Smtp vtran4270 UNIX for Advanced & Expert Users 1 12-10-2002 05:24 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-09-2007
KenLynch KenLynch is offline
Registered User
  
 

Join Date: Jan 2007
Location: Dublin, Ireland
Posts: 15
Sendmail & SMTP

I have searched this forum extensively and can't seem to find a workable solution to my sendmail issue, but that could be down to my own lack of knowledge so please bear with me...

I am using a Sun Solaris 9 box to try and send e-mail to external addresses. The Unix box is not an e-mail server. Our e-mail is done through a third party ISP i.e. POP3 accounts, complete with user names and passwords.

I'm using sendmail version 8.12.2+Sun and I have made a number of changes (rightly or wrongly) to /etc/mail/sendmail.cf & /etc/init.d/sendmail based on details found on www.kempston.net.

The problem I'm having is this.

When I send a mail to my external address the mail is queued, I can see it in mailq, but it never gets sent.

I can telnet onto port 25 and can see sendmail is running.

I can also see send mail running when I us "ps".


root 5392 1 0 12:13:45 ? 0:00 /usr/lib/sendmail -bd -X /var/log/mail.log -oL9
smmsp 5393 1 0 12:13:45 ? 0:00 /usr/lib/sendmail -Ac -q15m


NOTE: I edited /etc/init.d/sendmail to add the "-X /var/log/mail.log" line ...

The changes to the /etc/mail/sendmail.cf are as follows:

! # "Smart" relay host (may be null)
! DSmailhost$?m.$m$.


Changed to read.....

! # "Smart" relay host (may be null)
! DSmail.mailhost.com


Where mail.mailhost.com is the SMTP server.

! # avoid connecting to "expensive" mailers on initial submission?
! O HoldExpensive=False


Changed to read ......

! # avoid connecting to "expensive" mailers on initial submission?
! O HoldExpensive=True


Added in an entry to read ......

- # Don't Use DNS
- O ResolverOptions=-DNSRCH


Also changed line .....

! Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,

Added in "e" after "F=".....

! Mrelay, P=[IPC], F=emDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,


And also added in rule S11 ....

- S11
- R$* $@ me@domain.com


Where me@domain.com is my actual e-mail address .....

I have also edited the /etc/hosts file to include:

xxx.xxx.x.x servername servername.domain loghost

Where the domain part is the text after the @ of my mail address, the IP is local.

And also added

xxx.xx.xx.x mail.mymailhost.com mailhost

Where the mymailhost is the SMTP server and the IP is the primary DNS IP

When I run the following command:

/usr/lib/sendmail –d0.1 –bt < /dev/null

I get the following output …

# /usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.12.2+Sun
Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS PIPELINING SCANF USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = servername
(canonical domain name) $j = servername.domain
(subdomain name) $m = domain
(node name) $k = servername
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>



I have been testing this with the following simple script:

# more send_mail

SUBJ="Send mail from Unix with file attachments"
TO=me@domain.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
!

cat << !
HOPE THIS WORKS
you got the mail from sendmail utility
!

uuencode test.txt test.txt

) | /usr/lib/sendmail -v ${TO} ${CC}
#


Which produces the following output:

me@domain.com... Connecting to localhost via relay...
220 servername.domain ESMTP Sendmail 8.12.2+Sun/8.12.2; Tue, 9 Jan 2007 14:30:09 GMT
>>> EHLO servername.domain
250-servername.domain Hello localhost [xxx.x.x.x], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<me@servername.domain> SIZE=194
250 2.1.0 <me@servername.domain>... Sender ok
>>> RCPT To:<me@domain.com>
>>> DATA
250 2.1.5 <me@domain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l09EU9aE007093 Message accepted for delivery
me@comain.com... Sent (l09EU9aE007093 Message accepted for delivery)
Closing connection to localhost
>>> QUIT
221 2.0.0 servername.domain closing connection


The mailq produces the following:

# mailq
/var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
l09EU9aE007093 122 Tue Jan 9 14:30 <me@servername.domain>
<me@domain.com>
Total requests: 1
#


The log file /var/log/mail.log looks like this:

# more mail.log

07093 >>> 220 servername.domain ESMTP Sendmail 8.12.2+Sun/8.12.2; Tue, 9 Jan 2007 14:30:
09 GMT
07093 <<< EHLO servername.domain
07093 >>> 250-servername.domain Hello localhost [xxx.x.x.x], pleased to meet you
07093 >>> 250-ENHANCEDSTATUSCODES
07093 >>> 250-PIPELINING
07093 >>> 250-EXPN
07093 >>> 250-VERB
07093 >>> 250-8BITMIME
07093 >>> 250-SIZE
07093 >>> 250-DSN
07093 >>> 250-ETRN
07093 >>> 250-DELIVERBY
07093 >>> 250 HELP
07093 <<< MAIL From:<me@servername.domain> SIZE=194
07093 >>> 250 2.1.0 <me@servername.domain>... Sender ok
07093 <<< RCPT To:<me@domain.com>
07093 >>> 250 2.1.5 <me@domain.com>... Recipient ok
07093 <<< DATA
07093 >>> 354 Enter mail, end with "." on a line by itself
07093 <<< Received: (from root@localhost)
07093 <<< by servername.domain (8.12.2+Sun/8.12.2/Submit) id l09EU9h8007089
07093 <<< for me@domain.com; Tue, 9 Jan 2007 14:30:09 GMT
07093 <<< Date: Tue, 9 Jan 2007 14:30:09 GMT
07093 <<< From: me@servername.domain
07093 <<< Message-Id: <200701091430.l09EU9h8007089@servername.domain>
07093 <<< To: me@domain.com
07093 <<< Subject: Send mail from Unix with file attachments
07093 <<<
07093 <<< HOPE THIS WORKS
07093 <<< you got the mail from sendmail utility
07093 <<< begin 444 test.txt
07093 <<< >5&AI<R!I<R!A('1E<W0@;6%I;"!F<F]M($ME;BX*
07093 <<<
07093 <<< end
07093 <<< .
07093 >>> 250 2.0.0 l09EU9aE007093 Message accepted for delivery
07093 <<< QUIT
07093 >>> 221 2.0.0 servername.domain closing connection


I can see the message in queued in /var/spool/mqueue

So why is it not reaching the destination e-mail account?

What am I missing?
 

Bookmarks

Tags
sendmail

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0