Hi!
I have an opensuse 11.2 (upgraded to11.3). I use a static ip. have my web server running without any problem(ftp also working). I’ve been trying to configure my mail server for a long time now, but no success.
I want to configure mail in such a way that all the virtual domains hosted on my system could use username@domain.tld addresses.
When mails are sent out from my system (by a nuke site) they reach the address(with long delays), but when I send mail to any of the user addresses it rebounds. When I connect through telnet to localhost I do get connected to smtp, but when I try to telnet to the ip address or hostname I get “connection closed by foreign host” message without developing a connection.
I’d appreciate if someone could give me a detailed walk through the server setup or could tell me where to find some good “how to” for opensuse. I’ve been looking around for guides in the net, but all I find are “how to” for 64x architectures(i have a 32).
I’d like to use my server with mysql database for virtual hosts.
Thanks in advance!
Mail server setup is not affected in the tiniest by what architecture you are using. And as you’ll see in a moment, even the distro doesn’t affect it that much.
If you want to receive mail for a domain, that domain must have a MX record which resolves to your mail server. This is done at the domain registrar.
Your mail server, postfix in this case, must accept mail for that domain.
Since you want to accept mail for multiple, virtual domains, you probably want to set up virtual domains in postfix. The best tute I reckon is the ISP style mail server tute:
ISPmail tutorial for Debian Lenny | literacy and subleties for open-source bigots and other weirdos
This is written for Debian, but the main thing is to understand the concepts, which will work whatever the Linux distro. Small details will differ from distro to distro like the names of the packages and the locations of the files, but the core concepts are the same. Expect to have to dive into the CLI to do this kind of configuration. Expect to have your networking knowledge stretched to do this kind of configuration.
ken yap wrote:
> If you want to receive mail for a domain, that domain must have a MX
> record which resolves to your mail server. This is done at the domain
> registrar.
If there is no MX record, an MTA will default to the A or AAAA record
for the domain.
–
Per Jessen, Zürich (31.6°C)
http://en.opensuse.org/User:Pjessen
I have an MX record configured. it is like @ MX domain name(or do I need the host name) priority(10)
I’ll go through the tutorial right now.
Thanks for your assistance.
kachora wrote:
>
> Hi!
> I have an opensuse 11.2 (upgraded to11.3). I use a static ip. have my
> web server running without any problem(ftp also working). I’ve been
> trying to configure my mail server for a long time now, but no
> success.
When at first you don’t succeed …
> I want to configure mail in such a way that all the virtual domains
> hosted on my system could use username@domain.tld addresses.
Those are usually referred to as virtual domains, as opposed to the
domain for your mailserver itself.
> When mails are sent out from my system (by a nuke site) they reach the
> address(with long delays), but when I send mail to any of the user
> addresses it rebounds.
You need to look at the error msg, as well as the mail log on your
server. That’ll tell you what the problem is.
> When I connect through telnet to localhost I do get connected to smtp,
> but when I try to telnet to the ip address or hostname I
> get “connection closed by foreign host” message without developing a
> connection.
Have you configured your mail server to listen on the appropriate
external interfaces? The default postfix install will only listen on
localhost.
–
Per Jessen, Zürich (31.3°C)
http://en.opensuse.org/User:Pjessen
Yes I have configured the mail server to listen to $mydomain, localhost.$mydomain, localhost
Now I’m going through the tutorial and in that tutorial they use Dovecot, but I have Courier installed. Do I need to uninstall Courier imap/pop before installing Dovecot?
I never let the MX default. One day you may move your website to another IP and forget that the mail is being delivered to the A address. Any decent registrar will let you set up a MX. Also MX allows you to specify fallbacks.
They both do the same thing, provide POP and IMAP. I like Dovecot better because it’s easier to configure, but if you are used to Courier, then proceed, with the appropriate changes.
BTW, it’s not sufficient to specify that postfix accepts mail for $mydomain, localhost.$mydomain, localhost + any virtual domains you set up. You must also set it to listen on all interfaces. By default it only listens on localhost.
Yes it is configured to listen to all interfaces. This is why I’m troubled. The conf file is written according to all recomendations. So when it is configured to listen to all interfaces and it listens to localhost calls, why doesn’t it listen to the calls made to $mydomain.?
kachora wrote:
>
> Yes I have configured the mail server to listen to $mydomain,
> localhost.$mydomain, localhost
> Now I’m going through the tutorial and in that tutorial they use
> Dovecot, but I have Courier installed. Do I need to uninstall Courier
> imap/pop before installing Dovecot?
>
Hold it - those are not mailservers, they are IMAP servers. A
mailserver is either sendmail or postfix, preferably the latter.
–
Per Jessen, Zürich (30.8°C)
http://en.opensuse.org/User:Pjessen
How are you testing it? If $mydomain is an external IP address and is the address of your broadband connection, and you have the usual NAT router/firewall on the border, then it won’t work from the inside unless you make some special arrangements. But it will work from the outside, provided you have portforwarded 25 to your server. To make it work from the inside, there are a couple of ways:
-
Use split DNS so that $mydomain resolves to a local private IP address.
-
Use iptables to translate a connection to $mydomain:25 to LANIP:25
Yes I meant postfix when I said about listen to all interfaces
I’m just trying to install everything as per the tutorial you suggested and that guide uses dovecot instead of courier. that’s why I wondered if i might install both, but I have already installed dovecot instead of courier
ken yap wrote:
>
> pjessen;2189817 Wrote:
>> If there is no MX record, an MTA will default to the A or AAAA record
>> for the domain.
>
> I never let the MX default.
Me neither, I was just describing the “rules”.
–
Per Jessen, Zürich (30.8°C)
http://en.opensuse.org/User:Pjessen
kachora wrote:
>
> Yes it is configured to listen to all interfaces. This is why I’m
> troubled. The conf file is written according to all recomendations.
Output from “netstat -ltn” on you mailserver?
> So when it is configured to listen to all interfaces and it listens to
> localhost calls, why doesn’t it listen to the calls made to
> $mydomain.?
Does mydomain resolve to an IP address present on your system?
–
Per Jessen, Zürich (30.8°C)
http://en.opensuse.org/User:Pjessen
You don’t have to delete Courier, you can simply not activate that service.
Ok I checked with netstat -tap | grep postfix and I get nothing
netstat -tap | grep smtp
tcp 0 0 *:smtp : LISTEN 15208/master
tcp 0 0 *:smtp : LISTEN 15208/master
That’s fine. Postfix is a bunch of processes and master is indeed the one listening for SMTP traffic.
daemon started – version 2.7.1, configuration /etc/postfix
Jul 16 23:37:01 ns1 postfix/qmgr[21468]: warning: database /etc/postfix/relay.db is older than source file /etc/postfix/relay
Jul 16 23:37:02 ns1 postfix/qmgr[21468]: 22AC748A6E: from=<raza-ali@cul-ture.ru>, size=357, nrcpt=1 (queue active)
Jul 16 23:37:02 ns1 postfix/trivial-rewrite[21476]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jul 16 23:37:02 ns1 postfix/trivial-rewrite[21476]: warning: database /etc/postfix/relay.db is older than source file /etc/postfix/relay
Jul 16 23:37:02 ns1 postfix/trivial-rewrite[21476]: warning: database /etc/postfix/relocated.db is older than source file /etc/postfix/relocated
Jul 16 23:37:02 ns1 postfix/trivial-rewrite[21476]: warning: database /etc/postfix/transport.db is older than source file /etc/postfix/transport
Jul 16 23:37:02 ns1 postfix/qmgr[21468]: 29EE448A6D: from=<kachora@yahoo.com>, size=350, nrcpt=1 (queue active)
Jul 16 23:37:02 ns1 postfix/qmgr[21468]: 81FB248A6B: from=<kachora@yahoo.com>, size=344, nrcpt=1 (queue active)
Jul 16 23:37:02 ns1 postfix/pipe[21478]: warning: database /etc/postfix/relay.db is older than source file /etc/postfix/relay
Jul 16 23:37:02 ns1 postfix/pipe[21479]: warning: database /etc/postfix/relay.db is older than source file /etc/postfix/relay
Jul 16 23:37:02 ns1 postfix/pipe[21482]: warning: database /etc/postfix/relay.db is older than source file /etc/postfix/relay
This is the log file info after starting postfix.
What do you think that I should do here. I’m unable to understand the log