Re: Outbound mail bouncing (LDAP)
I dunno. Somehow your Postfix is configured to where "user@outside.addr" is
hitting the virtual_transport rather than the relay_transport.
I'd say to take a close look at the output of the "postconf -n" command
(which shows any changes made that differ from the factory default),
and pay particular attention to items that have the words "virtual",
"domain", and "relay" in the them.
Such as virtual_mailbox_domains, virtual_alias_domains, and relay_domains.
--
Greg
Phil Cairns wrote:
> Thanks for responding, Greg.
>
> Neither relay_transport nor default_transport appeared in main.cf, so I
> assume they were the default values. I've set them both to smtp, and
> observed no change.
>
> While looking at the logs, I realised that we have a couple of filters
> running: one is a decrypt filter, while the other is an encrypt filter.
> Neither is affecting the message content apart from the addition of
> "Received" headers, since the messages don't have the right content.
> They're just passing straight through. I checked in master.cf, and both
> filters look like this (except the second filter's content_filter is
> empty):
>
> 127.0.0.1:10026 inet n - n - - smtpd
> -o content_filter=k2mencd:127.0.0.1:10027
> -o local_recipient_maps=
> -o relay_recipient_maps=
> -o smtpd_restriction_classes=
> -o smtpd_client_restrictions=
> -o smtpd_helo_restrictions=
> -o smtpd_sender_restrictions=
> -o smtpd_recipient_restrictions=permit_mynetworks,che ck_relay_domains
> -o mynetworks=127.0.0.0/8,192.168.0.0/24
> -o strict_rfc821_envelopes=yes
>
> Here is some information from the log file (with the "Fixed query_filter
> (associatedDomain=*) is probably useless" removed):
>
> #-- incoming message --#
> postfix/master[15433]: daemon started -- version 2.1.1
> postfix/smtpd[15438]: connect from unknown[192.168.0.19]
> postfix/smtpd[15438]: 6EFAD15E51: client=unknown[192.168.0.19]
> postfix/cleanup[15440]: 6EFAD15E51: message-id=<442A27CE.50806@internal>
> postfix/qmgr[15435]: 6EFAD15E51: from=<me@internal>, size=717, nrcpt=1
> (queue active)
> postfix/smtpd[15438]: disconnect from unknown[192.168.0.19]
>
> #-- send to first filter --#
> postfix/smtp[15441]: 6EFAD15E51: to=<me@external>,
> relay=127.0.0.1[127.0.0.1], delay=0, status=sent (250 OK)
> postfix/qmgr[15435]: 6EFAD15E51: removed
>
> #-- receive back from first filter --#
> postfix/smtpd[15445]: connect from localhost[127.0.0.1]
> postfix/smtpd[15445]: 007D215E52: client=localhost[127.0.0.1]
> postfix/cleanup[15440]: 007D215E52: message-id=<442A27CE.50806@internal>
> postfix/qmgr[15435]: 007D215E52: from=<me@internal>, size=921, nrcpt=1
> (queue active)
> postfix/smtpd[15445]: disconnect from localhost[127.0.0.1]
>
> #-- send to second filter --#
> postfix/smtp[15446]: 007D215E52: to=<me@external>,
> relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 OK)
> postfix/qmgr[15435]: 007D215E52: removed
>
> #-- receive back from second filter --#
> postfix/smtpd[15448]: connect from localhost[127.0.0.1]
> postfix/smtpd[15448]: 6E56515E52: client=localhost[127.0.0.1]
> postfix/cleanup[15440]: 6E56515E52: message-id=<442A27CE.50806@internal>
> postfix/qmgr[15435]: 6E56515E52: from=<me@internal>, size=1125, nrcpt=1
> (queue active)
> postfix/smtpd[15448]: disconnect from localhost[127.0.0.1]
>
> #-- attempting to send out, but not passing out to smtp
> postfix/virtual[15449]: 6E56515E52: to=<me@external>, relay=virtual,
> delay=0, status=bounced (unknown user: "me@external")
> postfix/cleanup[15440]: AACFC15E61:
> message-id=<20060329062429.AACFC15E61@lnxwb01.internal>
> postfix/qmgr[15435]: AACFC15E61: from=<>, size=2883, nrcpt=1 (queue active)
> postfix/qmgr[15435]: 6E56515E52: removed
>
> #-- failure message back to sender --#
> postfix/virtual[15449]: AACFC15E61: to=<me@internal>,
> orig_to=<me@internal>, relay=virtual, delay=0, status=sent (delivered to
> maildir)
> postfix/qmgr[15435]: AACFC15E61: removed
>
>
>
> Greg Hackney wrote:
>
>> What are these set to?
>> relay_transport
>> default_transport
>>
>> They should probably be "smtp".
>> --
>> Greg
>>
>>
>> Phil Cairns wrote:
>>
>>> Hi,
>>>
>>> We're using Postfix+OpenLDAP+CourierIMAP, with four virtual domains.
>>> Mail coming in from anywhere is OK, and is directed to the right
>>> mailboxes. Mail being relayed via this server from inside to outside
>>> is not working because of a message in the log that reads like this:
>>>
>>> to=<user@outside.addr>, relay=virtual, delay=0, status=bounced
>>> (unknown user: "user@outside.addr")
>>>
>>> This suggests to me that Postfix is trying to relay to a virtual host
>>> that it manages, rather using smtp to relay out, having failed to
>>> look up a virtual address.
>>>
>>> These are the settings in main.cf that I think are relevant:
>>>
>>> mynetworks = 192.168.0.0/24 127.0.0.0/8
>>> local_transport = virtual
>>> smtpd_recipient_restrictions = permit_mynetworks, check_relay_domains
>>>
>>> relayhost is not set
>>> relay_recipient_maps is not set
>>> relay_domains is not set
>>> transport_maps is not set
>>>
>>> Any is gratefully received.
>>>
>>> Phil.
|