From: Guy on
Hi,

I've installed mailman on my postfix gateways but I've run into a
problem with the virtual aliases for it.

I've got a hash file added to the virtual_alias_maps with entries like this:
test(a)lists.domain2.net lists.domain2.net=test
test-admin(a)lists.domain2.net lists.domain2.net=test-admin

And a hash file added to alias_maps that looks like this:
lists.domain2.net=test: "|/usr/lib/mailman/mail/mailman post
test(a)lists.domain2.net"
lists.domain2.net=test-admin: "|/usr/lib/mailman/mail/mailman admin
test(a)lists.domain2.net"

The problem I get is that when sending to test(a)lists.domain2.net I get
this bounce message:
<lists.domain2.net=test(a)domain1.org>: mail for domain1.org loops back to myself

I've tried adding
local_header_rewrite_clients =
to my main.cf but still get the same bounce message.

Is there some other way to stop postfix appending $mydomain or some
other better way of allowing the mailman aliases to work properly?

Thanks
Guy

--
Don't just do something...sit there!

From: Barney Desmond on
On 4 February 2010 20:23, Guy <wyldfury(a)gmail.com> wrote:
> The problem I get is that when sending to test(a)lists.domain2.net I get
> this bounce message:
> <lists.domain2.net=test(a)domain1.org>: mail for domain1.org loops back to myself

Can you post the output of `postconf -n`? I suspect domain1.org is
meant to be listed in your $mydestination, but isn't (there's plenty
of possible causes for this problem, which is
configuration-dependent).

> Is there some other way to stop postfix appending $mydomain or some
> other better way of allowing the mailman aliases to work properly?

If I recall, Postfix is actually appending $myorigin to your
virtual_alias_maps values.

From: Guy on
On 4 February 2010 10:12, Barney Desmond <barneydesmond(a)gmail.com> wrote:
> Can you post the output of `postconf -n`? I suspect domain1.org is
> meant to be listed in your $mydestination, but isn't (there's plenty
> of possible causes for this problem, which is
> configuration-dependent).

postconf -n is below. domain1.org is the domain used for naming all my
servers. The main domain that we redirect all postmaster/abuse etc to
is domain1.net.

> If I recall, Postfix is actually appending $myorigin to your
> virtual_alias_maps values.

Yep, which it as far as I understand it should be doing by default
(local_header_rewrite_clients (default: permit_inet_interfaces)). Not
sure whether I can stop it doing that for those aliases or whether I
should be looking to change them in the mailman virtual-mailman file.

root(a)pichi:/etc/postfix# postconf -n
2bounce_notice_recipient = postmaster(a)domain1.net
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases hash:/var/lib/mailman/data/aliases
anvil_rate_time_unit = 60s
biff = no
bounce_notice_recipient = postmaster(a)domain1.net
bounce_template_file = /etc/postfix/bounce.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
delay_warning_time = 4h
error_notice_recipient = postmaster(a)domain1.net
inet_interfaces = all
local_header_rewrite_clients =
local_recipient_maps =
local_transport = error:local mail delivery is disabled
mail_owner = postfix
mailq_path = /usr/bin/mailq
maximal_queue_lifetime = 2d
message_size_limit = 31240000
mydestination =
myhostname = gateway1.domain1.org
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
proxy_read_maps = $relay_domains $relay_recipient_maps
$virtual_alias_maps $transport_maps
queue_directory = /var/spool/postfix
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains.cf
proxy:mysql:/etc/postfix/mysql_list_relay_domains.cf
relay_recipient_maps =
proxy:mysql:/etc/postfix/mysql_relay_recipient_maps.cf
proxy:mysql:/etc/postfix/mysql_relay_recipient_alias_maps.cf
proxy:mysql:/etc/postfix/mysql_list_relay_recipient_maps.cf
remote_header_rewrite_domain = domain.unspecified
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_connection_count_limit = 50
smtpd_client_connection_rate_limit = 100
smtpd_client_message_rate_limit = 500
smtpd_client_recipient_rate_limit = 100
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031,
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_unknown_sender_domain, reject_unknown_recipient_domain,
permit_mynetworks, reject_unauth_destination,
check_client_access cidr:/etc/postfix/postfix-dnswl-permit,
check_client_access cidr:/etc/postfix/postfix-dnswl-custom,
reject_invalid_hostname, check_recipient_access
mysql:/etc/postfix/mysql_spamcheck_alias_bypass.cf
mysql:/etc/postfix/mysql_spamcheck_bypass.cf, reject_rbl_client
zen.spamhaus.org, reject_rbl_client bl.spamcop.net,
reject_rbl_client b.barracudacentral.org, reject_rbl_client
dnsbl.aluminati.org, check_policy_service inet:127.0.0.1:10031,
permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_path = private/auth-client
smtpd_sasl_type = dovecot
smtpd_soft_error_limit = 10
smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtpd_tls_cert_file = /etc/ssl/certs/imapd.pem
smtpd_tls_key_file = /etc/ssl/private/imapd.key
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/virtual_exception_transport_maps
proxy:mysql:/etc/postfix/mysql_transport_maps.cf
unknown_local_recipient_reject_code = 550
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
proxy:mysql:/etc/postfix/mysql_virtual_catchall_maps.cf
hash:/var/lib/mailman/data/virtual-mailman


--
Don't just do something...sit there!

From: Barney Desmond on
On 4 February 2010 21:29, Guy <wyldfury(a)gmail.com> wrote:
> On 4 February 2010 10:12, Barney Desmond <barneydesmond(a)gmail.com> wrote:
>> Can you post the output of `postconf -n`? I suspect domain1.org is
>> meant to be listed in your $mydestination, but isn't (there's plenty
>> of possible causes for this problem, which is
>> configuration-dependent).
>
> postconf -n is below. domain1.org is the domain used for naming all my
> servers. The main domain that we redirect all postmaster/abuse etc to
> is domain1.net.
>
>> If I recall, Postfix is actually appending $myorigin to your
>> virtual_alias_maps values.
>
> Yep, which it as far as I understand it should be doing by default
> (local_header_rewrite_clients (default: permit_inet_interfaces)). Not
> sure whether I can stop it doing that for those aliases or whether I
> should be looking to change them in the mailman virtual-mailman file.

Hm, I'll have to defer to more experienced hands, this setup is more
interesting than I'm certain about.

> root(a)pichi:/etc/postfix# postconf -n
> mydestination =
> myhostname = gateway1.domain1.org
> mynetworks = 127.0.0.0/8
> myorigin = $mydomain

I'm thinking postfix appends $myorigin and realises it needs to
forward it (because $myorigin isn't in $mydestination). However,
$myorigin = $mydomain, and $mydomain defaults to $myhostname, minus
the first component. I assume this box == domain1.net, in some way.

Having an empty mydestination is quite odd, normally you'd at least
accept mail for $myhostname, then alias it off somewhere that you
*really* want it.

Unless I'm mistaken, you'll need a non-empty $mydestination if you're
going to use alias_maps.