LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sendmail does not hear from yahoo, gmail (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-does-not-hear-from-yahoo-gmail-744550/)

doru 08-02-2009 12:24 PM

sendmail does not hear from yahoo, gmail
 
I installed Fedora 11, text mode, Mail Server group included, and I tried to exchange e-mails with my accounts at yahoo.com and gmail.com. It does not work.

I am using mailx as a Mail User Agent (MUA) and sendmail as a Mail Transfer Agent (MTA), with default settings.

I can see, with tcpdump, tcp packets going to ...yahoo.com:smtp and google.com:smtp, but there is no response.

iptables: I tried iptables and tcpdump, and I believe that tcpdump listens outside iptables, that is, it sees packets after they leave and before they enter. Anyway, there are some iptables logs which show nothing.

Plese give me any idea, because I am stuck. I even read somewhere that it is possible that my ISP stops smtp connections, but I believe that this is not the case.

Thank you for your help.

repo 08-02-2009 12:41 PM

Any pointers in the logfiles ?
/var/log/...
Try to disable the firewall.

doru 08-02-2009 12:56 PM

Quote:

Originally Posted by repo (Post 3628579)
Any pointers in the logfiles ?
/var/log/...
Try to disable the firewall.

/var/log/maillog says "Connection timed out".

My address is: root@localhost.localdomain, but still, yahoo should establish smtp connection.

I am reluctant to disable iptables, for security reasons. I hope I can verify other issues before I try this. On one hand, I believe that tcpdump sees outside iptables, so it should see any response. On the other hand, iptables is fairly complicated, maybe it does not identify smtp connections.

repo 08-02-2009 01:10 PM

What is the output from
Code:

telnet smtp.google.com 25

doru 08-02-2009 01:18 PM

Quote:

Originally Posted by repo (Post 3628601)
What is the output from
Code:

telnet smtp.google.com 25

I tried both mailx and telnet smtp.google.com 25, both with and without iptables active, and there is nothing but a deadly silence. telnet says:
Trying 74.125.45.25...
and there it dies. I hope 20s should be enough, to wait without iptables, for telnet?

Thanks for your help.

repo 08-02-2009 01:21 PM

Seems to me port 25 outgoing is blocked.
Did you asked you provider ?

doru 08-02-2009 01:27 PM

Quote:

Originally Posted by repo (Post 3628616)
Seems to me port 25 outgoing is blocked.
Did you asked you provider ?

I did not, but I will try. My provider is not very talkative. But now, if you say there are no other obvious reasons for this, I will give it a try.

Why would they do something foolish like this?

repo 08-02-2009 01:31 PM

Most providers block port 25 outgoing, except for their own smtp server,(for the dynamic IP's)
Also, most smtp servers don't accept connections from a dynamic IP

Quote:

Why would they do something foolish like this?
To prevent infected machines to sent SPAM

doru 08-02-2009 01:35 PM

Quote:

Originally Posted by repo (Post 3628627)
Most providers block port 25 outgoing, except for their own smtp server,(for the dynamic IP's)
Also, most smtp servers don't accept connections from a dynamic IP


To prevent infected machines to sent SPAM

My provider does not offer mail services.
My IP is static. Has been so for a number of years.

EricTRA 08-02-2009 01:36 PM

Hello,

First of all Google Mail doesn't listen on port 25 but on port 465. So it's quite clear that you will not get a respons telnetting to port 25. So try telnetting to that port first.

I don't know about the port for smtp on yahoo but I'm sure you can find out.

I've got a Debian server on our LAN with postfix setup as a relay server and it sends everything nice and sweet over to our Google Mail for enterprises, which is the same as GMail for private use.

In the past I've worked with providers in various european countries and none of them ever blocked outgoing communication on ports in regards to mail, both incoming and outgoing.

Hope this helps you out somewhat.

Kind regards,

Eric

okcomputer44 08-02-2009 01:40 PM

Quote:

Originally Posted by doru (Post 3628622)
I did not, but I will try. My provider is not very talkative. But now, if you say there are no other obvious reasons for this, I will give it a try.

Why would they do something foolish like this?

Almost all provider do that now days. Because of the lovely virus/maleware infections on Windows clients.

You must configure the smart host under sendmail.mc to point to the ISP's smtp server.

The telnet wont work either because of that.
Only the secure smtp(465) allowed to send mail to outside world from local server.

Laz

repo 08-02-2009 01:43 PM

Quote:

First of all Google Mail doesn't listen on port 25 but on port 465. So it's quite clear that you will not get a respons telnetting to port 25. So try telnetting to that port first.
Quote:

repo@cannabis:~$ telnet smtp.google.com 25
Trying 74.125.45.25...
Connected to smtp1.google.com.
Escape character is '^]'.
220 smtp.google.com ESMTP
quit
221 2.0.0 smtp.google.com closing connection
Connection closed by foreign host.
repo@cannabis:~$
And for gmail
Quote:

repo@cannabis:~$ telnet smtp.gmail.com 25
Trying 216.239.59.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP q9sm19578323gve.17
quit
221 2.0.0 closing connection q9sm19578323gve.17
Connection closed by foreign host.
repo@cannabis:~$

doru 08-02-2009 01:46 PM

Quote:

Originally Posted by EricTRA (Post 3628634)
Hello,

First of all Google Mail doesn't listen on port 25 but on port 465. So it's quite clear that you will not get a respons telnetting to port 25. So try telnetting to that port first.

In the past I've worked with providers in various european countries and none of them ever blocked outgoing communication on ports in regards to mail, both incoming and outgoing.

Hope this helps you out somewhat.

Kind regards,

Eric

Thanks.

Still no reply from:

telnet smtp.google.com 465

I am in Romania, so I'm not sure that my provider does not block ports...

repo 08-02-2009 01:51 PM

Quote:

telnet smtp.google.com 465
Try
Code:

telnet smtp.gmail.com 465

EricTRA 08-02-2009 01:53 PM

Hello,

Sorry for that, I got it from Google Settings for Email client. Since that was the only one I now after trying to configure smtp.gmail.com on port 25 in the past with resulting in errors on Outlook, Thunderbird, and so on, ... I assumed that port 25 would not be listening.

I'm sure however that my server at work is NOT connecting on port 25 to Gmail for enterprises.

Kind regards,

Eric

repo 08-02-2009 01:55 PM

Quote:

I'm sure however that my server at work is NOT connecting on port 25 to Gmail for enterprises.
Correct, I also use smtp.gmail.com and port 465

doru 08-02-2009 02:04 PM

Quote:

Originally Posted by repo (Post 3628655)
Try
Code:

telnet smtp.gmail.com 465

Yes, this works, with iptables on!!! How do I close it?

No, really, what could be wrong? sendmail uses port 25! I remember I saw smtp in tcpdump, and that is 25 in /etc/services.

Good, I heard sendmail is so easy to configure! If I don't ask too much, please give a clue.

repo 08-02-2009 02:06 PM

type quit

Take a look to configure sendmail to use smtp.gmail.com as a relay
http://www.phinesolutions.com/sendma...lay-howto.html

doru 08-02-2009 02:19 PM

Quote:

Originally Posted by okcomputer44 (Post 3628642)
Almost all provider do that now days. Because of the lovely virus/maleware infections on Windows clients.

You must configure the smart host under sendmail.mc to point to the ISP's smtp server.

The telnet wont work either because of that.
Only the secure smtp(465) allowed to send mail to outside world from local server.

Laz

Thanks, I will look into that. I'm not sure my provider actually offers a smtp server for my use.
Where is the doc for sendmail.mc?
Maybe you can tell me how to config sendmail for 465, because telnet smtp.gmail.com 465 worked for that.

repo 08-02-2009 02:22 PM

http://www.linuxha.com/other/sendmail/gmail.html
You really should try google,

doru 08-02-2009 02:28 PM

Quote:

Originally Posted by repo (Post 3628674)
type quit

Take a look to configure sendmail to use smtp.gmail.com as a relay
http://www.phinesolutions.com/sendma...lay-howto.html

Thanks, sendmail site could have been more helpful. I should answer within 12 hours.

doru 08-02-2009 02:33 PM

Quote:

Originally Posted by repo (Post 3628689)

Yes, I did a lot of google to get here, and after I read in a number of places that sendmail is difficult to configure, and I found no mention of sendmail.mc in sendmail man, I sort of panicked. Thanks for the links, anyway, it is much easier to find when you know already. :)

doru 09-16-2009 09:29 AM

I'm back after more than 12 hours. This is what happened:

1. I tried to configure sendmail using the links repo gave me. It didn't work, I could not find other links, I concluded sendmail is more complicated than what I need and that configuring it is way above my current linux level.

2. I tried to uninstall sendmail in order to install qmail, but
Quote:

yum remove sendmail
uninstalled most of my Fedora 11 system, yum included. See: http://forums.fedoraforum.org/showth...67#post1246267
I concluded that Fedora is too "cutting edge" for me.

3. I installed Ubuntu server with mail Internet server included. Local mail, between two users on the same machine, which was working in Fedora 11, did not work on Ubuntu server with mail Internet included. See:
http://ubuntuforums.org/showthread.php?t=1266153

I concluded that there is a conspiracy against mail on Linux, and I decided to live without it for a while.

I also consider the install of qmail on Ubuntu. qmail does not have binary packages in default Ubuntu repositories, and it has several different versions for different versions of Debian. qmailrocks.org does not treat Ubuntu.

lutusp 09-16-2009 11:33 AM

Quote:

Originally Posted by doru (Post 3628590)
/var/log/maillog says "Connection timed out".

My address is: root@localhost.localdomain, but still, yahoo should establish smtp connection.

I am reluctant to disable iptables, for security reasons. I hope I can verify other issues before I try this. On one hand, I believe that tcpdump sees outside iptables, so it should see any response. On the other hand, iptables is fairly complicated, maybe it does not identify smtp connections.

You cannot use root@localhost.localdomain as your address for mail deliveries. Modern mail handling software won't forward any traffic unless the originator's e-mail address corresponds to the reply address in the e-mail.

Have you looked in /var/log/maillog to see the details of why the transaction failed?

repo 09-16-2009 12:13 PM

Just install qmail, and disable sendmail.

lawadm1 09-20-2009 01:16 AM

Was there any resolution to this? I installed Fedora 11 and I'm having the same problem.

When I try:
telnet smtp.google.com 25

I get:

Trying 74.125.45.25...
Connected to smtp.google.com.
Escape character is '^]'.
220 smtp.google.com ESMTP
<After about 30-40 seconds I get the message below>
Connection closed by foreign host.

I'm using Sendmail and Dovecot.

EricTRA 09-20-2009 01:50 AM

You really should read the thread before asking if there is a solution yet. As stated somewhere in this thread smtp.google.com rejects connecting on port 25 and only accepts connections on the secured port 465.

Kind regards,

Eric

lawadm1 09-20-2009 08:23 AM

I did read the whole thread. I'm confused to why I do connect using 25, but I do not using 465, even with iptables stopped.

And I didn't see anything about what it is we need to do to get this to work. I saw something about installing qmail or using smart host, but if someone could elaborate on that a little more that might help me out. I've been unable to find documentation that has helped.

It's been a couple of years since I have dealt with setting any of this stuff up. I had a server running Fedora 6 where I had everything working great, and I went straight to Fedora 11 where I can hardly get anything to work, even the display settings.

Jeff

repo 09-20-2009 10:09 AM

Take a look at
http://www.scalix.com/wiki/index.php...s_a_SMTP_relay

doru 09-21-2009 07:56 AM

Quote:

Originally Posted by lutusp (Post 3685367)
You cannot use root@localhost.localdomain as your address for mail deliveries. Modern mail handling software won't forward any traffic unless the originator's e-mail address corresponds to the reply address in the e-mail.

Have you looked in /var/log/maillog to see the details of why the transaction failed?

I tried user, user@127.0.0.1, user@localhost, they don't work. I don't receive error messages back.

Yes, I looked into logs, you may see the report here:
http://ubuntuforums.org/showthread.php?t=1266153

Thanks for your answer.

doru 09-21-2009 08:08 AM

Quote:

Originally Posted by repo (Post 3685429)
Just install qmail, and disable sendmail.

The trouble with qmail is that I found different qmail versions for different Debian releases. Ubuntu is based on sid, the "unstable" Debian release, but who knows what is the actual relation between the software for which were different qmail packages written, the current Debian versions, and my Ubuntu? I am reluctant to make tests on my Ubuntu server, as I am currently using it. Maybe later.

From my experience, I believe that I have the highest chances to configure Postfix, the mail server supported by Ubuntu project. Too bad that nobody answers my thread there:
http://ubuntuforums.org/showthread.php?t=1266153

Thanks for your help.

doru 09-21-2009 08:27 AM

Quote:

Originally Posted by repo (Post 3690616)

I believe I will not try sendmail very soon again. I am using Ubuntu with Postfix now.

doru 02-23-2010 05:25 AM

Configuring the mail server under linux is difficult because:

1. mail servers under linux can do a lot, they can service thousands of clients over lan and in other configurations,
2. security certificates are a story of their own, and they need to work well with the mail server.

That is why to learn how to configure a mail server under linux takes weeks rather than days.

However, I managed to make postfix send mail (but I failed to make fetchmail receive mail) with this: https://help.ubuntu.com/community/GmailPostfixFetchmail


All times are GMT -5. The time now is 08:24 PM.