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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-20-2003, 09:06 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Rep:
|
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 
|
|
|
08-20-2003, 09:49 AM
|
#2
|
Member
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49
Rep:
|
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.
|
|
|
08-20-2003, 10:06 AM
|
#3
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Original Poster
Rep:
|
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...
|
|
|
08-20-2003, 10:24 AM
|
#4
|
Member
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49
Rep:
|
So check if you've got sendmail or postfix up and running on that machine. Try telnetting into port 25 and getting a reply.
|
|
|
08-20-2003, 10:49 AM
|
#5
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Original Poster
Rep:
|
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?:|
|
|
|
08-20-2003, 10:58 AM
|
#6
|
Member
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49
Rep:
|
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.
|
|
|
08-20-2003, 11:32 AM
|
#7
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Original Poster
Rep:
|
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 
|
|
|
08-20-2003, 11:37 AM
|
#8
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
08-20-2003, 12:15 PM
|
#9
|
Member
Registered: Aug 2003
Location: The Hague, The Netherlands
Distribution: Mandrake 9something, Gentoo
Posts: 49
Rep:
|
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é
|
|
|
08-21-2003, 05:58 AM
|
#10
|
LQ Newbie
Registered: Aug 2003
Location: Cape Town, South Africa
Distribution: Redhat7.3 via SSH
Posts: 11
Original Poster
Rep:
|
yeah there is a firewall + got a different mail relay that the host already had
thanx a lot 4 the help
ciao
ron
|
|
|
All times are GMT -5. The time now is 03:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|