LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   postfix not responding from freebsd jail (https://www.linuxquestions.org/questions/%2Absd-17/postfix-not-responding-from-freebsd-jail-928536/)

methodtwo 02-09-2012 03:22 PM

postfix not responding from freebsd jail
 
Hi
I'm using FreeBSD-8.2-RELEASE-p6.I created a jail on this host for my mail daemons(postfix+dovecot) to live in.I followed the jail(8) man page and i also installed postfix and dovecot from the ports tree(via mount_nullfs /usr/ports $D/usr/ports). I can do:
Code:

$openssl s_client -quiet -connect myhost.mydomain.com:993
and get a response from dovecot(although when connecting from mutt on my client the jailed mailbox is always empty, due to the fact that not even the bsd mail command, when run on this freeBSD jailed system, results in mail appearing in /var/mail/user in the jail).
Also when i try to connect to the jailed postfix by doing:
Code:

$telnet myhost.mydomain 25
on the client box i get no response from postfix.I have the i.p address of the ifconfig alias as the address to listen on in postfix's main.cf. Also both the /etc/hosts(client and server) files list the I.P and hostname of the jailed virtual system and the client's hostname, as well as the loopback interface. Can anyone make any suggestions of what might be wrong?. Postfix starts without any error in this jail. Also i would rather do it without ezjail if at all possible.
thank you very much for any replies

anomie 02-09-2012 04:59 PM

From inside the jail, run:
Code:

# sockstat -4l
Do you see Postfix listening? If so, from the host system, run:
Code:

# tcpdump -i int_here host IP_here and port 25
... where "int_here" is the correct interface (that the jail alias is on), and "IP_here" is the IP address of the jail.

Now run your test again. See any activity from tcpdump(1)?

methodtwo 02-10-2012 10:36 AM

The 3-way-handshake is completed, from the client to the postfix MTA in the jail, but no data is sent or received(to or from postfix). Postfix is also listed in the output of sockstat.

anomie 02-10-2012 01:34 PM

So you're saying the telnet(1) test completes a TCP handshake, but you don't see any welcome chatter from Postfix. Hmm.

Any clues in the Postfix logs? And, out of curiosity, what does your /dev contain (within the jail)?

matiasp 04-19-2012 03:47 AM

I have recently set-up a dovecot + postfix + maia + roundcube server in a jail which is working very nicely. Let me know here what is the status of your deployment and I will probably be able to help if you are still stuck somewhere.

I know this is not the main point of your post, but, to send mail from your host you can do the following:

Running make in /etc/mail creates a bunch of .cf and .mc files with your hostname as basename
Code:

cd /etc/mail;
make

In your_hostname.submit.mc, change 127.0.0.1 to your jail's ip
Code:

FEATURE(`msp', `[127.0.0.1]')dnl
becomes
Code:

FEATURE(`msp', `[your_jail_ip]')dnl
run make again and replace submit.cf with the resulting your_hostname.submit.cf
Code:

make
mv /etc/mail/submit.cf /etc/mail/submit.cf.orig
mv your_hostname.submit.cf submit.cf

You should now be able to send mail via postfix, using mail at the host's command line (or from any other jail where you have done the above).

Code:

mail -v someone@somewhere.net


All times are GMT -5. The time now is 02:38 PM.