Configuring an offline mail server on Ubuntu LTS (likely DNS issue)?

0

So, the idea here is to have people connect to my VM mail server in a LAN scenario, log into a mail account I've set up with inbox contents of my engineering to do some anti-phishing training. My problem is that I can't seem to get it all quite working right, and I think the issue is DNS, since from my Windows 7 client VM I can connect to the mailuser@IPaddress but can't do mailuser@test.lab (my spoofed domain.) I'm using Thunderbird within Windows to connect to the Ubuntu server, and am using Postfix with Dovecot for the mail server with a typical LAMP stack.

Contents of named.conf.local

zone "test.lab" IN {
    type master;
    file "/etc/bind/zones/db.test.lab";
};

zone "56.168.192.in-addr.arpa" {
    type master;
    file "etc/bind/zones/rev.56.168.192.in-addr.arpa";
};

Contents of db.test.lab

; BIND data file for local loopback interface
;
STTL    604800
@    IN    SOA    mailserv.test.lab. root.test.lab.    (
            8 ; Serial (I've incremented each time I've modified this file)
            604800
            86400
            2419200
            604800 )
; Name servers
test.lab.    IN    NS    mailserv.test.lab.

;MX record for mail server
test.lab.    IN    MX    1    mailserv.test.lab.

;Client records
slave        IN    A    192.168.56.105 ; <- Hardcoded Win7 IP address

Content of rev.56.168.192.in-addr.arpa

@    IN    SOA    mailserv.test.lab.    root.test.lab. (
            5
            8H
            4H
            4W
            1D )

IN    NS    mailserv.test.lab.
1    IN    PTR    test.lab.

Content of /etc/hosts

127.0.0.1    localhost
127.0.1.1    mailserv
192.168.56.101    mailserv.test.lab    mailserv

Arvandor

Posted 2014-10-17T16:59:58.987

Reputation: 43

Answers

0

You didn't include an A record for mailserv.test.lab in your test.lab zone file. You reference it in the MX record. This is highly likely the cause of mail delivery failure.

Add this:

mailserv.test.lab.   IN  A   192.168.56.101

milli

Posted 2014-10-17T16:59:58.987

Reputation: 1 682

Sorry for the slow response, been a crazy few weeks. I added the A record, and I can still connect with the client VM as mailuser@192.168.56.101, but I can't connect to mailuser@test.lab. I can also ping 192.168.56.101, but can't ping mailserv or mailserv.test.lab. I set the DNS server to 192.168.56.101 in the network adapter settings, so that should be ok. – Arvandor – 2014-10-27T23:05:18.063