Re: [Mimedefang] REVISED: postfix/mimedefang socket

2018-07-27 Thread Dianne Skoll
On Mon, 23 Jul 2018 03:31:06 -0500 Richard Laager wrote: > I have attached updated systemd service files, with the PID file > directly in /run, which I have tested with 2.84. This change also > requires specifying a lock file in $SPOOLDIR. Thanks! I'll put these in the next release. Regards,

[Mimedefang] REVISED: postfix/mimedefang socket

2018-07-23 Thread Richard Laager
I have attached updated systemd service files, with the PID file directly in /run, which I have tested with 2.84. This change also requires specifying a lock file in $SPOOLDIR. If you prefer a diff rather than new files, I also attached a diff against 2.84. This includes and builds upon my last

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-12-09 Thread Richard Laager
I ran into a problem with my systemd units for MIMEDefang. There is a race condition between mimedefang-multiplexor creating the socket and mimedefang trying to access it. If the multiplexor doesn't create the socket in time, mimedefang fails on startup. This is happening because Type=simple

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-10-05 Thread Dianne Skoll
On Wed, 4 Oct 2017 18:58:39 -0500 Richard Laager wrote: > I have submitted the slightly updated versions to Debian: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877663 > Dianne, you may want to ship these (or similar) upstream, but that's > obviously up to you. It

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-10-04 Thread Richard Laager
On 09/28/2017 11:11 PM, Richard Laager wrote: > I have attached fully split, native, Type=simple (not forking) unit > files, which I have tested on Ubuntu 16.04. I have submitted the slightly updated versions to Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877663 Dianne, you may

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-29 Thread Dianne Skoll
On Thu, 28 Sep 2017 23:11:18 -0500 Richard Laager wrote: > 1) Is it necessary to rm $SOCKET and $MX_SOCKET *before starting*? It's best to do so because if mimedefang or mimedefang-multiplexor crashes, the socket files will be left lying around and startup will likely fail.

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-28 Thread Richard Laager
I have attached fully split, native, Type=simple (not forking) unit files, which I have tested on Ubuntu 16.04. They honor the settings in /etc/default/mimedefang. This includes the MX_USER setting (i.e. systemd does not directly control the service user). They are configured such that if you do

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-28 Thread Richard Laager
For those of you that don't use systemd, you can just ignore this. None of this affects the SysV init scripts in any way. Here's a first run at the diff from the generated unit to a manual unit to fix the issue. The relevant change is making ExecStop use "stop wait" instead of just "stop". The

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-27 Thread Bill Cole
On 26 Sep 2017, at 23:47, Michael Fox wrote: Bill, you and Dianne are both right, depending on the version. See my previous message. I provided a diff between v2.78 and v2.79. That's only in the Debian variant, not Dianne's original code. Everything in the top-level 'debian' directory of

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Michael Fox
> I'm uneasy telling any author that they're wrong about their own code > but as far as I can tell, that is only conditionally true: Bill, you and Dianne are both right, depending on the version. See my previous message. I provided a diff between v2.78 and v2.79. In v2.79, 'wait' is always

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Dianne Skoll
On Tue, 26 Sep 2017 15:48:42 -0400 "Bill Cole" wrote: > I'm uneasy telling any author that they're wrong about their own code > but as far as I can tell, that is only conditionally true: Oh dear... you are correct. :) Seeing as I don't use those scripts

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Bill Cole
On 26 Sep 2017, at 11:53, Dianne Skoll wrote: On Tue, 26 Sep 2017 09:38:18 -0400 "Bill Cole" wrote: bigsky:mimedefang-2.82 bill$ grep -A3 'stop)' The stop_it function in init-script.in and the stop function in redhat/mimedefang-init.in both wait for

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Dianne Skoll
On Tue, 26 Sep 2017 09:38:18 -0400 "Bill Cole" wrote: > bigsky:mimedefang-2.82 bill$ grep -A3 'stop)' The stop_it function in init-script.in and the stop function in redhat/mimedefang-init.in both wait for the daemons to exit. Regards, Dianne.

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Bill Cole
On 26 Sep 2017, at 9:24, Dianne Skoll wrote: On Mon, 25 Sep 2017 16:08:46 -0500 Richard Laager wrote: There are a couple ways to address this. As discussed, the init script can be changed to always wait on stop. Then the automatic mapping in systemd should Just Work.

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-26 Thread Dianne Skoll
On Mon, 25 Sep 2017 16:08:46 -0500 Richard Laager wrote: > There are a couple ways to address this. As discussed, the init script > can be changed to always wait on stop. Then the automatic mapping in > systemd should Just Work. The sample init script that ships with

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-25 Thread Richard Laager
On 09/25/2017 12:14 AM, Bill Cole wrote: > A service definition in a unit file has an ExecStart definition > and maybe an ExecStop definition ExecStop must not return until the service has actually stopped: https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStop= There are

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-25 Thread Michael Fox
> > That way, they could define restart any way they like, such as "stop > > wait" followed by "start". > > Nope. A service definition in a unit file has an ExecStart definition > and maybe an ExecStop definition, but there is no support in systemd for > an ExecRestart attribute. It's a design

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-24 Thread Bill Cole
On 23 Sep 2017, at 20:37, Michael Fox wrote: Thanks Bill, After some more research I found the bug and I think I've "fixed" it. See below. Option 1: Use inet socket /etc/default/mimedefang: SOCKET=inet:8899@localhost

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-23 Thread Michael Fox
Thanks Bill, After some more research I found the bug and I think I've "fixed" it. See below. > > Option 1: Use inet socket > > > > /etc/default/mimedefang: > > SOCKET=inet:8899@localhost > > > > /etc/postfix/main.cf > > smtpd_milters =

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-23 Thread Bill Cole
On 22 Sep 2017, at 13:47, Michael Fox wrote: Sorry if this has been asked/answered before. I've searched and searched and found no consistent, complete answers. What are the steps to configure MIMEDefang and Postix to share a socket? The workable solutions depend on your OS (and with

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-23 Thread Dianne Skoll
On Fri, 22 Sep 2017 23:59:38 -0700 "Michael Fox" wrote: > This seems like a clear bug in MIMEDefang. Not at all. This problem is not present with Sendmail, so I have no idea what would cause it with Postfix. Removing the MIMEDefang socket prior to starting MIMEDefang should

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-23 Thread Michael Fox
To: Michael Fox <n...@mefox.org> > Cc: mimedefang@lists.roaringpenguin.com > Subject: Re: [Mimedefang] REVISED: postfix/mimedefang socket > > On 09/22/2017 12:47 PM, Michael Fox wrote: > > Option 3: Use unix socket in Postfix chroot jail > > This looks to be wha

Re: [Mimedefang] REVISED: postfix/mimedefang socket

2017-09-22 Thread Richard Laager
On 09/22/2017 12:47 PM, Michael Fox wrote: > Option 3: Use unix socket in Postfix chroot jail This looks to be what I do. I'm running Postfix and MIMEDefang on Ubuntu, both from packages. Postfix runs as the postfix user, and there's a defang group. I run Postfix in a chroot. These appear to be

[Mimedefang] REVISED: postfix/mimedefang socket

2017-09-22 Thread Michael Fox
Sorry if this has been asked/answered before. I've searched and searched and found no consistent, complete answers. What are the steps to configure MIMEDefang and Postix to share a socket? Here's what I tried: Option 1: Use inet socket