PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > mailing.postfix.users > Outbound mail bouncing (LDAP)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Outbound mail bouncing (LDAP)

Réponse
 
LinkBack Outils de la discussion
Vieux 29/03/2006, 01h34   #1 (permalink)
Phil Cairns
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Outbound mail bouncing (LDAP)

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.
  Réponse avec citation
Vieux 29/03/2006, 03h36   #2 (permalink)
Greg Hackney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Outbound mail bouncing (LDAP)

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.

  Réponse avec citation
Vieux 29/03/2006, 06h46   #3 (permalink)
Phil Cairns
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Outbound mail bouncing (LDAP)

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.

  Réponse avec citation
Vieux 29/03/2006, 14h49   #4 (permalink)
Greg Hackney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.

  Réponse avec citation
Vieux 29/03/2006, 20h43   #5 (permalink)
Phil Cairns
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Outbound mail bouncing (LDAP)

Greg Hackney wrote:

> I dunno. Somehow your Postfix is configured to where "user@outside.addr" is
> hitting the virtual_transport rather than the relay_transport.


I've got it ... the clue was here:

>> Here is some information from the log file (with the "Fixed
>> query_filter (associatedDomain=*) is probably useless" removed):


My query to the LDAP server had a "*" instead of a "%s", so it was
coming back and saying that any destination server was one of the
virtual servers that I hosted, hence it was using the virtual transport
for everything.

I found this out by changing the mydestination to exclude
ldap:acceptdomains, and hardcoding the domain names instead.

I had to pull out the relay_transport=smtp and default_transport=smtp
settings, since it was trying to deliver everything by smtp instead of
putting mail in the MailDir folders (I think). In any case, it works now.

Thanks for taking the time, Greg.

Phil.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h51.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15085 seconds with 13 queries