LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2003, 09:06 AM   #1
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Rep: Reputation: 0
how do i find out my mail relay?


hey all

how do i find out my mail relay?
i have a script that i have seen working on another server i moved it over to mine and now need a mail relay?

what exactly is this or more importantly how do i know the one on my server?
do I have to set it up?
i am pretty clueless
 
Old 08-20-2003, 09:49 AM   #2
Iturbide
Member
 
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49

Rep: Reputation: 15
Don't know what you're doing exactly, but it sounds that the script wants the name of a machine running sendmail. Safest bet is to run sendmail or postfix and to point the script at localhost.
 
Old 08-20-2003, 10:06 AM   #3
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Original Poster
Rep: Reputation: 0
i want to run sendmail with the machine that the script is running on here is a piece of my script:
-------------------------------
my $mail_relay = "localhost";
my $mail_from = "ron.srnka\@winner-net.com";
my $mail_to = "ron.srnka\@winner-net.com";

my $smtp = Net::SMTP->new($mail_relay, Hello => "helo there") or die ("errrr");
--------------------------------
instead of localhost i have tried :
www.winner-net.com
www.winner-net.uk.com
winner-net.com
winner-net.uk.com

these are meaning less to you but anyway, it always dies when Net::SMTP->new is run...
 
Old 08-20-2003, 10:24 AM   #4
Iturbide
Member
 
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49

Rep: Reputation: 15
So check if you've got sendmail or postfix up and running on that machine. Try telnetting into port 25 and getting a reply.
 
Old 08-20-2003, 10:49 AM   #5
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Original Poster
Rep: Reputation: 0
sorry for being dumb:/

i have sendmail running:

[root@WINNERNET-01 libnet-1.16]# /etc/rc.d/init.d/sendmail start
Starting sendmail: [ OK ]
[root@WINNERNET-01 libnet-1.16]# /etc/rc.d/init.d/sendmail status
sendmail (pid 2529) is running...


ok i tried to telnet in here is the result:

[root@WINNERNET-01 maint]# telnet www.winner-net.uk.com 25
Trying 62.173.65.29...
telnet: connect to address 62.173.65.29: Connection refused

i got in with this and tried to send an email:
[root@WINNERNET-01 maint]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 WINNERNET-01 ESMTP Sendmail 8.11.6/8.11.6; Wed, 20 Aug 2003 17:38:55 +0100
set local_echo
500 5.5.1 Command unrecognized: "set local_echo"
Helo maint
250 WINNERNET-01 Hello localhost.localdomain [127.0.0.1], pleased to meet you
mail from:
501 5.5.2 Syntax error in parameters scanning "from"
mail from: ron.srnka@winner-net.com
250 2.1.0 ron.srnka@winner-net.com... Sender ok
rcpt to: ronsrnka@hotmail.com
250 2.1.5 ronsrnka@hotmail.com... Recipient ok
data hello ronny
354 Enter mail, end with "." on a line by itself
.
250 2.0.0 h7KGfm805112 Message accepted for delivery
quit
221 2.0.0 WINNERNET-01 closing connection
Connection closed by foreign host.


unfortunately the email never arrived at my ronsrnka@hotmail.com mailbox.

have any suggestions?:|
 
Old 08-20-2003, 10:58 AM   #6
Iturbide
Member
 
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49

Rep: Reputation: 15
Hmm. Running out of clues here. Anything in the logfiles? If you use this to send to a local user, does it arrive?

Just wondering.
 
Old 08-20-2003, 11:32 AM   #7
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Original Poster
Rep: Reputation: 0
log files! i never knew i am learning a damn lot from you thanks a lot anyway here are the results of your input/suggestions:

if i send to a local user it does get delivered:
and generates the following log(i dont think this is the whole transaction):

Aug 20 18:16:37 WINNERNET-01 sendmail[7241]: h7KHF4807152: to=maint@localhost, ctladdr=maint@localhost (501/501), delay=00:00:14, xdelay=00:00:00, mailer=local, pri=30009, dsn=2.0.0, stat=Sent



when i use the script if generates some entries in the log file here is a few piesce:

Aug 20 18:19:45 WINNERNET-01 sendmail[6672]: h7JEKun05151: to=ron.srnka@winner-net.com, ctladdr=apache (48/48), delay=1+02:58:49, xdelay=00:00:00, mailer=esmtp, pri=300049, relay=thsmtpb1.byworkwise.com., dsn=4.0.0, stat=Deferred: Connection timed out with thsmtpb1.byworkwise.com.

AND

Aug 20 18:19:45 WINNERNET-01 sendmail[6672]: h7JEKun05151: to=ron.srnka@winner-net.com, ctladdr=apache (48/48), delay=1+02:58:49, xdelay=00:00:00, mailer=esmtp, pri=300049, relay=thsmtpb1.byworkwise.com., dsn=4.0.0, stat=Deferred: Connection timed out with thsmtpb1.byworkwise.com.

it looks like it is using something else to do the relay?
but i do not understand why it keeps on timing out.

i am leaving work now(I am in South Africa it is 7pm now)
so i will check any responses first thing in the morning

Thanx
 
Old 08-20-2003, 11:37 AM   #8
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Original Poster
Rep: Reputation: 0
Here is the whole log entry of an attempt to send:

the first part starts the process and the 2nd is the timeout 10 minutes later

Aug 20 18:20:23 WINNERNET-01 sendmail[7483]: h7KHKN807483: from=<ron.srnka@winner-net.com>, size=90, class=0, nrcpts=1, msgid=<200308201720.h7KHKN807483@WINNERNET-01>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]Aug 20 18:30:23 WINNERNET-01 sendmail[7485]: h7KHKN807483: to=<ronsrnka@hotmail.com>, delay=00:10:00, xdelay=00:10:00, mailer=esmtp, pri=30090, relay=mx4.hotmail.com. [65.54.253.230], dsn=4.0.0, stat=Deferred: Connection timed out with mx4.hotmail.com.
 
Old 08-20-2003, 12:15 PM   #9
Iturbide
Member
 
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49

Rep: Reputation: 15
Don't worry too much about that relay word. It does seem however that your sendmail is unsuccessful in talking to any outside mailserver. That does not increase its usefulness.

Could it be you have outgoing connections on port 25 blocked by any chance? (perhaps your company has blocked it on the firewall, I don't know. In that case, use the company mail server as a relay host instead. You never know :-)) Have you used sendmail on this machine successfully before (to send mail to the world, that is.)

cheerio,

René
 
Old 08-21-2003, 05:58 AM   #10
spako
LQ Newbie
 
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11

Original Poster
Rep: Reputation: 0
yeah there is a firewall + got a different mail relay that the host already had

thanx a lot 4 the help
ciao
ron
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using sendmail to relay mail to ISP mail server Swift&Smart Linux - Software 26 11-09-2008 03:00 PM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
Mail Relay romel Debian 9 12-14-2003 11:28 PM
RH 9.0 MAil Relay clintonm9 Linux - Software 1 06-24-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:48 AM.

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