From: Patric Falinder on
Patric Falinder skrev 2010-04-15 08:21:
> Mark Martinec skrev 2010-04-13 14:17:
>> Patric,
>>
>>> I looked in to it a little more and it looks like Maia re-writes the
>>> new.sub.domain.com to sub.domain.com.
>>> I get:
>>>
>>> /usr/sbin/amavisd-new[22834]: (22834-04) Checking: [62.127.194.20]
>>> <patric.falinder(a)omg.nu> ->
>>> <patric.falinder(a)sub.domain.com>,<patric.falinder(a)sub.domain.com>
>>>
>>> When I guess it should be:
>>>
>>> /usr/sbin/amavisd-new[22834]: (22834-04) Checking: [62.127.194.20]
>>> <patric.falinder(a)omg.nu> ->
>>> <patric.falinder(a)sub.domain.com>,<patric.falinder(a)new.sub.domain.com>
>>>
>>> Maybe this is more of a Maia problem so I will ask there if no one here
>>> knows whats wrong.
>>
>> I very much doubt it is the Maia doing a rewrite.
>> More likely your smtp_generic mapping or masquerading.
>> Keep in mind that a post-queue content filtered message
>> goes through Postfix twice.
>>
>> Mark
> I asked at the Maia-list and they said that I should do the "split"
> after amavisd-maia processes the message and that I maybe could do
> something like this in master.cf:
>
> 127.0.0.1:10025 inet n - n - - smtpd
> -o content_filter=
> -o local_recipient_maps=
> [snip]
> -o recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc
>
> So I did and restarted postfix, and after that I only get:
> "host 127.0.0.1[127.0.0.1] said: 450 4.4.1 Can't connect to localhost
> port 10025"
> I tried manually telnet to port 10025 but it didn't work, I checked in
> netstat if something was listening to port 10025 and there was..
>
> This is how it looks in my master.cf, only pasted the 10025 part:
>
> 127.0.0.1:10025 inet n - - - - smtpd
> -o content_filter=
> -o local_recipient_maps=
> -o relay_recipient_maps=
> -o smtpd_restriction_classes=
> -o smtpd_delay_reject=no
> -o smtpd_client_restrictions=permit_mynetworks,reject
> -o smtpd_helo_restrictions=
> -o smtpd_sender_restrictions=
> -o smtpd_recipient_restrictions=permit_mynetworks,reject
> -o mynetworks_style=host
> -o mynetworks=127.0.0.0/8,10.0.0.0/24
> -o strict_rfc821_envelopes=yes
> -o smtpd_error_sleep_time=0
> -o smtpd_soft_error_limit=1001
> -o smtpd_hard_error_limit=1000
> -o smtpd_client_connection_count_limit=0
> -o smtpd_client_connection_rate_limit=0
> -o
> receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
>
> Is it not possible to add "-o recipient_bcc_maps =
> regexp:/etc/postfix/recipient_bcc" in master.cf? How should I do to make
> the "split" after maia has processed the message if this doesn't work?
>
>
> Thanks,
> Patric
Ok after a little trail and error I tried to remove the
"no_address_mappings" from "-o receive_override_options=" in mater.cf
and it started working:D I did as I first was told, with the options in
main.cf so I didn't add the -o recipient_bcc_maps =
regexp:/etc/postfix/recipient_bcc in master.cf. btw, does anyone know
what no_address_mappings does in receive_override_options?

Thank you very much for your expert help! I can finally start migrating
users to my new server:)

Thanks,
Patric

From: Wietse Venema on
Patric Falinder:
> Ok after a little trail and error I tried to remove the
> "no_address_mappings" from "-o receive_override_options=" in mater.cf
> and it started working:D I did as I first was told, with the options in
> main.cf so I didn't add the -o recipient_bcc_maps =
> regexp:/etc/postfix/recipient_bcc in master.cf. btw, does anyone know
> what no_address_mappings does in receive_override_options?

If in doubt read the documentation:

man 5 postconf
....
receive_override_options (default: empty)
Enable or disable recipient validation, built-in content filtering, or
address mapping. Typically, these are specified in master.cf as com-
mand-line arguments for the smtpd(8), qmqpd(8) or pickup(8) daemons.
....
no_address_mappings
Disable canonical address mapping, virtual alias map expansion,
address masquerading, and automatic BCC (blind carbon-copy)
recipients. This is typically specified BEFORE an external con-
tent filter.

Wietse