Telnet localhost

Hi,

When I do this:

 telnet 127.0.0.1 25

I get:

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

Any idea why is this would be happening?

/jlar

Ok, so postfix wasn’t running or anything for that matter…

I’m confused though…

Does every Linux box have a built in smtp server at port 25 to send mail?
I am using a Perl script to send mail and I don’t know what to put in as the sender mail??? localhost is sending the mail… do I put root@localhost or something.

When you send mail using mail username, can you actually send mail externally to a proper e-mail address?

/jlar

Hi
Is the postfix/sendmail service running?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 22:13, 1 user, load average: 0.07, 0.04, 0.06
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Yeah, got it working… still not sure though how Linux actually sends mail? Is localhost port 25 able to do that? and not just to mail user as in local mail, but external as in mymail@mail.com

Hi
Are you behind an ISP or running your own domain with ports open to
the internet?

Have a read here;
http://en.opensuse.org/Mail_server_HOWTO


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 22:40, 2 users, load average: 0.16, 0.09, 0.08
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes. The Linux host is clever enough to go and find its next SMTP
server but often that won’t work… for example if you try to send
something from george@whitehouse.gov then chances are it just won’t
work, but if your sender is correct it may work. I have a couple
servers and as long as the sender is from my domain (or one in which my
server has a nice domain name that is reverse-lookup-able) sending seems
to work to the world. I haven’t researched the exact mechanisms but
that seems to be what works reliably for me.

Good luck.

eeijlar wrote:
> Ok, so postfix wasn’t running or anything for that matter…
>
> I’m confused though…
>
> Does every Linux box have a built in smtp server at port 25 to send
> mail?
> I am using a Perl script to send mail and I don’t know what to put in
> as the sender mail??? localhost is sending the mail… do I put
> root@localhost or something.
>
> When you send mail using mail username, can you actually send mail
> externally to a proper e-mail address?
>
> /jlar
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJIt2P3s42bA80+9kRAl4qAJ0WvkAL4chi1HkaW0XSYRaB8JZmuwCeN5rZ
catIqDMoFT4L8BWvxPQquUU=
=2SGP
-----END PGP SIGNATURE-----

Sending outgoing mail doesn’t require an open port 25. However it does require a Mail Transfer Agent (and postfix is one) that follows the protocol for routing mail. Very simplified it goes like this:

If there is a relay host use it.
Otherwise look up the MX for the domain. For person@example.com, it would be the MX for example.com. If found use that as the destination.
Otherwise use the domain itself as the destination.

If mail fails to be sent, report the error with a bounce.

The MX is the value of MX record of the domain. You can see this by, for example:

dig novell.com mx

It allow a domain to delegate mail handling to specified host(s).

These days, ISPs do not allow outgoing connections from home machines to use destination port 25 because of spam viruses. So outgoing mail usually has to go through the relay host. But spam viruses have become smart enough to work out how to use the relay too. And so the war continues.