LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-30-2006, 11:16 PM   #16
johnsanty
Member
 
Registered: Apr 2006
Posts: 49

Original Poster
Rep: Reputation: 15

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.
 
Old 08-31-2006, 09:50 AM   #17
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
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.

Last edited by Quigi; 08-31-2006 at 09:55 AM.
 
Old 09-01-2006, 12:27 AM   #18
johnsanty
Member
 
Registered: Apr 2006
Posts: 49

Original Poster
Rep: Reputation: 15
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....

Last edited by johnsanty; 09-01-2006 at 12:33 AM.
 
Old 09-01-2006, 06:51 AM   #19
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
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.
 
Old 09-02-2006, 12:43 PM   #20
johnsanty
Member
 
Registered: Apr 2006
Posts: 49

Original Poster
Rep: Reputation: 15
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...
 
  


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
Script to send email... bfloeagle Linux - General 5 10-13-2009 10:20 AM
write a shell script to send email yenonn Programming 4 02-11-2005 10:06 PM
Write a script to send an email from bash kpelczar Linux - Software 5 02-09-2005 04:19 PM
Allowing an IP to send email using my email server... culprit Linux - Networking 7 09-09-2003 12:24 PM
script to send email message meluser Programming 2 03-26-2003 12:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:05 PM.

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