* README.postfix
@ 2009-12-17 9:13 Andreas Schneider
2009-12-17 11:51 ` README.postfix Morten Kirkegaard Poulsen
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Andreas Schneider @ 2009-12-17 9:13 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]
Hi,
I've updated README.postfix as it doesn't work with latest postfix.
-- andreas
[-- Attachment #1.2: README.postfix --]
[-- Type: text/x-readme, Size: 5395 bytes --]
README.postfix Dec 16th 2009
POSTFIX ISSUES
The main issue with Postfix and mlmmj is the mlmmj requirement that
the mlmmj executables must be executed by root or the owner of the
list directory.
This is at odds with Postfix. The standard local delivery mechanism
for Postfix is local(8) that ships with Postfix. According to
local(8) delivery to external programs is done on behalf of the
receiving user. But when delivering to a program without using a
.forward file there is no user context. And using an alias file
does not provide user context.
The man page also explains that in the absence of user context the
local(8) daemon will use the owner of the :include: file from the
aliases file. But this is a problem too. By default :include:
files are disabled as a security precaution in aliases files for
delivering to external programs.
This leaves us with a conundrum on how to execute the mlmmj
executables as an 'mlmmj' user without using alias files. One
answer is to use a postfix transport.
First we'll get the 'mlmmj' user setup and then move onto the
postfix configuration:
MLMMJ SETUP
Create a 'mlmmj' user that will own all the lists. Use whatever
user creation app/script is provided by your system. Generally
'useradd'.
Create the spool directory that is owned by the 'mlmmj' user.
This is typically /var/spool/mlmmj but can be any directory so long
as it is owned by 'mlmmj'. It can even be the home directory of the
'mlmmj' user. If the spool directory is not /var/spool/mlmmj then
everywhere in this file replace /var/spool/mlmmj with your spool
directory.
Create a mailing list using mlmmj-make-ml.sh. Make sure to use the
-s flag to set the spool directory if it isn't /var/spool/mlmmj
POSTFIX SETUP
First thing is to make sure that the postfix server accepts mail for
the mailing lists. For a server that handles mail for multiple
domains, this is done with a 'virtual_alias_map'. This is how I'll
demonstrate.
Add a virtual_alias_map file to main.cf configuration. We'll use a
regular expression map since we need to be able to match all the
various mjmml delimiter addresses (list-subscribe, list-unsubscribe,
etc)
main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual,
regexp:/var/spool/mlmmj/virtual.regexp
/var/spool/mlmmj/virtual.regexp:
/^(mlmmj-test.*)@example\.com$/ ${1}
/^(another-list.*)@sample\.com$/ ${1}
One line needs to be in the virtual map for each list the 'mlmmj' id
is to handle. The regex formula is:
/^(list-name.*)@(domain\.com)$/ ${1}
Next we make sure that postfix can invoke the mlmmj executables as
the 'mlmmj' user. This is where the transport map comes in. So we
add a transport map and a configuration option that instructs the
transport to only deliver one file at a time. See transport(5) for
more information on transports.
main.cf:
transport_maps = regexp:/var/spool/mlmmj/transport
mlmmj_destination_recipient_limit = 1
/var/spool/mlmmj/transport:
/^(list-test).*$/ mlmmj:list-test
/^(another-list).*$/ mlmmj:another-list
What this transport file says, is that any message destined for an
email address that matches the regexp on the left, deliver it using
the transport 'mlmmj' and setting 'nexthop' to the value in $1.
Which in this case is the mailing list name. 'nexthop' is special
variable for transports.
Now we setup the 'mlmmj' transport. The 'mlmmj' in mlmmj:$1 above
indicates a transport listed in the postfix master.cf file. We are
just going to create a transport called 'mlmmj' but it is nothing
more than a pipe(8) to the mlmmj-recieve program that is invoked as
the 'mlmmj' user.
master.cf:
# mlmmj mailing lists
mlmmj unix - n n - - pipe
flags=DORhu user=mlmmj argv=/usr/local/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/
This takes the pipe(8) postfix delivery agent and tells it to invoke
'/usr/local/bin/mlmmj-recieve' as the 'mlmmj' user and pipe the
email to it on stdin. This mode of transportation is given the name
'mlmmj'.
The 'flags' parameter to pipe(8) is pretty critical here. In
particular if the 'R' option is not used mlmmj-recieve fails to
recieve the mail correctly. The options mean:
D - Prepend a 'Delivered-To: recipient' header
O - Prepend an 'X-Original-To: recipient' header
R - Prepend a 'Return-Path:'. header
h - fold $nexthop to lowercase
u - fold $recipient to lowercase
$nexthop gets set to what was on the right had side of the ':' in
the transport file. The way we have that configured is that
$nexthop will get set to the name of the mailing list.
Restart postfix and enjoy your new lists.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
@ 2009-12-17 11:51 ` Morten Kirkegaard Poulsen
2009-12-17 11:53 ` README.postfix Mads Martin Jørgensen
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Morten Kirkegaard Poulsen @ 2009-12-17 11:51 UTC (permalink / raw)
To: mlmmj
On Thu, 2009-12-17 at 10:13 +0100, Andreas Schneider wrote:
> I've updated README.postfix as it doesn't work with latest postfix.
Thanks Andreas. Does the updated README.postfix still apply to older
versions of Postfix?
Morten
--
Morten Kirkegaard Poulsen <mopo@fabletech.com>
CTO, FableTech
http://fabletech.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
2009-12-17 11:51 ` README.postfix Morten Kirkegaard Poulsen
@ 2009-12-17 11:53 ` Mads Martin Jørgensen
2009-12-17 12:13 ` README.postfix Andreas Schneider
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Mads Martin Jørgensen @ 2009-12-17 11:53 UTC (permalink / raw)
To: mlmmj
On 17/12/2009, at 10.13, Andreas Schneider wrote:
> I've updated README.postfix as it doesn't work with latest postfix.
Thanks a lot. Would the previous Postfix work with the new one? In case it doesn't, it would be great if you would add both things in the file. Something like:
For Postfix <= 5.2.9
For Postfix > 5.2.9
Where each section has what works.
Regards,
Mads Martin
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
2009-12-17 11:51 ` README.postfix Morten Kirkegaard Poulsen
2009-12-17 11:53 ` README.postfix Mads Martin Jørgensen
@ 2009-12-17 12:13 ` Andreas Schneider
2009-12-17 12:14 ` README.postfix Mads Martin Jørgensen
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andreas Schneider @ 2009-12-17 12:13 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: Text/Plain, Size: 660 bytes --]
On Thursday 17 December 2009 12:53:35 Mads Martin Jørgensen wrote:
> On 17/12/2009, at 10.13, Andreas Schneider wrote:
> > I've updated README.postfix as it doesn't work with latest postfix.
>
> Thanks a lot. Would the previous Postfix work with the new one? In case it
> doesn't, it would be great if you would add both things in the file.
> Something like:
>
> For Postfix <= 5.2.9
>
> For Postfix > 5.2.9
The new postfix is just more strict. You are not allowed to do mlmmj:$1
anymore. You have to specify the destination like mlmmj:my-list.
So this will work with old and new versions of postfix.
Cheers,
-- andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (2 preceding siblings ...)
2009-12-17 12:13 ` README.postfix Andreas Schneider
@ 2009-12-17 12:14 ` Mads Martin Jørgensen
2009-12-17 12:28 ` README.postfix Michael Rasmussen
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Mads Martin Jørgensen @ 2009-12-17 12:14 UTC (permalink / raw)
To: mlmmj
On 17/12/2009, at 13.13, Andreas Schneider wrote:
> So this will work with old and new versions of postfix.
Wunderbar! Thanks again.
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (3 preceding siblings ...)
2009-12-17 12:14 ` README.postfix Mads Martin Jørgensen
@ 2009-12-17 12:28 ` Michael Rasmussen
2009-12-17 15:39 ` README.postfix Andreas Schneider
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael Rasmussen @ 2009-12-17 12:28 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]
On Thu, 17 Dec 2009 13:13:46 +0100
Andreas Schneider <mail@cynapses.org> wrote:
>
> The new postfix is just more strict. You are not allowed to do mlmmj:$1
> anymore. You have to specify the destination like mlmmj:my-list.
>
More strict is not the precise explanation:-) The correct term would be
to say that never versions of Postfix does not allow variable
substitution via $n variables anymore in transport maps.
--
Hilsen/Regards
Michael Rasmussen
Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
You teach best what you most need to learn.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (4 preceding siblings ...)
2009-12-17 12:28 ` README.postfix Michael Rasmussen
@ 2009-12-17 15:39 ` Andreas Schneider
2009-12-20 22:45 ` README.postfix Morten Kirkegaard Poulsen
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andreas Schneider @ 2009-12-17 15:39 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: Text/Plain, Size: 337 bytes --]
On Thursday 17 December 2009 13:28:13 Michael Rasmussen wrote:
> More strict is not the precise explanation:-) The correct term would be
> to say that never versions of Postfix does not allow variable
> substitution via $n variables anymore in transport maps.
>
Thanks for the the more appropriate explanation.
-- andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (5 preceding siblings ...)
2009-12-17 15:39 ` README.postfix Andreas Schneider
@ 2009-12-20 22:45 ` Morten Kirkegaard Poulsen
2009-12-21 0:18 ` README.postfix Andreas Schneider
2009-12-21 6:25 ` README.postfix Morten Kirkegaard Poulsen
8 siblings, 0 replies; 10+ messages in thread
From: Morten Kirkegaard Poulsen @ 2009-12-20 22:45 UTC (permalink / raw)
To: mlmmj
On Thu, 2009-12-17 at 13:13 +0100, Andreas Schneider wrote:
> On Thursday 17 December 2009 12:53:35 Mads Martin Jørgensen wrote:
> > On 17/12/2009, at 10.13, Andreas Schneider wrote:
> > > I've updated README.postfix as it doesn't work with latest postfix.
> >
> > Thanks a lot. Would the previous Postfix work with the new one?
...
> this will work with old and new versions of postfix.
Perfect. Absolutely perfect.
I tried to diff it against the original, but there was no README.postfix
in mlmmj's CVS repository. I searched the archives, and found one
written by Jeremy Hinegardner in November 2005. I must have forgotten to
commit it. Typically me. But this is the one your version is based on,
right? I just wanted to make sure, so you both get credit.
Morten
--
Morten Kirkegaard Poulsen <mopo@fabletech.com>
CTO, FableTech
http://fabletech.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (6 preceding siblings ...)
2009-12-20 22:45 ` README.postfix Morten Kirkegaard Poulsen
@ 2009-12-21 0:18 ` Andreas Schneider
2009-12-21 6:25 ` README.postfix Morten Kirkegaard Poulsen
8 siblings, 0 replies; 10+ messages in thread
From: Andreas Schneider @ 2009-12-21 0:18 UTC (permalink / raw)
To: mlmmj
[-- Attachment #1: Type: Text/Plain, Size: 1297 bytes --]
On Sunday 20 December 2009 23:45:01 Morten Kirkegaard Poulsen wrote:
> On Thu, 2009-12-17 at 13:13 +0100, Andreas Schneider wrote:
> > On Thursday 17 December 2009 12:53:35 Mads Martin Jørgensen wrote:
> > > On 17/12/2009, at 10.13, Andreas Schneider wrote:
> > > > I've updated README.postfix as it doesn't work with latest postfix.
> > >
> > > Thanks a lot. Would the previous Postfix work with the new one?
>
> ...
>
> > this will work with old and new versions of postfix.
>
> Perfect. Absolutely perfect.
>
> I tried to diff it against the original, but there was no README.postfix
> in mlmmj's CVS repository. I searched the archives, and found one
> written by Jeremy Hinegardner in November 2005. I must have forgotten to
> commit it. Typically me. But this is the one your version is based on,
> right? I just wanted to make sure, so you both get credit.
>
> Morten
>
Yes, it is based on the README from 2005. It still has to be improved but it
will work for most things.
Example:
You have a mailing list: sv@example.com and setup the rules following to the
howto. If you now have mailboxes for normal users there too, then and you
write a mail to sven@somedomain.com and it will and up in mlmmj.
-- andreas
Cheers,
-- andreas
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: README.postfix
2009-12-17 9:13 README.postfix Andreas Schneider
` (7 preceding siblings ...)
2009-12-21 0:18 ` README.postfix Andreas Schneider
@ 2009-12-21 6:25 ` Morten Kirkegaard Poulsen
8 siblings, 0 replies; 10+ messages in thread
From: Morten Kirkegaard Poulsen @ 2009-12-21 6:25 UTC (permalink / raw)
To: mlmmj
On Mon, 2009-12-21 at 01:18 +0100, Andreas Schneider wrote:
> Yes, it is based on the README from 2005. It still has to be improved but it
> will work for most things.
Okay. I've committed it to CVS now, so it will be in the next release of
mlmmj.
> Example:
>
> You have a mailing list: sv@example.com and setup the rules following to the
> howto. If you now have mailboxes for normal users there too, then and you
> write a mail to sven@somedomain.com and it will and up in mlmmj.
If you find the time to clarify it in the text, or a way to solve it,
please send a patch :-)
Morten
--
Morten Kirkegaard Poulsen <mopo@fabletech.com>
CTO, FableTech
http://fabletech.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-12-21 6:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17 9:13 README.postfix Andreas Schneider
2009-12-17 11:51 ` README.postfix Morten Kirkegaard Poulsen
2009-12-17 11:53 ` README.postfix Mads Martin Jørgensen
2009-12-17 12:13 ` README.postfix Andreas Schneider
2009-12-17 12:14 ` README.postfix Mads Martin Jørgensen
2009-12-17 12:28 ` README.postfix Michael Rasmussen
2009-12-17 15:39 ` README.postfix Andreas Schneider
2009-12-20 22:45 ` README.postfix Morten Kirkegaard Poulsen
2009-12-21 0:18 ` README.postfix Andreas Schneider
2009-12-21 6:25 ` README.postfix Morten Kirkegaard Poulsen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.