How can I set up a local mail server inside firewall using qmail?

How can I set up a local mail server inside firewall using qmail?

Post by Hu » Fri, 27 Apr 2001 08:44:27



Hello,

I've tried to set up a qmail mail server for the local network inside firewall but, local delivery is failed and outgoing mails are very weird. I'm thinking of installation of DNS server for the local network. Is it correct?

The problem is like these.

I set the hostname 'localhost' and domain name as 'localdomain.'
./config in qmail-1.0.3 source complained it could not find IP address for the host


Your hostname is localhost.
Your host's fully qualified name in DNS is localhost.
Putting localhost into control/me...
Putting localhost into control/defaultdomain...
Putting localhost into control/plusdomain...

Checking local IP addresses:
127.0.0.1: Adding localhost to control/locals...
192.168.1.10: PTR lookup failed. I assume this address has no DNS name

If there are any other domain names that point to you,
you will have to add them to /var/qmail/control/locals.
You don't have to worry about aliases, i.e., domains with CNAME record

Copying /var/qmail/control/locals to /var/qmail/control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to those hosts.
Make sure to change rcpthosts if you add hosts to locals or virtualdom

After setting the domain as above, the qmail could not send e-mails for outside.

The local delivery for the general users in the mail server machine didn't worked out. I had installed $HOME/Maildir/ and $HOME/Mailbox, and $HOME/.qmail following the install guide in qmail-1.0.3. When I send e-mail by "telnet localhost 25", the log dispay success of delivery. There is no mails arrived in the user's mailbox.

Should I install a DNS server in the mail server to solve this problem? or Did I miss something?

Thanks in advance,
Hun

--

Registered Linux user #207121
http://counter.li.org

 
 
 

How can I set up a local mail server inside firewall using qmail?

Post by Dean Thompso » Fri, 27 Apr 2001 09:15:28


Hi!,

Quote:> I've tried to set up a qmail mail server for the local network inside
> firewall but, local delivery is failed and outgoing mails are very weird.
> I'm thinking of installation of DNS server for the local network. Is it
> correct?

Your problems that you describe are hostname and IP based.  The DNS server is
one way of fixing the problem.

> The problem is like these.

> I set the hostname 'localhost' and domain name as 'localdomain.'
> ./config in qmail-1.0.3 source complained it could not find IP address for
> the host


> Your hostname is localhost.
> Your host's fully qualified name in DNS is localhost.
> Putting localhost into control/me...
> Putting localhost into control/defaultdomain...
> Putting localhost into control/plusdomain...

Your fully qualified hostname looks wrong.  I thought you said that your
hostname was localhost and your domain name was localdomain.  If this is the
case, why is it that your hosts fully qualified name looks like
localhost.localhost.

Quote:> Checking local IP addresses:
> 127.0.0.1: Adding localhost to control/locals...
> 192.168.1.10: PTR lookup failed. I assume this address has no DNS name

Check what your /etc/hosts looks like.  I preusme that localhost and
localdomain actually link back to an IP address.  If Qmail can't resolve the
FQDN to a IP address it will complain.

[...]

> After setting the domain as above, the qmail could not send e-mails for

> and other mail servers. So, I changed the /var/qmail/control/defaulthost
> file, put the ISP's domain name. Then, outgoing mails started work.

This makes sense.  Outside mail hosts are not going to accept mail from
machines that don't have a valid email address.  This indiciates to them that
they shouldn't trust the incoming mail.  If your hostname doesn't resolve back
into a valid MX record or a valida host, your mail won't be accepted.

Quote:> The local delivery for the general users in the mail server machine didn't
> worked out. I had installed $HOME/Maildir/ and $HOME/Mailbox, and
> $HOME/.qmail following the install guide in qmail-1.0.3. When I send e-mail
> by "telnet localhost 25", the log dispay success of delivery. There is no
> mails arrived in the user's mailbox.

What do the mail logs suggest is going on.  Is there a record of the mail
being placed anywhere in the /var/spool/mqueue directory.  Remember, the mail
delivery should be in /var/spool/mqueue.  It is up to the mail client to
transfer the data across to the users own home directory.

Quote:> Should I install a DNS server in the mail server to solve this problem? or
> Did I miss something?

Take a look at your /etc/hosts to make sure that the hostname is resolveable
to an IP address.  Also make sure that when you send mail out, you send it out
with a valid from address otherwise outside machines will reject the mail.
Check your mail delivery location as well, I am sure that it should be a spool
directory and not the users home directory.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

How can I set up a local mail server inside firewall using qmail?

Post by Nick Lockye » Fri, 04 May 2001 00:10:30


yes ensure in the /etc/hosts file that all is in order
you probably need

    127.0.0.1    localhost
    192.168.1.10    localhost


Quote:> Hello,

> I've tried to set up a qmail mail server for the local network inside

firewall but, local delivery is failed and outgoing mails are very weird.
I'm thinking of installation of DNS server for the local network. Is it
correct?

> The problem is like these.

> I set the hostname 'localhost' and domain name as 'localdomain.'
> ./config in qmail-1.0.3 source complained it could not find IP address for
the host


> Your hostname is localhost.
> Your host's fully qualified name in DNS is localhost.
> Putting localhost into control/me...
> Putting localhost into control/defaultdomain...
> Putting localhost into control/plusdomain...

> Checking local IP addresses:
> 127.0.0.1: Adding localhost to control/locals...
> 192.168.1.10: PTR lookup failed. I assume this address has no DNS name

> If there are any other domain names that point to you,
> you will have to add them to /var/qmail/control/locals.
> You don't have to worry about aliases, i.e., domains with CNAME record

> Copying /var/qmail/control/locals to /var/qmail/control/rcpthosts...
> Now qmail will refuse to accept SMTP messages except to those hosts.
> Make sure to change rcpthosts if you add hosts to locals or virtualdom

> After setting the domain as above, the qmail could not send e-mails for
outside.


mail servers. So, I changed the /var/qmail/control/defaulthost file, put the
ISP's domain name. Then, outgoing mails started work.
Quote:

> The local delivery for the general users in the mail server machine didn't

worked out. I had installed $HOME/Maildir/ and $HOME/Mailbox, and
$HOME/.qmail following the install guide in qmail-1.0.3. When I send e-mail
by "telnet localhost 25", the log dispay success of delivery. There is no
mails arrived in the user's mailbox.
Quote:

> Should I install a DNS server in the mail server to solve this problem? or

Did I miss something?

- Show quoted text -

Quote:

> Thanks in advance,
> Hun

> --

> Registered Linux user #207121
> http://counter.li.org

 
 
 

1. FTP client inside linux firewall communicating with FTP server inside another linux firewall

I am trying to use an Windows FTP client (BPFTP) behind a linux
firewall computer running ipchains and ipmasqadm portfw to communicate
with an Windows FTP server (War, G6, ServU) behind another linux
firewall set up more or less the same way. The server is on port 21,
but I have port fowarding on the linux box that redirects port 27015
to port 21 on the internal FTP server. I also forwarded port 20 on the
external firewall to port 20 on the internal computer with the FTP
server. I can communicate with the FTP server from outside the
firewall from an un-firewalled computer, but not using PASV. From the
FTP client inside the linux firewalled LAN I can connect, but do
nothing else. I'm sure someone in this group is very familiar with
this issue and can help me.

Any help will be appreciated. Thanks.

2. SLIP server??

3. How can I check mail delivery is success when using other mail server inside ISP?

4. RH 5.2 / compiler question

5. mail server inside firewall/proxy

6. Fix alignment of i386 interrupt entry stubs

7. How to receive mail when the my (behind the firewall)local news server is down

8. Newbie Traffic Shaping

9. Setting up sendmail to send non-local mail to SMTP proxy server

10. qmail POP and local mail delivery

11. Local mail server using Microsoft Outlook Express as *pure* network client

12. Set up local IMAP server for mail storage?

13. Local Mail (using "mail") Does Not Get Delivered?