Discussion:
Mailman with postfixadmin + postfix + mysql +dovecot + squirrelmail
(too old to reply)
mouss
2007-12-07 23:35:17 UTC
Permalink
Richard Pyne wrote:
> Please forgive me if this is off topic, but I have not been able to get
> much useful advice elsewhere.
>
> I have a fairly new mail server that handles multiple virtual domains. It
> was set up using postfix (2.4.6), postfixadmin (2.1.0), dovecot (1.0.7),
> mysql (5.0.45), maia mailguard (1.0.2) and squirrelmail (1.4.11).
> Everything has been running great for a few months. I am now trying to add
> Mailman to the mix and am not having much success. My mailing lists are
> all being mapped to $mydomain and then bounce because the user is unknown:
>
>
> For example:
>
> <***@email-coop.com> (expanded from <***@freeutah.org>):
> unknown user: "***@email-coop.com"
>
> The log shows:
>
> Dec 7 05:02:54 utah amavis[16086]: (16086-07) LMTP::10024
> /var/amavisd/tmp/amavis-20071207T021722-16086: <***@kinfolk.org> ->
> <***@freeutah.org> Received: SIZE=1238 from utah.email-coop.com
> ([127.0.0.1]) by localhost (utah.email-coop.com [127.0.0.1]) (amavisd-
> maia, port 10024) with LMTP id 16086-07 for <***@freeutah.org>; Fri,
> 7 Dec 2007 05:02:54 -0700 (MST)
> Dec 7 05:02:54 utah amavis[16086]: (16086-07) Checking: [67.50.205.81]
> <***@kinfolk.org> -> <***@freeutah.org>
> Dec 7 05:03:01 utah amavis[16086]: (16086-07) FWD via SMTP:
> [127.0.0.1]:10025 <***@kinfolk.org> -> <***@freeutah.org>
> Dec 7 05:03:05 utah amavis[16086]: (16086-07) Passed CLEAN,
> [67.50.205.81] [67.50.205.66] <***@kinfolk.org> ->
> <***@freeutah.org>, Message-ID:
> <***@rpyne.kinfolk.org>, Hits: 0.354, 11579 ms
> Dec 7 05:03:05 utah postfix/lmtp[17307]: 2742C3358:
> to=<***@freeutah.org>, relay=127.0.0.1[127.0.0.1]:10024, delay=15,
> delays=2.2/1.4/0.35/11, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=16086-07,
> from MTA: 250 2.0.0 Ok: queued as 0A69BA921)
> Dec 7 05:03:08 utah postfix/virtual[17318]: 0A69BA921: to=<***@email-
> coop.com>, orig_to=<***@freeutah.org>, relay=virtual, delay=4.7,
> delays=1.4/0.32/0/3, dsn=5.1.1, status=bounced (unknown user:
> "***@email-coop.com")
>
> In this case, ***@freeutah.org is the list on the virtual domain and
> email-coop.com is the real domain of the server.

and how was the first address mapped to the second one? I see no
virtual_alias_maps in your postconf -n.

anyway, email-coop.com is not a local domain (not in mydestination). I
guess it is a virtual mailbox domain. if so, does
***@email-coop.com exists in virtual_mailbox_maps?

PS. you probably want to redirect to ***@localhost.email-coop.com
instead. otherwise, unix aliases (including mailman ones) won't be used.

>
> My postconf -n says:
>
> alias_database = hash:/etc/postfix/aliases
> alias_maps = hash:/var/mailman/data/aliases, hash:/etc/postfix/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> debug_peer_level = 2
> html_directory = no
> mail_owner = postfix
> mail_spool_directory = /var/spool/mail
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/share/man
> message_size_limit = 40960000
> mydestination = localhost.$mydomain, localhost
> mydomain = email-coop.com
> myhostname = utah.email-coop.com
> myorigin = email-coop.com
> newaliases_path = /usr/bin/newaliases
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix
> sample_directory = /usr/share/doc/postfix/samples
> sendmail_path = /usr/sbin/sendmail
> setgid_group = postdrop
> smtpd_recipient_restrictions = permit_mynetworks,
> reject_non_fqdn_recipient, check_client_access hash:/etc/postfix/pop-
> before-smtp, reject_unauth_destination, reject_unknown_sender_domain,
> check_policy_service inet:127.0.0.1:10023
> smtpd_sasl_path = private/auth
> smtpd_sasl_type = dovecot
> transport_maps = hash:/etc/postfix/transport
> unknown_local_recipient_reject_code = 550
> virtual_gid_maps = static:35
> virtual_mailbox_base = /var/spool/virtual
> virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
> virtual_mailbox_limit = 51200000
> virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
> virtual_minimum_uid = 17
> virtual_transport = virtual
> virtual_uid_maps = static:17
>
> Any guidance will be greatly appreciated.
>
> Thanks,
>
> --Richard
>
>
Magnus Bäck
2007-12-08 09:18:04 UTC
Permalink
On Saturday, December 08, 2007 at 02:48 CET,
Richard Pyne <***@kinfolk.org> wrote:

> On 8 Dec 2007 at 0:35, mouss wrote:
>
> > and how was the first address mapped to the second one? I see no
> > virtual_alias_maps in your postconf -n.
>
> /var/mailman/data/virtual-mailman contains:
>
> ***@freeutah.org testlist

So? You're not using /var/mailman/data/virtual-mailman according to your
"postconf -n" output.

> which (I thought) should then be directed back to mailman from the line in
> /var/mailman/data/aliases that reads:
>
> testlist: "|/var/mailman/mail/mailman post testlist"

Only if myorigin is a local domain. Unqualified addresses in the
right-hand side of a virtual alias table do not necessarily map
to a local domain. They are rewritten to form fully-qualified
addresses using myorigin. Either make sure myorigin specifies
a local domain (but that has other implications so you probably
don't want that) or make sure a full address is specified in the
virtual alias table.

***@freeutah.org ***@localhost

[...]

--
Magnus Bäck
***@dsek.lth.se
Richard Pyne
2007-12-08 17:01:06 UTC
Permalink
On 8 Dec 2007 at 10:18, Magnus Bäck wrote:

> On Saturday, December 08, 2007 at 02:48 CET,
> Richard Pyne <***@kinfolk.org> wrote:
>
> > On 8 Dec 2007 at 0:35, mouss wrote:
> >
> > > and how was the first address mapped to the second one? I see no
> > > virtual_alias_maps in your postconf -n.
> >
> > /var/mailman/data/virtual-mailman contains:
> >
> > ***@freeutah.org testlist
>
> So? You're not using /var/mailman/data/virtual-mailman according to your
> "postconf -n" output.

Interesting that it didn't show up in postconf -n, but I have the line:

virtual_maps = hash:/var/mailman/data/virtual-mailman,
mysql:/etc/postfix/mysql_virtual_alias_maps.cf

in main.cf

> > which (I thought) should then be directed back to mailman from the line
> > in /var/mailman/data/aliases that reads:
> >
> > testlist: "|/var/mailman/mail/mailman post testlist"
>
> Only if myorigin is a local domain. Unqualified addresses in the
> right-hand side of a virtual alias table do not necessarily map
> to a local domain. They are rewritten to form fully-qualified
> addresses using myorigin. Either make sure myorigin specifies
> a local domain (but that has other implications so you probably
> don't want that) or make sure a full address is specified in the
> virtual alias table.
>
> ***@freeutah.org ***@localhost
>
> [...]
mouss
2007-12-08 19:09:03 UTC
Permalink
Richard Pyne wrote:
> On 8 Dec 2007 at 10:18, Magnus Bäck wrote:
>
>> On Saturday, December 08, 2007 at 02:48 CET,
>> Richard Pyne <***@kinfolk.org> wrote:
>>
>>> On 8 Dec 2007 at 0:35, mouss wrote:
>>>
>>>> and how was the first address mapped to the second one? I see no
>>>> virtual_alias_maps in your postconf -n.
>>> /var/mailman/data/virtual-mailman contains:
>>>
>>> ***@freeutah.org testlist
>> So? You're not using /var/mailman/data/virtual-mailman according to your
>> "postconf -n" output.
>
> Interesting that it didn't show up in postconf -n, but I have the line:
>
> virtual_maps = hash:/var/mailman/data/virtual-mailman,
> mysql:/etc/postfix/mysql_virtual_alias_maps.cf
>

it's because you're using the "obsolete" variable. consider using
virtual_alias_maps instead. Also, always use fqdn addresses in virtual
alias maps.

Anyway, with this, you have
***@freeutah.org => ***@email-coop.com
(@$myorigin appended), and this is confirmed by the log error (orig_to
is the @freu... and to is the @email...).

but ***@email-coop.com does not exist.


> in main.cf
>
>>> which (I thought) should then be directed back to mailman from the line
>>> in /var/mailman/data/aliases that reads:
>>>
>>> testlist: "|/var/mailman/mail/mailman post testlist"

This will not happen. virtual does not run commands. you need to
redirect to a "local" address (one with a domain in mydestination). This
is why I suggested that you redirect to ***@localhost or
***@localhost.email-coop.com.

>> Only if myorigin is a local domain. Unqualified addresses in the
>> right-hand side of a virtual alias table do not necessarily map
>> to a local domain. They are rewritten to form fully-qualified
>> addresses using myorigin. Either make sure myorigin specifies
>> a local domain (but that has other implications so you probably
>> don't want that) or make sure a full address is specified in the
>> virtual alias table.
>>
>> ***@freeutah.org ***@localhost
>>
>> [...]
>
>
>
>
Loading...