problem with virtual domains and mailman

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with virtual domains and mailman

Göran Höglund
Hi

I have been running a postfix/courier mailserver with virtual users and
Maildir for a while.
Now I need to setup a mailinglist and I have choosen mailman.

The installation of mailman did work well but somewhere I fail to get
the aliasing work properlly.
I get the following errorlog in maillog:

Feb  8 11:34:11 apollo postfix/smtpd[11557]: NOQUEUE: reject: RCPT from
unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient address
rejected: User unknown in virtual mailbox table; from=<[hidden email]>
to=<[hidden email]> proto=ESMTP helo=<[192.168.0.4]>

My main.cf is configured as follows:

alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
virtual_alias_maps =
     proxy:mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
     proxy:mysql:/etc/postfix/mysql-virtual-mailbox-to-alias-maps.cf
     hash:/usr/local/mailman/data/aliases

The aliases in /usr/local/mailman/data/aliases looks like
# STANZA START: mailman
# CREATED: Thu Feb  5 17:30:26 2009
mailman:             "|/usr/local/mailman/mail/mailman post mailman"
mailman-admin:       "|/usr/local/mailman/mail/mailman admin mailman"
mailman-bounces:     "|/usr/local/mailman/mail/mailman bounces mailman"
mailman-confirm:     "|/usr/local/mailman/mail/mailman confirm mailman"
mailman-join:        "|/usr/local/mailman/mail/mailman join mailman"
mailman-leave:       "|/usr/local/mailman/mail/mailman leave mailman"
mailman-owner:       "|/usr/local/mailman/mail/mailman owner mailman"
mailman-request:     "|/usr/local/mailman/mail/mailman request mailman"
mailman-subscribe:   "|/usr/local/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe mailman"
# STANZA END: mailman

# STANZA START: test_all
# CREATED: Sun Feb  8 11:22:01 2009
test_all:             "|/usr/local/mailman/mail/mailman post test_all"
test_all-admin:       "|/usr/local/mailman/mail/mailman admin test_all"
test_all-bounces:     "|/usr/local/mailman/mail/mailman bounces test_all"
test_all-confirm:     "|/usr/local/mailman/mail/mailman confirm test_all"
test_all-join:        "|/usr/local/mailman/mail/mailman join test_all"
test_all-leave:       "|/usr/local/mailman/mail/mailman leave test_all"
test_all-owner:       "|/usr/local/mailman/mail/mailman owner test_all"
test_all-request:     "|/usr/local/mailman/mail/mailman request test_all"
test_all-subscribe:   "|/usr/local/mailman/mail/mailman subscribe test_all"
test_all-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe
test_all"
# STANZA END: test_all

Any one who out there who might tell me what I have done wrong??
regards Göran
Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

mouss-4
Göran Höglund a écrit :

> [snip]
>
> Feb  8 11:34:11 apollo postfix/smtpd[11557]: NOQUEUE: reject: RCPT from
> unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient address
> rejected: User unknown in virtual mailbox table; from=<[hidden email]>
> to=<[hidden email]> proto=ESMTP helo=<[192.168.0.4]>
>
> [snip]
> test_all:             "|/usr/local/mailman/mail/mailman post test_all"
> [snip]
>
> Any one who out there who might tell me what I have done wrong??
> regards Göran

test-all != test_all

Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

Göran Höglund
Hi
Sorry my fault! I did change the original listname and made an error in
the snippet.
Here is the correct errorlog:
Feb  8 13:06:05 apollo postfix/smtpd[12115]: NOQUEUE: reject: RCPT from
unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient
address rejected: User unknown in virtual mailbox table;
from=<[hidden email]> to=<[hidden email]> proto=ESMTP
helo=<[192.168.0.4]>

And my alias file looks as below. It seems as if Postfix ignores this
alias file or do I need to define a mailbox for the list, I have lost
track here.

/GH


mouss skrev:

> Göran Höglund a écrit :
>  
>> [snip]
>>
>> Feb  8 11:34:11 apollo postfix/smtpd[11557]: NOQUEUE: reject: RCPT from
>> unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient address
>> rejected: User unknown in virtual mailbox table; from=<[hidden email]>
>> to=<[hidden email]> proto=ESMTP helo=<[192.168.0.4]>
>>
>> [snip]
>> test_all:             "|/usr/local/mailman/mail/mailman post test_all"
>> [snip]
>>
>> Any one who out there who might tell me what I have done wrong??
>> regards Göran
>>    
>
> test-all != test_all
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

mouss-4
Göran Höglund a écrit :

> Hi
> Sorry my fault! I did change the original listname and made an error in
> the snippet.
> Here is the correct errorlog:
> Feb  8 13:06:05 apollo postfix/smtpd[12115]: NOQUEUE: reject: RCPT from
> unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient
> address rejected: User unknown in virtual mailbox table;
> from=<[hidden email]> to=<[hidden email]> proto=ESMTP
> helo=<[192.168.0.4]>
>
> And my alias file looks as below. It seems as if Postfix ignores this
> alias file or do I need to define a mailbox for the list, I have lost
> track here.
>

alias_maps is only used for local domains (domains listed in
mydestination). but telemar.se is listed in virtual_mailbox_maps.

if you want to use alias_maps, you need to use virtual_alias_maps to
pass the addresses to a domain that is listed in mydestination
(localhost?). note that virtual won't execute commands, so you can't
simply put your aliases in virtual_alias_maps. you need a two-steps
process (first to pass mail to a local domain, and then use alias_maps
to exec mailman).

a better idea is to use a dedicated domain, say lists.telemar.se. you
can then simply list this domain in mydestination, and alias_maps will
do the rest.


Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

Göran Höglund
Hi
As I understod your posting I'd simply make an addenment to mydestination:

mydestination = $myhostname, localhost.$mydomain, localhost,
lists.telemar.se

Copying your suggestion and I have my aliases files in my alias_maps:
alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
and
alias_database = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases

I got one step further mailman is found as a local user causing my
server to accept the mail but the redirection fails.
I must have mixed up domain or something

Error message in the bounced email corresponds to my maillogs error:

<"|/usr/local/mailman/mail/mailman post mailman"@apollo.telemar.se> (expanded
    from <[hidden email]>): unknown user:
    "|/usr/local/mailman/mail/mailman post mailman"

Im confused here...

/GH


mouss skrev:

> Göran Höglund a écrit :
>  
>> Hi
>> Sorry my fault! I did change the original listname and made an error in
>> the snippet.
>> Here is the correct errorlog:
>> Feb  8 13:06:05 apollo postfix/smtpd[12115]: NOQUEUE: reject: RCPT from
>> unknown[172.16.254.4]: 550 5.1.1 <[hidden email]>: Recipient
>> address rejected: User unknown in virtual mailbox table;
>> from=<[hidden email]> to=<[hidden email]> proto=ESMTP
>> helo=<[192.168.0.4]>
>>
>> And my alias file looks as below. It seems as if Postfix ignores this
>> alias file or do I need to define a mailbox for the list, I have lost
>> track here.
>>
>>    
>
> alias_maps is only used for local domains (domains listed in
> mydestination). but telemar.se is listed in virtual_mailbox_maps.
>
> if you want to use alias_maps, you need to use virtual_alias_maps to
> pass the addresses to a domain that is listed in mydestination
> (localhost?). note that virtual won't execute commands, so you can't
> simply put your aliases in virtual_alias_maps. you need a two-steps
> process (first to pass mail to a local domain, and then use alias_maps
> to exec mailman).
>
> a better idea is to use a dedicated domain, say lists.telemar.se. you
> can then simply list this domain in mydestination, and alias_maps will
> do the rest.
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

Göran Höglund
In reply to this post by Göran Höglund
Hi
Ok this is the output, the mailman is a standard install right out of
the box.

# postconf -n
alias_database = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
default_process_limit = 50
delay_warning_time = 4h
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = /etc/postfix/html
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mailbox_size_limit = 102400000
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
maximal_queue_lifetime = 5d
message_size_limit = 20280000
mydestination = $myhostname, localhost.$mydomain, localhost,
lists.telemar.se
mydomain = telemar.se
myhostname = apollo.telemar.se
mynetworks = $config_directory/mynetworks
newaliases_path = /usr/bin/newaliases
parent_domain_matches_subdomains =
proxy_read_maps = $local_recipient_maps, $mydestination,
$virtual_alias_maps, $virtual_alias_domains, $virtual_mailbox_maps,
$virtual_mailbox_domains, $relay_recipient_maps, $relay_domains,
$canonical_maps, $sender_canonical_maps, $recipient_canonical_maps,
$relocated_maps, $transport_maps, $mynetworks, $smtpd_recipient_restrictions
queue_directory = /var/spool/postfix
readme_directory = /etc/postfix/readmes
recipient_delimiter = +
relayhost = 172.16.1.10
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_data_restrictions = reject_unauth_pipelining, permit
smtpd_helo_restrictions =
smtpd_recipient_limit = 250
smtpd_recipient_restrictions = check_client_access
proxy:mysql:/etc/postfix/mysql-client-access.cf, check_sender_access
proxy:mysql:/etc/postfix/mysql-sender-access.cf, check_recipient_access
proxy:mysql:/etc/postfix/mysql-recipient-access.cf,
permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination,
reject_invalid_helo_hostname, reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unknown_sender_domain,
reject_unknown_recipient_domain, reject_rbl_client list.dsbl.org,
reject_rbl_client cbl.abuseat.org, reject_rbl_client dnsbl.njabl.org, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions =
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /usr/local/ssl/apollo.telemar.se.crt
smtpd_tls_key_file = /usr/local/ssl/apollo.telemar.se.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/etc/postfix/tls_smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
proxy:mysql:/etc/postfix/mysql-virtual-alias-domains.cf
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
proxy:mysql:/etc/postfix/mysql-virtual-mailbox-to-alias-maps.cf
hash:/usr/local/mailman/data/aliases
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_limit = 102400000
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = maildrop

/GH

Wietse Venema skrev:

> G?ran H?glund:
>  
>> Hi
>> As I understod your posting I'd simply make an addenment to mydestination:
>>
>> mydestination = $myhostname, localhost.$mydomain, localhost,
>> lists.telemar.se
>>
>> Copying your suggestion and I have my aliases files in my alias_maps:
>> alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
>> and
>> alias_database = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases
>>
>> I got one step further mailman is found as a local user causing my
>> server to accept the mail but the redirection fails.
>> I must have mixed up domain or something
>>
>> Error message in the bounced email corresponds to my maillogs error:
>>
>> <"|/usr/local/mailman/mail/mailman post mailman"@apollo.telemar.se> (expanded
>>     from <[hidden email]>): unknown user:
>>     "|/usr/local/mailman/mail/mailman post mailman"
>>
>> Im confused here...
>>    
>
> You're mixing up virtual aliases with local aliases.
>
> We can clear this up if you can show the "postconf -n" command
> output, instead of selectively pasting what you believe is relevant.
>
> Wietse
>  

Reply | Threaded
Open this post in threaded view
|

Re: problem with virtual domains and mailman

Göran Höglund
In reply to this post by Göran Höglund
Hi
Thanks that helped!

Now i just have to get the listmanager deliver the mails ... But that is
another list I assume.

/GH

Wietse Venema skrev:

> G?ran H?glund:
>  
>> virtual_alias_maps =
>> proxy:mysql:/etc/postfix/mysql-virtual-alias-maps.cf,
>> proxy:mysql:/etc/postfix/mysql-virtual-mailbox-to-alias-maps.cf
>> hash:/usr/local/mailman/data/aliases
>>    
>
> As I suspected, you are mixing local alias syntax with virtual
> alias syntax.
>
> The two have different syntax.  In particular, virtual aliases do
> not support "|command" syntax, and local aliases never have a
> @domain part.
>
> Remove the domain from virtual_alias_domains, and remove
> mailman/data/aliases from virtual_alias_maps.
>
> Add the domain to mydestination, and add mailman/data/aliases to
> the alias_maps and alias_database parameters.
>
> Wietse
>