LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to send an email within a script??? (https://www.linuxquestions.org/questions/programming-9/how-to-send-an-email-within-a-script-477943/)

johnsanty 08-27-2006 11:24 PM

How to send an email within a script???
 
Hi All,

Basically, I want to create a script which send an email if any of the condition is not met. So, it's like an alarm. So now, my problem is how to open an email to send a message from a script. Could anybody give me an idea...

I have tried the following commands but to no avail. There was no error when I run the script, but I didn't receive any email. Is there anything I need to setup beforehand? Thanks for your prompt reply...

mail -s "john" johnsanty@yahoo.com < hello.txt

or

cat hello.txt | mailx -s Subject johnsanty@yahoo.com

My Distribution is Fedora C5.



John

drj000 08-28-2006 12:47 AM

You need to give more information. What error messages are you getting (if at all), when you try that? Both of those commands should work, if everything is set up properly.
You need sendmail working to use those. Are you sure you have sendmail installed and working? rpm -q sendmail will tell you if it's installed. It will give you the name and version number, or if it's not installed, it'll say package sendmail is not installed.
If it's not installed, install it by doing (as root), yum install sendmail, then follow the following steps once it's installed.
If it's installed, you have to check that it's actually started up. As root, type service sendmail status.
I think it should say Checking for service sendmail: [OK], if it's working properly. If it's not running, you can start it with service sendmail start, and to ensure it starts when you boot up next time, then type chkconfig sendmail on.
If it's installed, and running properly, then the problem could very well be your ISP. Some ISP's block outgoing mail if it's not send through their SMTP server (SBC, for example, does that).

kstan 08-28-2006 12:52 AM

Probably the mail server consider the sender as spam, have you check the junk mail folder?

Quigi 08-28-2006 10:34 AM

You'd use "mailx" under Solaris, "mail" under Linux. The redirections ("cat hello.txt | command" and "command < hello.txt") are in their effect equivalent. You don't absolutely need the sendmail *package*; e.g., qmail provides a perfect replacement (and claims to be secure).

aluser 08-28-2006 10:48 AM

It's quite possible that your MTA isn't configured correctly. If so, the 'mail' program could run without errors, but the message could still fail to send and you'd see errors in a logfile somewhere in /var/log/*

Unfortunately I don't even know what mta fedora uses by default, let alone how to tweak it.

johnsanty 08-28-2006 07:56 PM

Quote:

Originally Posted by drj000
You need to give more information. What error messages are you getting (if at all), when you try that? Both of those commands should work, if everything is set up properly.
You need sendmail working to use those. Are you sure you have sendmail installed and working? rpm -q sendmail will tell you if it's installed. It will give you the name and version number, or if it's not installed, it'll say package sendmail is not installed.
If it's not installed, install it by doing (as root), yum install sendmail, then follow the following steps once it's installed.
If it's installed, you have to check that it's actually started up. As root, type service sendmail status.
I think it should say Checking for service sendmail: [OK], if it's working properly. If it's not running, you can start it with service sendmail start, and to ensure it starts when you boot up next time, then type chkconfig sendmail on.
If it's installed, and running properly, then the problem could very well be your ISP. Some ISP's block outgoing mail if it's not send through their SMTP server (SBC, for example, does that).

Hi drj,

This is what I got I executed the commands checking for the status of the sendmail. It seems it is installed and running. Is there any work around on how to unblock outgoing mail if it's not send through the SMTP server? Do I need to set up my email using my ISP pop server...Thanks for your prompt reply...

[root@john ~]# rpm -q sendmail
sendmail-8.13.5-3
[root@john ~]# service sendmail status
sendmail (pid 2938 2305 2301 2296) is running...

johnsanty 08-28-2006 08:11 PM

Quote:

Originally Posted by aluser
It's quite possible that your MTA isn't configured correctly. If so, the 'mail' program could run without errors, but the message could still fail to send and you'd see errors in a logfile somewhere in /var/log/*

Unfortunately I don't even know what mta fedora uses by default, let alone how to tweak it.


Hi aluser,

The following is what I got ferom the maillog.Can you see anything wrong with the log? How could I configure my MTA. Could you give me an idea...Sori m pretty much novice with Linux system... Thanks for your prompt reply...

Aug 28 20:42:52 john sendmail[2935]: k7T0gqLA002935: to=johnsanty@yahoo.com, ctladdr=johnsanty (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30054, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7T0gq6H002936 Message accepted for delivery)

johnsanty 08-28-2006 09:04 PM

Quote:

Originally Posted by drj000
You need to give more information. What error messages are you getting (if at all), when you try that? Both of those commands should work, if everything is set up properly.
You need sendmail working to use those. Are you sure you have sendmail installed and working? rpm -q sendmail will tell you if it's installed. It will give you the name and version number, or if it's not installed, it'll say package sendmail is not installed.
If it's not installed, install it by doing (as root), yum install sendmail, then follow the following steps once it's installed.
If it's installed, you have to check that it's actually started up. As root, type service sendmail status.
I think it should say Checking for service sendmail: [OK], if it's working properly. If it's not running, you can start it with service sendmail start, and to ensure it starts when you boot up next time, then type chkconfig sendmail on.
If it's installed, and running properly, then the problem could very well be your ISP. Some ISP's block outgoing mail if it's not send through their SMTP server (SBC, for example, does that).

Hi All,

I'm not sure if this is related. I tried to set up my Evolution email using my ISP pop and smtp servers then i got an error message when I tried to send an email to my yahoo account. The error message is the following:

"Error while performing operation.
MAIL FROM command failed: Must issue a STARTTLS command first"

Now, i tried to search for this error and one person suggested that I need to enable the TLS..how could I enable my TLS...? Thanks for your help....

smallville 08-29-2006 05:36 AM

how do you write your script in sending email? I write mine in this format

$to = "user@email.com";
$subject = "test mail";
$message = "test message";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

mail($to, $subject, $message, $headers);

Quigi 08-29-2006 09:17 AM

John,
It seems the question shifted to whether you can send e-mail at all, whether from a script or outside? You could try mailing directly from the shell, i.e.,
Code:

echo The message body | mail -s "A subject" johnsanty@yahoo.com
And probably you get the same as from the script. (And when you add the -v option to mail it will just tell you your computer (127.0.0.1) accepted it for delivery -- while we are interested in seeing the session going out to the net.)

Requiring STARTTLS probably means someone insist on encryption. Not sure who, maybe your ISP? It's not your e-mail provider yahoo, as the session below shows. You can manually run SMTP sessions, and it can help figuring out what the problem is. So starting with the e-mail address you provided above, I did the following. What I typed is bold.

Code:

% host -t mx yahoo.com
yahoo.com mail is handled by 1 mx1.mail.yahoo.com.
yahoo.com mail is handled by 1 mx2.mail.yahoo.com.
yahoo.com mail is handled by 1 mx3.mail.yahoo.com.
yahoo.com mail is handled by 5 mx4.mail.yahoo.com.
% telnet mx1.mail.yahoo.com 25
Trying 4.79.181.14...
Connected to mx1.mail.yahoo.com.
Escape character is '^]'.
220 mta183.mail.mud.yahoo.com ESMTP YSmtp service ready
HELO lithum.mydomain.com
250 mta183.mail.mud.yahoo.com
MAIL From: <brechbuehler@gmail.com>
250 sender <brechbuehler@gmail.com> ok
RCPT To: <johnsanty@yahoo.com>
250 recipient <johnsanty@yahoo.com> ok
RSET
250 reset ok
QUIT
221 mta183.mail.mud.yahoo.com

You see it got past MAIL From without problem. I issued RSET to avoid sending you unsolicited mail.

Now I don't know what your sendmail does -- maybe it relays all outgoing mail through your ISP who insists on encryption? Or it talks directly to the destination MTA (e.g., mx1.mail.yahoo.com)? Try to pinpoint the problem. If it's your sendmail configuration, there should be a number of people on this forum who can help you.

aluser 08-29-2006 11:06 AM

From the log message the OP posted, it looks like sendmail may be trying to send directly to the destination mail server (I'm guessing this because it says it's using 127.0.0.1 as a relay). If that's the case (I'm not really sure that it is), the destination could be rejecting the mail as spam because it comes from a suspicious dynamic address, or your isp could be filtering outbound connections to port 25.

If you can figure out how to get sendmail to forward everything to your isp's smtp server that might help. in the debian configs that is called a "smarthost"

Quigi 08-29-2006 12:45 PM

John,

Can you try to telnet to mx1.mail.yahoo.com, port 25? If you get to the 220 message, at least you know your ISP isn't filtering those connections.

Also, you could look in the mail log (where you found "relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7T0gq6H002936 Message accepted for delivery)") and see if you can locate further down an entry when sendmail actually attempts that delivery? It might be informative.

/Quigi

johnsanty 08-29-2006 10:14 PM

Quote:

Originally Posted by Quigi
John,
It seems the question shifted to whether you can send e-mail at all, whether from a script or outside? You could try mailing directly from the shell, i.e.,
Code:

echo The message body | mail -s "A subject" johnsanty@yahoo.com
And probably you get the same as from the script. (And when you add the -v option to mail it will just tell you your computer (127.0.0.1) accepted it for delivery -- while we are interested in seeing the session going out to the net.)

Requiring STARTTLS probably means someone insist on encryption. Not sure who, maybe your ISP? It's not your e-mail provider yahoo, as the session below shows. You can manually run SMTP sessions, and it can help figuring out what the problem is. So starting with the e-mail address you provided above, I did the following. What I typed is bold.

Code:

% host -t mx yahoo.com
yahoo.com mail is handled by 1 mx1.mail.yahoo.com.
yahoo.com mail is handled by 1 mx2.mail.yahoo.com.
yahoo.com mail is handled by 1 mx3.mail.yahoo.com.
yahoo.com mail is handled by 5 mx4.mail.yahoo.com.
% telnet mx1.mail.yahoo.com 25
Trying 4.79.181.14...
Connected to mx1.mail.yahoo.com.
Escape character is '^]'.
220 mta183.mail.mud.yahoo.com ESMTP YSmtp service ready
HELO lithum.mydomain.com
250 mta183.mail.mud.yahoo.com
MAIL From: <brechbuehler@gmail.com>
250 sender <brechbuehler@gmail.com> ok
RCPT To: <johnsanty@yahoo.com>
250 recipient <johnsanty@yahoo.com> ok
RSET
250 reset ok
QUIT
221 mta183.mail.mud.yahoo.com

You see it got past MAIL From without problem. I issued RSET to avoid sending you unsolicited mail.

Now I don't know what your sendmail does -- maybe it relays all outgoing mail through your ISP who insists on encryption? Or it talks directly to the destination MTA (e.g., mx1.mail.yahoo.com)? Try to pinpoint the problem. If it's your sendmail configuration, there should be a number of people on this forum who can help you.


Hi Quigi,

Actually, I tried to send mail directly from command line but I got the same result. Now I tried the following:
telnet mx1.mail.yahoo.com 25

And I got the following, it seems that it is not connecting at all.
[johnsanty@babe1 ~]$ telnet mx1.mail.yahoo.com 25
Trying 4.79.181.14...
telnet: connect to address 4.79.181.14: Connection timed out
Trying 4.79.181.15...
telnet: connect to address 4.79.181.15: Connection timed out
Trying 67.28.113.71...
telnet: connect to address 67.28.113.71: Connection timed out
Trying 67.28.113.73...


In the maillog, I got the following. I'm not sure if this message conveys that the message has been sent. Can you confirm?:

Aug 29 22:58:23 babe1 sendmail[3236]: k7U2wNiM003236: from=johnsanty, size=60, class=0, nrcpts=1, msgid=<200608300258.k7U2wNiM003236@babe1>, relay=johnsanty@localhost
Aug 29 22:58:23 babe1 sendmail[3237]: k7U2wNtV003237: from=<johnsanty@babe1>, size=324, class=0, nrcpts=1, msgid=<200608300258.k7U2wNiM003236@babe1>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 29 22:58:23 babe1 sendmail[3236]: k7U2wNiM003236: to=johnsanty@yahoo.com, ctladdr=johnsanty (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7U2wNtV003237 Message accepted for delivery)


However,in the /var/spool/mail, I got the following several of them since I have attempted many time to send an email. Does it look like a problem with my configuration or with yahoo? Also, I tried sending an email to my hotmail account and i got the same thing. Do you have any idea.....i dont know if it is my sendmail configuration or not. Do you know by any chance on how to configure the senmail? Thanks for your prompt reply...

**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************

The original message was received at Mon, 28 Aug 2006 21:27:23 -0400
from localhost.localdomain [127.0.0.1]

----- Transcript of session follows -----
<johnsanty@yahoo.com>... Deferred: Connection timed out with mx4.mail.yahoo.com.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

--k7U2BsfC002300.1156905836/babe1
Content-Type: message/delivery-status

Reporting-MTA: dns; babe1
Arrival-Date: Mon, 28 Aug 2006 21:27:23 -0400

Final-Recipient: RFC822; johnsanty@yahoo.com
Action: delayed
Status: 4.4.1
Remote-MTA: DNS; mx4.mail.yahoo.com
Last-Attempt-Date: Tue, 29 Aug 2006 22:43:56 -0400
Will-Retry-Until: Sat, 2 Sep 2006 21:27:23 -0400

--k7U2BsfC002300.1156905836/babe1
Content-Type: message/rfc822

Return-Path: <jonhsanty@babe1>
Received: from babe1 (localhost.localdomain [127.0.0.1])
by babe1 (8.13.5/8.13.5) with ESMTP id k7T1RNvY002973
for <johnsanty@yahoo.com>; Mon, 28 Aug 2006 21:27:23 -0400
Received: (from btamayo@localhost)
by babe1 (8.13.5/8.13.5/Submit) id k7T1RNVv002972
for johnsanty@yahoo.com; Mon, 28 Aug 2006 21:27:23 -0400
Date: Mon, 28 Aug 2006 21:27:23 -0400
From: John Santy <johnsanty@babe1>
Message-Id: <200608290127.k7T1RNVv002972@babe1>
To: johnsanty@yahoo.com

Subject: john

--k7U2BsfC002300.1156905836/babe1--

From MAILER-DAEMON@babe1 Tue Aug 29 22:47:57 2006
Return-Path: <MAILER-DAEMON@babe1>
Received: from localhost (localhost)
by babe1 (8.13.5/8.13.5) id k7U2BsfD002300;
Tue, 29 Aug 2006 22:47:57 -0400
Date: Tue, 29 Aug 2006 22:47:57 -0400
From: Mail Delivery Subsystem <MAILER-DAEMON@babe1>
Message-Id: <200608300247.k7U2BsfD002300@babe1>
To: <johnsanty@babe1>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="k7U2BsfD002300.1156906077/babe1"
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

This is a MIME-encapsulated message

Quigi 08-30-2006 10:11 AM

Quote:

Originally Posted by johnsanty
I tried the following:
telnet mx1.mail.yahoo.com 25

And I got the following, it seems that it is not connecting at all.
[johnsanty@babe1 ~]$ telnet mx1.mail.yahoo.com 25
Trying 4.79.181.14...
telnet: connect to address 4.79.181.14: Connection timed out
Trying 4.79.181.15...
telnet: connect to address 4.79.181.15: Connection timed out
Trying 67.28.113.71...
telnet: connect to address 67.28.113.71: Connection timed out
Trying 67.28.113.73...

Yes. Indeed it looks like your ISP is filtering any outbound connection to port 25. They are going out of their way to make your life more difficult!

Quote:


In the maillog, I got the following. I'm not sure if this message conveys that the message has been sent. Can you confirm?:

Aug 29 22:58:23 babe1 sendmail[3236]: k7U2wNiM003236: from=johnsanty, size=60, class=0, nrcpts=1, msgid=<200608300258.k7U2wNiM003236@babe1>, relay=johnsanty@localhost
Aug 29 22:58:23 babe1 sendmail[3237]: k7U2wNtV003237: from=<johnsanty@babe1>, size=324, class=0, nrcpts=1, msgid=<200608300258.k7U2wNiM003236@babe1>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 29 22:58:23 babe1 sendmail[3236]: k7U2wNiM003236: to=johnsanty@yahoo.com, ctladdr=johnsanty (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7U2wNtV003237 Message accepted for delivery)
No. If I read it right, it only confirms that your own machine (localhost AKA babe1 AKA 127.0.0.1) got the message from you, and will later try to deliver it.

Quote:


However,in the /var/spool/mail, I got the following several of them since I have attempted many time to send an email.

Code:

  ----- Transcript of session follows -----
<johnsanty@yahoo.com>... Deferred: Connection timed out with mx4.mail.yahoo.com.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old


Yes, this one documents the real problem. In five days you'll get a final failure notice. You see that sendmail is trying to connect to yahoo's mx machine (just as you did manually above), and the connection times out just as it did for you.
Quote:

Does it look like a problem with my configuration or with yahoo? Also, I tried sending an email to my hotmail account and i got the same thing.
It's a problem with your "friendly":rolleyes: ISP, who doesn't let you talk to yahoo, or hotmail, or any SMTP server (except theirs, presumably). No, it's not a problem with yahoo -- I can talk to them just fine.
Quote:

Do you have any idea.....i dont know if it is my sendmail configuration or not. Do you know by any chance on how to configure the senmail?
Your configuration would be ok with a "normal ISP, but you may need to change it to work around the filtering.

I'm not using sendmail, so I'm not the right person to ask about its configuration. Many years ago I heard people say getting it right is close to black magic. But hopefully things got better. And there is documentation out there. A quick Google search turned up http://sendmail.org and you may particularly want to study the section about configuration, http://www.sendmail.org/m4/readme.html :study:.

If after reading you still have questions, you may want to come back. Maybe even post a new question.

drj000 08-30-2006 11:21 AM

Try this
 
Ok, so to fix sendmail to forward through your ISP, here's what you need to do (all as root, of course):

First, you need to open up sendmail's config file (actually it's the master control file, but no reason to nitpick). If I remember correctly, it's /etc/mail/sendmail.mc

Look for a line that says something like "dnl define(`SMART_HOST', `smtp:smtp.yourisp.net')dnl."
If it doesn't say smtp, that's ok. smtp is the default if it's not specified. Change whatever address is in there to your isp's smtp address, and then delete the dnl at the beginning of the line (but not at the end). Be sure not to change any of the quotes, etc. It uses specific types of quotes, and screws up if the wrong kind are used.

Once you've done that, assuming your current directory is /etc/mail, type make. That should generate a new config file for you. If it didn't (you'll know if it says "Nothing to be done for all"), then you have to do it yourself. "m4 sendmail.mc > sendmail.cf" should do it. Then type service sendmail restart, and you should be good to go.

Now this assumes that you're ISP doesn't require you to login to the smtp server, or use a secure connection. I never was able to figure out how to get it working in that case. I just found another smtp server provided by my ISP that didn't require login.

johnsanty 08-30-2006 11:16 PM

Quote:

Originally Posted by drj000
Ok, so to fix sendmail to forward through your ISP, here's what you need to do (all as root, of course):

First, you need to open up sendmail's config file (actually it's the master control file, but no reason to nitpick). If I remember correctly, it's /etc/mail/sendmail.mc

Look for a line that says something like "dnl define(`SMART_HOST', `smtp:smtp.yourisp.net')dnl."
If it doesn't say smtp, that's ok. smtp is the default if it's not specified. Change whatever address is in there to your isp's smtp address, and then delete the dnl at the beginning of the line (but not at the end). Be sure not to change any of the quotes, etc. It uses specific types of quotes, and screws up if the wrong kind are used.

Once you've done that, assuming your current directory is /etc/mail, type make. That should generate a new config file for you. If it didn't (you'll know if it says "Nothing to be done for all"), then you have to do it yourself. "m4 sendmail.mc > sendmail.cf" should do it. Then type service sendmail restart, and you should be good to go.

Now this assumes that you're ISP doesn't require you to login to the smtp server, or use a secure connection. I never was able to figure out how to get it working in that case. I just found another smtp server provided by my ISP that didn't require login.

Hi drj000 and All,

Thanks for the reply...
I managed to get a smtp server that does not require a secue connection. I have verified that the smtp1.sympatico.ca server works because my Evolution email was not working before when I was using a secure one(smtphm.sympatico.ca). I was able to send an email via Evolution.

Now, with regards to my sendamil configuration, here's what I did:

Before:
dnl #
dnl define(`SMART_HOST',`smtp.your.provider')
dnl #


After:
# dnl
define(`SMART_HOST',`smtp1.sympatico.ca')
dnl #


Then I execute the make command.

But, service sendmail restart didn't work..So, what I did was I restarted my PC.

After executing the following command:
mail -s "john" johnsanty@yahoo.com < hello.txt

When I checked the maillog, here's the output:
Aug 31 00:03:58 babe1 sendmail[2920]: k7V43wSo002920: from=johnsanty, size=58, class=0, nrcpts=1, msgid=<200608310403.k7V43wSo002920@babe1>, relay=johnsanty@localhost
Aug 31 00:03:59 babe1 sendmail[2921]: k7V43wN2002921: from=<johnsanty@babe1>, size=322, class=0, nrcpts=1, msgid=<200608310403.k7V43wSo002920@babe1>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 31 00:03:59 babe1 sendmail[2920]: k7V43wSo002920: to=johnsanty@yahoo.com, ctladdr=johnsanty (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30058, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7V43wN2002921 Message accepted for delivery)
Aug 31 00:04:00 babe1 sendmail[2923]: k7V43wN2002921: to=<johnsanty@yahoo.com>, ctladdr=<johnsanty@babe1> (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120322, relay=smtp1.sympatico.ca. [209.226.175.63], dsn=2.0.0, stat=Sent (Message received: 20060831040349.IRQK13653.tomts36-srv.bellnexxia.net@babe1)


The output was completely different comapare to the output when I was using the secure smtp server. Could you check if my configuration is correct based on what you have suggested? Thanks for you prompt reply.

Quigi 08-31-2006 09:50 AM

Quote:

Originally Posted by johnsanty
I managed to get a smtp server that does not require a secue connection.

Good (as we don't know how to make sedmail use encryption).
Quote:

But, service sendmail restart didn't work.
What symptoms led you to conclude it didn't work?

Quote:

After executing the following command:
mail -s "john" johnsanty@yahoo.com < hello.txt

When I checked the maillog, here's the output:
Code:

Aug 31 00:03:58 babe1 sendmail[2920]: k7V43wSo002920: from=johnsanty, size=58, class=0, nrcpts=1, msgid=<200608310403.k7V43wSo002920@babe1>, relay=johnsanty@localhost
Aug 31 00:03:59 babe1 sendmail[2921]: k7V43wN2002921: from=<johnsanty@babe1>, size=322, class=0, nrcpts=1, msgid=<200608310403.k7V43wSo002920@babe1>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 31 00:03:59 babe1 sendmail[2920]: k7V43wSo002920: to=johnsanty@yahoo.com, ctladdr=johnsanty (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30058, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k7V43wN2002921 Message accepted for delivery)
Aug 31 00:04:00 babe1 sendmail[2923]: k7V43wN2002921: to=<johnsanty@yahoo.com>, ctladdr=<johnsanty@babe1> (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120322, relay=smtp1.sympatico.ca. [209.226.175.63], dsn=2.0.0, stat=Sent (Message received: 20060831040349.IRQK13653.tomts36-srv.bellnexxia.net@babe1)


Looking it over, this sounds better: the message went to your new relay (smtp1.sympatico.ca) and the status is Sent. Did you not get it? With SpamGuard turned on, Yahoo! Mail will deliver suspected spam to the "Bulk" folder, so be sure to check that too. (Kstan hinted to that earlier.)

You could repeat a manual SMTP session to sort out what's going on. Of course your ISP's SMTP server refuses to relay my mail, because I'm outside (they are not my provider), and the destination is outside, too:
Code:

% telnet smtp1.sympatico.ca 25
Trying 209.226.175.63...
Connected to smtp1.sympatico.ca.
Escape character is '^]'.
220 tomts5.bellnexxia.net ESMTP server (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) ready Thu, 31 Aug 2006 10:08:10 -0400
HELO lithium.localdomain.com
250 tomts5-srv.bellnexxia.net
MAIL From: brechbuehler@gmail.com
250 Sender <brechbuehler@gmail.com> Ok
RCPT To: johnsanty@yahoo.com
550 you are not allowed to send mail to <johnsanty@yahoo.com>

But if you try this from your computer, i.e., within, your results should be different. (To actually send a message, use the DATA command next. The server will suggest you enter the message, and terminate it with a period (".") on a line by itself. After a short while, you should get the hand-submitted message in your Yahoo account.

You could also try the e-mail address your ISP gave you -- do you have something like johnsanty(at)bellnexxia.net or johnsanty(at)sympatico.ca ? That might be one step closer to them, and work more easily.

johnsanty 09-01-2006 12:27 AM

Quote:

Originally Posted by Quigi
Good (as we don't know how to make sedmail use encryption).

What symptoms led you to conclude it didn't work?



Looking it over, this sounds better: the message went to your new relay (smtp1.sympatico.ca) and the status is Sent. Did you not get it? With SpamGuard turned on, Yahoo! Mail will deliver suspected spam to the "Bulk" folder, so be sure to check that too. (Kstan hinted to that earlier.)

You could repeat a manual SMTP session to sort out what's going on. Of course your ISP's SMTP server refuses to relay my mail, because I'm outside (they are not my provider), and the destination is outside, too:
Code:

% telnet smtp1.sympatico.ca 25
Trying 209.226.175.63...
Connected to smtp1.sympatico.ca.
Escape character is '^]'.
220 tomts5.bellnexxia.net ESMTP server (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) ready Thu, 31 Aug 2006 10:08:10 -0400
HELO lithium.localdomain.com
250 tomts5-srv.bellnexxia.net
MAIL From: brechbuehler@gmail.com
250 Sender <brechbuehler@gmail.com> Ok
RCPT To: johnsanty@yahoo.com
550 you are not allowed to send mail to <johnsanty@yahoo.com>

But if you try this from your computer, i.e., within, your results should be different. (To actually send a message, use the DATA command next. The server will suggest you enter the message, and terminate it with a period (".") on a line by itself. After a short while, you should get the hand-submitted message in your Yahoo account.

You could also try the e-mail address your ISP gave you -- do you have something like johnsanty(at)bellnexxia.net or johnsanty(at)sympatico.ca ? That might be one step closer to them, and work more easily.

Hi Quigi and All,

Here's the good news...I tried to email my johnsanty@sympatico.ca and it worked and I was also able to telnet to smtp1.sympatico.ca. But, I still couldn't send it to yahoo nor hotmail...The smtp manual session does not work too...Thanks for your prompt reply....

Quigi 09-01-2006 06:51 AM

Maybe ask your ISP (sympatico?). I'm not sure what's going on.

Possibly the SMTP server you're using is intended for inbound messages only, i.e., to *@sympatico.ca? As such it should work without TLS (which we confirmed) but refuses to relay any messages going out, e.g. to Yahoo. This is just a wild guess, and inconsistent with your finding that Evolution works through this server (to outide recipients? without TLS??).

Of course you want to get to the bottom of this. Meanwhile, does the possibility to mail to your sympatico account solve the immediate need for notification from the shell script? Probably you could set up forwarding to Yahoo in your sympatico account -- kludgy solution, but might get things working acceptably for right now.

johnsanty 09-02-2006 12:43 PM

Quote:

Originally Posted by Quigi
Maybe ask your ISP (sympatico?). I'm not sure what's going on.

Possibly the SMTP server you're using is intended for inbound messages only, i.e., to *@sympatico.ca? As such it should work without TLS (which we confirmed) but refuses to relay any messages going out, e.g. to Yahoo. This is just a wild guess, and inconsistent with your finding that Evolution works through this server (to outide recipients? without TLS??).

Of course you want to get to the bottom of this. Meanwhile, does the possibility to mail to your sympatico account solve the immediate need for notification from the shell script? Probably you could set up forwarding to Yahoo in your sympatico account -- kludgy solution, but might get things working acceptably for right now.

Thanks again Quigi...Well, I called my ISP and unfortunately,my email account witht hem does not have the feature of forwarding emails. I'll probably try to configure postfix as my friend suggested. I'll do search on that...I'll see if that solves the issue..

Thanks again to all who helped me...


All times are GMT -5. The time now is 07:42 AM.