[Linux] Mail server configuration

Solved
webtherider Posted messages 45 Status Membre -  
domlinux Posted messages 15 Status Membre -
Hello everyone,

For several days I have been encountering various issues with the configuration of my personal mail server. I bought a domain name that I will refer to here as mondomaine.com and I really want to play around with it! ;)

My configuration: OpenSuse 10.0, internet connection through an ADSL router (IP 192.168.0.1), host SB1 on mondomaine.com, IP 192.168.0.5. I have set up port forwarding on SMTP port 25. I have also configured an MX smtp.mondomaine.com that points to the router (dynamic IP from my ISP). With the dig command in Linux, I was able to verify that everything is correct regarding the MX. Initially, I tested eXtremail (www.extremail.com) with no success, then I switched to Postfix with no success either!

Description of the issues:

1. Sending to user@mondomaine.com from smtp.mondomaine.com OK
2. Sending to user@mondomaine.com from another SMTP NOT OK and NO ERROR RECEIVED - Message never arrives!!!!
3. Sending to user@autredomaine.com from smtp.mondomaine.com NOT OK and ERROR RECEIVED - Mail queued

In summary, it works well locally but not on the internet! I feel like I am invisible from outside even though all ports are open for the occasion. I forgot to mention that the SMTP daemons are listening on 0.0.0.0:25.

If anyone sees where this might be coming from, I would be very grateful. In any case, I can’t see it at all and I have been searching for days!

Thanks!!
Configuration: OpenSuse 10 / Netgear DG834v2 ADSL modem-router / P4 3GHz / 1GB DDR2 / ATI Radeon 4550

12 réponses

buzz17 Posted messages 252 Status Membre 33
 
relay=none,

Apparently, for the mail, you need an smtp relay...
Edit your main.cfg file
and add the address of an smtp server to "relay=". For example, your ISP's server.
--
Les ordinateurs sont comme des climatiseurs.
Ils ne fonctionnent pas quand vous ouvrez des fenêtres.
1
domlinux Posted messages 15 Status Membre 2
 
Hello,

my problem is as follows: I have a mail server running on Linux and sending messages locally works, but the only issue is that I can't receive messages locally. Each time I try, I get the following message:
error retrieving the email

please help me
1
webtherider Posted messages 45 Status Membre 9
 
Here is the log during the sending of a message to user@laposte.net

Aug 8 19:45:03 smtp postfix/smtpd[18812]: connect from smtp.mondomaine.com[192.168.0.5]
Aug 8 19:45:03 smtp postfix/smtpd[18812]: E3589C54060: client=smtp.mondomaine.com[192.168.0.5]
Aug 8 19:45:03 smtp postfix/cleanup[18815]: E3589C54060: message-id=<1155059103.18754.0.camel@smtp.mondomaine.com>
Aug 8 19:45:03 smtp postfix/qmgr[18752]: E3589C54060: from=<sebastien@mondomaine.com>, size=536, nrcpt=1 (queue active)
Aug 8 19:45:04 smtp postfix/smtpd[18812]: disconnect from smtp.mondomaine.com[192.168.0.5]
Aug 8 19:45:34 smtp postfix/smtp[18816]: connect to smtp1.laposte.net[81.255.54.11]: Connection timed out (port 25)
Aug 8 19:45:34 smtp postfix/smtp[18816]: E3589C54060: to=<user@laposte.net>, relay=none, delay=31, status=deferred (connect to smtp1.laposte.net[81.255.54.11]: Connection timed out)
0
webtherider Posted messages 45 Status Membre 9
 
Thank you, it works! But why am I rejected directly while I am accepted through a relay?

Another problem: when I send an email from another SMTP to my domain, I can't receive it.

For example: I send an email from user@autredomaine.com to user@mondomaine.com using smtp.autredomaine.com. After a few minutes, I receive an email from postmaster@autredomaine.com saying
Connect to smtp.mondomaine.com[IP address]: Connection timed out

I know what this means, but I don't quite understand why... I have left my computer wide open for my tests, I am certain that port 25 is open (I used superscan which confirms this). Moreover, I did a telnet on my SMTP from another machine and it responds on port 25. What could it be about?

Thank you!
0
buzz17 Posted messages 252 Status Membre 33
 
Thanks, it works! But why am I being refused directly when going through a relay I'm accepted? 

I'm not sure, but I think that when your server with mondomain.com connects to the post office and doesn't recognize it as a known SMTP (free, gmail, ...), it must think it's a spam server....

For your other problem
basically you want to be able to receive emails at mondoamine.com
in that case you'll need to create a mail box for your user....

I don't have the thing in my head anymore and I'm not at home

personally I did this with
postfix for the smtp server
cyrus for the imap server
fetchmail to retrieve my emails from other pop
squirrelmail as a webmail interface

if you search postfix+cyrus in google
you will certainly find the tutorial I used...

--
Computers are like air conditioners.
They don't work when you open Windows.
0
webtherider Posted messages 45 Status Membre 9
 
I think I expressed myself poorly regarding "mail reception". It's not about POP or IMAP but rather Postfix that is not responding to incoming messages. Normally, when a message is sent to my domain.com, the other SMTP should send the mail to the corresponding MX, which in my case is smtp.mydomain.com.

When a friend sends me an email to user@mydomain.com, they receive a message like "connect smtp.mydomain.com [ip address]: connection timed out". So no messages are reaching my server from the outside.

I have configured port forwarding (25) from my NAT router (192.168.0.1) to the server's IP 192.168.0.5. I declare inet_interfaces = 192.168.0.5 and with a netstat, I see that Postfix is listening on 192.168.0.5:25. That seems correct to me? Yet, other SMTPs are failing to connect to my server.

I tried a telnet smtp.mydomain.com 25 and the SMTP responds fine...

I don't understand where the problem might be, maybe it's the remote SMTP that doesn't want to connect?

Thank you!
0
buzz17 Posted messages 252 Status Membre 33
 
so when toto@ouinouin.com sends an email to user@mondomaine.com

the smtp of ouinouin.com connects to you.... then your postfix reconnects locally to deliver the email to your mailbox but if it doesn't exist... time out...

I don't know if I'm clear because it's not necessarily easy to explain in writing....
--
Computers are like air conditioners.
They don't work when you open Windows.
0
webtherider Posted messages 45 Status Membre 9
 
It's precisely the smtp whining that can't connect to mine... even in the Postfix log, there are no entries corresponding to an external connection attempt...

I did an online port scan on my smtp and the port appears closed despite having done what was necessary to have it open...
0
webtherider Posted messages 45 Status Membre 9
 
No need to look anymore, I've found the problem: as usual, it can only be an ISP trying to mess with everyone! Those clever folks are blocking port 25!!

Any idea to get around the issue? I thought about listening on another port, but don't other SMTPs only communicate on port 25, right?

webrider
0
webtherider Posted messages 45 Status Membre 9
 
Here I found the solution: I dreamed about it at night and rollernet made it happen!

The sending issue is no longer a problem: I use my ISP's relay which is always accessible on port 25 (otherwise how would clients send emails? ;-))

For receiving, the problem gets trickier! All SMTP servers communicate over port 25 and only port 25!
What I dreamed of: a service that accepts incoming connections on port 25 and redirects the mail to another port!

As I said, rollernet made it happen! www.rollernet.us

How does it work?

You need to sign up, the redirection service to another port being (for now) free! You create an MX record on your domain sending the mail to the rollernet SMTP which relays it to your SMTP (note no MX record for them!) which listens on port 26 for example. And there you go, that's all it takes!

I hope this post will help others wanting to set up their own mail system.

webrider
0
izul
 
I made a practical tutorial:
http://vepe.free.fr
0
deazure
 
receive all the elements involved in the messaging configuration under Linux (document)
0