Re: Mailman in a jail

2016-04-22 Thread Jim Ohlstein

Hello

On 4/22/16 7:20 AM, Kristof Provost wrote:



On 22 Apr 2016, at 13:11, Jim Ohlstein mailto:j...@ohlste.in>> wrote:

The main gotcha with Mailman is that it defaults to supporting Sendmail.
It actually needs to be rebuilt to work with postfix. That's the first
thing to look at. Did you install from ports or with pkg?


I built it with poudriere using the Postfix option.


Okay, that’s good. I did exactly the same ;)

It’s not quite clear to me if your problem is getting Postfix to deliver
to mailman, or mailman to postfix.

In my setup the list is on a separate (virtual) domain, and uses an
aliases file
(alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases).
That file is maintained by mailman and will have things like 'test:
 "|/usr/local/mailman/mail/mailman post test”’ in it.

Return delivery (i.e. mailman sending mail) is done using the DirectSMTP
module. My ‘SMTPHOST’ is set to the hostname of the jail (so to an IP
address the postfix is listening on). If you’ve still got that set to
the default of ‘localhost’ that might also explain your problems.
It might also be worth playing with telnet inside the jail and
confirming that you can talk to your postfix that way.



That was the problem. I more or less figured it out late last night when 
I looked at the mail logs of the front end server. My setup is like this:


web <--> fontend SSL termination/load balancer/cache <--> multiple 
backends (not web accessible)


Mailman is installed in in a jail in a backend server. That jail has a 
FQDN and it matches that of Mailman (lists.mydomain.com).


So in ~mailman/Mailman/mm_cfg.py I had:

SMTPHOST = 'lists.mydomain.com'

as instructed by the port upon installation.

That wound up having Mailman looking for the _real_ IP of that FQDN for 
the outgoing mail server, which led it back to the frontend server to 
which that IP is actually bound. That Postfix installation refused to 
relay because the IP range of that backend server was not allowed in 
"mynetworks" in its main.cf.


Allowing that IP range on Postfix on the frontend server got outgoing 
mail working late last night. It was a fairly inelegant solution but it 
worked. Editing ~mailman/Mailman/mm_cfg.py as follows got it working in 
the jail:


- SMTPHOST = 'lists.mydomain.com'
+ SMTPHOST = 'jail.ip.address'

What confused me were the port's instructions and the fact that the 
Mailman actually resolved the FQDN and looked for that IP externally.


Thanks to everyone who helped. I'm a bit embarrassed at the simplicity 
of the solution.


--
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the 
difference." - Mark Twain

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Mailman in a jail

2016-04-22 Thread Kristof Provost

> On 22 Apr 2016, at 13:11, Jim Ohlstein  wrote:
>> The main gotcha with Mailman is that it defaults to supporting Sendmail.
>> It actually needs to be rebuilt to work with postfix. That's the first
>> thing to look at. Did you install from ports or with pkg?
> 
> I built it with poudriere using the Postfix option. 
> 
Okay, that’s good. I did exactly the same ;)

It’s not quite clear to me if your problem is getting Postfix to deliver to 
mailman, or mailman to postfix.

In my setup the list is on a separate (virtual) domain, and uses an aliases 
file 
(alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases).
That file is maintained by mailman and will have things like 'test: 
"|/usr/local/mailman/mail/mailman post test”’ in it.

Return delivery (i.e. mailman sending mail) is done using the DirectSMTP 
module. My ‘SMTPHOST’ is set to the hostname of the jail (so to an IP address 
the postfix is listening on). If you’ve still got that set to the default of 
‘localhost’ that might also explain your problems.
It might also be worth playing with telnet inside the jail and confirming that 
you can talk to your postfix that way.

Regards,
Kristof

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Mailman in a jail

2016-04-22 Thread Jim Ohlstein
Hello,

> On Apr 22, 2016, at 6:05 AM, Kristof Provost  wrote:
> 
>> On 2016-04-21 11:21:36 (-0400), Jim Ohlstein  wrote:
>> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything 
>> works, except Mailman doesn't talk to Postfix. Incoming mail works and 
>> posts to the list's archives but no outgoing email is sent. I asked in 
>> the Mailman list and they seem to think it's related to running in a jail.
>> 
>> If anyone's gotten this running in a jail I'd appreciate some input. I'm 
>> not married to Postfix - willing to use a different MTA.
> I'm currently running a Postfix + Mailman instance on 10.3. It does
> indeed work.
> 
> The main gotcha with Mailman is that it defaults to supporting Sendmail.
> It actually needs to be rebuilt to work with postfix. That's the first
> thing to look at. Did you install from ports or with pkg?

I built it with poudriere using the Postfix option. 

Jim
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-22 Thread Kristof Provost
On 2016-04-21 11:21:36 (-0400), Jim Ohlstein  wrote:
> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything 
> works, except Mailman doesn't talk to Postfix. Incoming mail works and 
> posts to the list's archives but no outgoing email is sent. I asked in 
> the Mailman list and they seem to think it's related to running in a jail.
> 
> If anyone's gotten this running in a jail I'd appreciate some input. I'm 
> not married to Postfix - willing to use a different MTA.
> 
I'm currently running a Postfix + Mailman instance on 10.3. It does
indeed work.

The main gotcha with Mailman is that it defaults to supporting Sendmail.
It actually needs to be rebuilt to work with postfix. That's the first
thing to look at. Did you install from ports or with pkg?

Regards,
Kristof
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Bob Eager
On Thu, 21 Apr 2016 15:02:05 -0400
Michael Jung  wrote:

> On 2016-04-21 14:10, Jim Ohlstein wrote:
> > Hello,
> > 
> > On 4/21/16 1:31 PM, Alphons van Werven wrote:
> >> Jim Ohlstein wrote:
> >> 
> >>> Mailman logs show connection errors.
> >> 
> >> I don't know exactly how Postfix and Mailman (try to) communicate
> >> with one
> >> another, but is it possible that SysV IPC has to be enabled for
> >> the jail?
> >> Or maybe raw sockets, although that's probably less likely.
> > 
> > Enabling each did not change the problem. I still see multiple lines
> > like this in Mailman's logs:
> > 
> > Apr 21 14:06:45 2016 (70072) Low level smtp error: [Errno 61]
> > Connection refused, msgid:
> > 
> > Apr 21 14:06:45 2016 (70072) delivery to em...@doman.com failed with
> > code -1: [Errno 61] Connection refused
> > 
> > and nothing in /var/log/maillog
> 
> 
> 
> A long time ago I setup mailman with postfix but not in a jail, from
> my notes here is all I had in
> 
> /usr/local/mailman/Mailman/mm_cfg.py
> 
> IMAGE_LOGOS = '/icons/'
> add_virtualhost('lists.foo.com', 'lists.foo.com')
> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.foo.com']
> DEFAULT_EMAIL_HOST = 'lists.foo.com'
> DEFAULT_URL_HOST = 'lists.foo.com'
> MTA = 'Postfix'
> 
> If you look at /usr/local/etc/mailman/Mailman/Defaults.py and you
> haven't changed the directives below in in mm_cfg.py then they are
> 
> DELIVERY_MODULE = 'SMTPDirect'
> SMTPHOST = 'localhost'

If the mail server is running on lists.foo.com, that's fine. If it's
running on another hostname, then you'll need:

 VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'another.host.name'

as well. I remember adding code for that years ago, and passing it back
to the Mailman people. It made it in eventually.

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Michael Jung

On 2016-04-21 14:10, Jim Ohlstein wrote:

Hello,

On 4/21/16 1:31 PM, Alphons van Werven wrote:

Jim Ohlstein wrote:


Mailman logs show connection errors.


I don't know exactly how Postfix and Mailman (try to) communicate with 
one
another, but is it possible that SysV IPC has to be enabled for the 
jail?

Or maybe raw sockets, although that's probably less likely.


Enabling each did not change the problem. I still see multiple lines
like this in Mailman's logs:

Apr 21 14:06:45 2016 (70072) Low level smtp error: [Errno 61]
Connection refused, msgid:

Apr 21 14:06:45 2016 (70072) delivery to em...@doman.com failed with
code -1: [Errno 61] Connection refused

and nothing in /var/log/maillog




A long time ago I setup mailman with postfix but not in a jail, from
my notes here is all I had in

/usr/local/mailman/Mailman/mm_cfg.py

IMAGE_LOGOS = '/icons/'
add_virtualhost('lists.foo.com', 'lists.foo.com')
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.foo.com']
DEFAULT_EMAIL_HOST = 'lists.foo.com'
DEFAULT_URL_HOST = 'lists.foo.com'
MTA = 'Postfix'

If you look at /usr/local/etc/mailman/Mailman/Defaults.py and you
haven't changed the directives below in in mm_cfg.py then they are

DELIVERY_MODULE = 'SMTPDirect'
SMTPHOST = 'localhost'

Could it be as simple as postfix is not listening on port 25?

Can you 'telnet localhost 25' and "telnet  25' 
sucessfully?



--mikej
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Jim Ohlstein

Hello,

On 4/21/16 12:18 PM, David Wolfskill wrote:

On Thu, Apr 21, 2016 at 11:21:36AM -0400, Jim Ohlstein wrote:

Hello,

I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
works, except Mailman doesn't talk to Postfix. Incoming mail works and
posts to the list's archives but no outgoing email is sent. I asked in
the Mailman list and they seem to think it's related to running in a jail.

If anyone's gotten this running in a jail I'd appreciate some input. I'm
not married to Postfix - willing to use a different MTA.



FWIW, mailman.freebsd.org is implemented this way: it's a jail; both
"mailman" and "postfix" show processes running under the (respective)
IDs:



I see pretty similar results:



d...@mailman.ysv:~ % ps lU mailman
UID   PID  PPID CPU PRI NIVSZ   RSS MWCHAN STAT TT  TIME COMMAND
  91 46905 1   0  20  0 105044 16632 wait   IsJ   -   0:00.04 /usr/local/bin
  91 46906 46905   0  20  0 147696 57836 select SJ-  19:55.33 /usr/local/bin
  91 46907 46905   0  20  0 143856 54844 select SJ-  20:39.62 /usr/local/bin
  91 46908 46905   0  20  0 146928 57828 select SJ-  20:11.64 /usr/local/bin
  91 46909 46905   0  20  0 144112 55084 select SJ-  20:05.08 /usr/local/bin
  91 46910 46905   0  20  0 165972 77940 select SJ-   8:59.94 /usr/local/bin
  91 46911 46905   0  20  0 167252 78760 select SJ-   9:00.74 /usr/local/bin
  91 46912 46905   0  20  0 160340 73732 select SJ-   9:01.35 /usr/local/bin
  91 46913 46905   0  20  0 165204 78460 select SJ-   9:01.00 /usr/local/bin
  91 46914 46905   0  20  0 142564 45556 select SJ-   1:13.76 /usr/local/bin
  91 46915 46905   0  20  0 138324 42776 select SJ-   1:13.19 /usr/local/bin
  91 46916 46905   0  20  0 141396 44808 select SJ-   1:13.59 /usr/local/bin
  91 46917 46905   0  20  0 140260 44956 select SJ-   1:13.38 /usr/local/bin
  91 46918 46905   0  20  0 202736 89700 select SJ-   6:49.71 /usr/local/bin
  91 46919 46905   0  20  0 174576 80544 select SJ-   6:46.04 /usr/local/bin
  91 46920 46905   0  20  0 188400 83560 select SJ-   6:46.32 /usr/local/bin
  91 46921 46905   0  20  0 185328 93104 select SJ-   6:49.27 /usr/local/bin
  91 46922 46905   0  20  0 172784 83460 select SJ-  34:33.65 /usr/local/bin
  91 46923 46905   0  20  0 168688 79560 -  RJ-  34:26.42 /usr/local/bin
  91 46924 46905   0  20  0 168432 79400 select SJ-  34:13.51 /usr/local/bin
  91 46925 46905   0  20  0 167920 77424 select SJ-  34:37.86 /usr/local/bin
  91 46926 46905   0  20  0 175700 84972 select SJ-  17:22.13 /usr/local/bin
  91 46927 46905   0  20  0 153940 66180 select SJ-  17:20.90 /usr/local/bin
  91 46928 46905   0  20  0 171860 79896 select SJ-  17:21.52 /usr/local/bin
  91 46929 46905   0  20  0 174420 86528 select SJ-  17:24.39 /usr/local/bin
  91 46930 46905   0  20  0 104788 16256 select IJ-   0:00.61 /usr/local/bin
  91   346   345   0  52  0  19596  3040 ttyin  I+J   6   0:00.30 -su (tcsh)
  91   339   338   0  24  0  19596  2900 pause  IJ7   0:10.41 -su (tcsh)
  91 55304   339   0  24  0   6228  1532 nanslp I+J   7   0:00.00 sleep 300
  91   358   357   0  36  0  19596  3040 pause  IJ8   0:04.29 -su (tcsh)
  91 55516   358   0  36  0   6228  1532 nanslp I+J   8   0:00.00 sleep 300


# ps lU mailman
UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND
91 70066 1 0 52 0 108860 16712 wait IsJ - 0:00.01 
/usr/local/bin/python2.7 /usr/local/mailman/bin/mailmanctl -s -q start
91 70067 70066 0 20 0 108872 16604 select SJ - 0:00.19 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=ArchRunner:0:1 -s
91 70068 70066 0 20 0 108860 16672 select SJ - 0:00.20 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=BounceRunner:0:1 -s
91 70069 70066 0 20 0 108860 16640 select SJ - 0:00.20 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=CommandRunner:0:1 -s
91 70070 70066 0 20 0 108872 16616 select SJ - 0:00.20 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=IncomingRunner:0:1 -s
91 70071 70066 0 20 0 108872 16728 select SJ - 0:00.21 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=NewsRunner:0:1 -s
91 70072 70066 0 20 0 109384 17272 select SJ - 0:00.32 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=OutgoingRunner:0:1 -s
91 70073 70066 0 20 0 108860 16728 select SJ - 0:00.21 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=VirginRunner:0:1 -s
91 70074 70066 0 52 0 109116 17036 select IJ - 0:00.21 
/usr/local/bin/python2.7 /usr/local/mailman/bin/qrunner 
--runner=RetryRunner:0:1 -s





d...@mailman.ysv:~ % sysctl security.jail.jailed
security.jail.jailed: 1


# sysctl security.jail.jailed
security.jail.jailed: 1


d...@mailman.ysv:~ % id postfix
uid=125(postfix) gid=125(postfix) groups=125(postfix),6(mail)


# id postfix
uid=125(postfix) gid=125(postfix) groups=125(postfix),6(mail)


d...@mailman.ysv:~ % ps lU !$

Re: Mailman in a jail

2016-04-21 Thread Jim Ohlstein

Hello,

On 4/21/16 1:31 PM, Alphons van Werven wrote:

Jim Ohlstein wrote:


Mailman logs show connection errors.


I don't know exactly how Postfix and Mailman (try to) communicate with one
another, but is it possible that SysV IPC has to be enabled for the jail?
Or maybe raw sockets, although that's probably less likely.


Enabling each did not change the problem. I still see multiple lines 
like this in Mailman's logs:


Apr 21 14:06:45 2016 (70072) Low level smtp error: [Errno 61] Connection 
refused, msgid: 
Apr 21 14:06:45 2016 (70072) delivery to em...@doman.com failed with 
code -1: [Errno 61] Connection refused


and nothing in /var/log/maillog

--
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the 
difference." - Mark Twain

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Alphons van Werven
Jim Ohlstein wrote:

> Mailman logs show connection errors. 

I don't know exactly how Postfix and Mailman (try to) communicate with one
another, but is it possible that SysV IPC has to be enabled for the jail?
Or maybe raw sockets, although that's probably less likely.

Fonz

-- 
A.J. "Fonz" van Werven
mailsig: Ob technicas difficultates, lux in fine cuniculum non operatur.


signature.asc
Description: PGP signature


Re: Mailman in a jail

2016-04-21 Thread Jim Ohlstein
Hello,

> On Apr 21, 2016, at 11:41 AM, Jan Bramkamp  wrote:
> 
>> On 21/04/16 17:21, Jim Ohlstein wrote:
>> Hello,
>> 
>> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
>> works, except Mailman doesn't talk to Postfix. Incoming mail works and
>> posts to the list's archives but no outgoing email is sent. I asked in
>> the Mailman list and they seem to think it's related to running in a jail.
>> 
>> If anyone's gotten this running in a jail I'd appreciate some input. I'm
>> not married to Postfix - willing to use a different MTA.
> 
> - Did you enable Postfix in the mailer.conf?

Yes

> - Are Postfix and mailman in the same jail?

Yes

Jim
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Miroslav Lachman

Jim Ohlstein wrote on 04/21/2016 17:21:

Hello,

I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
works, except Mailman doesn't talk to Postfix. Incoming mail works and
posts to the list's archives but no outgoing email is sent. I asked in
the Mailman list and they seem to think it's related to running in a jail.


Can you send messages from this jail throught Postfix?

Does this work:

echo "jail test" | mail -s "Postfix in jail" your-addr...@example.com

Check it in /var/log/maillog and in you own mailbox.

Does Mailman or Postfix logs some errors in log files?

Miroslav Lachman

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Jim Ohlstein
Hello,

> On Apr 21, 2016, at 11:55 AM, Miroslav Lachman <000.f...@quip.cz> wrote:
> 
> Jim Ohlstein wrote on 04/21/2016 17:21:
>> Hello,
>> 
>> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
>> works, except Mailman doesn't talk to Postfix. Incoming mail works and
>> posts to the list's archives but no outgoing email is sent. I asked in
>> the Mailman list and they seem to think it's related to running in a jail.
> 
> Can you send messages from this jail throught Postfix?
> 
> Does this work:
> 
> echo "jail test" | mail -s "Postfix in jail" your-addr...@example.com

Yes

> 
> Check it in /var/log/maillog and in you own mailbox.
> 
> Does Mailman or Postfix logs some errors in log files?

No. Postfix logs correctly but logs no attempts from Mailman. Mailman logs show 
connection errors. 

Jim
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Jim Ohlstein
Hello,

> On Apr 21, 2016, at 11:39 AM, Matthew Seaman  wrote:
> 
>> On 04/21/16 16:21, Jim Ohlstein wrote:
>> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
>> works, except Mailman doesn't talk to Postfix. Incoming mail works and
>> posts to the list's archives but no outgoing email is sent. I asked in
>> the Mailman list and they seem to think it's related to running in a jail.
>> 
>> If anyone's gotten this running in a jail I'd appreciate some input. I'm
>> not married to Postfix - willing to use a different MTA.
> 
> Does mailman try and communicate with postfix over a network socket
> bound to the loopback address?

Not sure. I've never used it before but I've been tasked with converting a flat 
list of 5000+ email addresses into a mailing list. What I know is the 
connection fails and it's not even logged in /var/log/maillog. I've confirmed 
that Postfix can send from the command line (using the "mail" command) and 
receive, and it logs correctly. I assume the attempt isn't reaching Postfix or 
it'd be logged. 

> 
> That's a common gotcha in jails.  There isn't an accessible loopback
> address in a jail[*], but the kernel intercepts connection attempts and
> redirects things via the jail's primary address.  So an application that
> tries to bind to 127.0.0.1 ends up binding to 192.0.2.1 or whatever the
> jail address is.  Most of the time you'll get away with this.  However
> some more security aware applications (like postfix) realise something
> dodgy is going on and refuse to play.
> 
> The answer is basically to configure mailman to talk to postfix by the
> jail's IP explicitly.

Tried that. No joy. The setup is a bit more complex, however. It's a front end 
server which mainly serves as an SSL termination point, cache, and reverse 
proxy to multiple backend servers which are not web accessible. I'm using PF to 
forward SMTP connections directly to the jail IP which is on em0 on this 
particular backend server. I may bite the bullet and try it out outside a jail, 
but would rather not. 

> 
> [*] Unless you're using VIMAGE jails, but that's a topic for another day...
> 

Indeed. Not sure I'm willing to invest time getting that working at the 
compensation I'm getting which is exactly zero. It's for a non-profit at which 
I volunteer my time and know how. 

Thanks,

Jim
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Jan Bramkamp

On 21/04/16 17:21, Jim Ohlstein wrote:

Hello,

I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
works, except Mailman doesn't talk to Postfix. Incoming mail works and
posts to the list's archives but no outgoing email is sent. I asked in
the Mailman list and they seem to think it's related to running in a jail.

If anyone's gotten this running in a jail I'd appreciate some input. I'm
not married to Postfix - willing to use a different MTA.


- Did you enable Postfix in the mailer.conf?
- Are Postfix and mailman in the same jail?
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Mailman in a jail

2016-04-21 Thread Matthew Seaman
On 04/21/16 16:21, Jim Ohlstein wrote:
> I'm trying to get Mailman working in a 10.3 amd64 jail. Everything
> works, except Mailman doesn't talk to Postfix. Incoming mail works and
> posts to the list's archives but no outgoing email is sent. I asked in
> the Mailman list and they seem to think it's related to running in a jail.
> 
> If anyone's gotten this running in a jail I'd appreciate some input. I'm
> not married to Postfix - willing to use a different MTA.

Does mailman try and communicate with postfix over a network socket
bound to the loopback address?

That's a common gotcha in jails.  There isn't an accessible loopback
address in a jail[*], but the kernel intercepts connection attempts and
redirects things via the jail's primary address.  So an application that
tries to bind to 127.0.0.1 ends up binding to 192.0.2.1 or whatever the
jail address is.  Most of the time you'll get away with this.  However
some more security aware applications (like postfix) realise something
dodgy is going on and refuse to play.

The answer is basically to configure mailman to talk to postfix by the
jail's IP explicitly.

Cheers,

Matthew

[*] Unless you're using VIMAGE jails, but that's a topic for another day...



signature.asc
Description: OpenPGP digital signature


Mailman in a jail

2016-04-21 Thread Jim Ohlstein

Hello,

I'm trying to get Mailman working in a 10.3 amd64 jail. Everything 
works, except Mailman doesn't talk to Postfix. Incoming mail works and 
posts to the list's archives but no outgoing email is sent. I asked in 
the Mailman list and they seem to think it's related to running in a jail.


If anyone's gotten this running in a jail I'd appreciate some input. I'm 
not married to Postfix - willing to use a different MTA.


--
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the 
difference." - Mark Twain

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"