ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
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:
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.
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.
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....
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.
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.