This is a discussion on Re: Postfix + LDAP + Transport Maps within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Mon, 27 Sep 2004 12:39:01 +0200, Magnus B=E4ck <magnus@dsek.lth.se> wrot= e: &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Mon, 27 Sep 2004 12:39:01 +0200, Magnus B=E4ck <magnus@dsek.lth.se> wrot=
e: > On Monday, September 27, 2004 at 12:23 CEST, > James Wilson <james.wilson77@gmail.com> wrote: >=20 > > I have Postfix and LDAP working like a charm. However we have a > > customer requirement to route messages based on the mailHost attribute > > in each user. This works. However when sending mail out of the > > environment, destined to an external address. Mail loops... I've > > tried using relayhost, static transport has files as well as the LDAP > > entry. Can someone point out what I'm sure is a blatent mistake :) >=20 > Show logs of this, or otherwise describe it in greater detail. Loops > take place when two hosts don't agree on whose responsibility it is to > do the final delivery of a message. I've been playing and now get the following, when sending a message from a local user to an internet user Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22341]: connect from smtp.decs.sa.edu.au[172.18.0.156] Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22341]: 980EF18C087: client=3Dsmtp.decs.sa.edu.au[172.18.0.156] Sep 27 21:21:42 decs-smtp3 postfix/cleanup[22343]: 980EF18C087: message-id=3D<00af01c4a488$63058470$fd06030a@midnight> Sep 27 21:21:42 decs-smtp3 postfix/nqmgr[19048]: 980EF18C087: from=3D<admin.epi@epi.sa.edu.au>, size=3D1806, nrcpt=3D1 (queue active) Sep 27 21:21:42 decs-smtp3 clamsmtpd: 100125: accepted connection from: 127.0.0.1 Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22341]: disconnect from smtp.decs.sa.edu.au[172.18.0.156] Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22347]: connect from localhost.localdomain[127.0.0.1] Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22347]: C3B7A18C08A: client=3Dlocalhost.localdomain[127.0.0.1] Sep 27 21:21:42 decs-smtp3 postfix/cleanup[22343]: C3B7A18C08A: message-id=3D<00af01c4a488$63058470$fd06030a@midnight> Sep 27 21:21:42 decs-smtp3 postfix/nqmgr[19048]: C3B7A18C08A: from=3D<admin.epi@epi.sa.edu.au>, size=3D2059, nrcpt=3D1 (queue active) Sep 27 21:21:42 decs-smtp3 clamsmtpd: 100125: from=3Dadmin.epi@epi.sa.edu.au, to=3Djames.wilson@csm.com.au, status=3DCLEA= N Sep 27 21:21:42 decs-smtp3 postfix/smtp[22345]: 980EF18C087: to=3D<james.wilson@csm.com.au>, relay=3D127.0.0.1[127.0.0.1], delay=3D0, status=3Dsent (250 Ok: queued as C3B7A18C08A) Sep 27 21:21:42 decs-smtp3 postfix/smtpd[22347]: disconnect from localhost.localdomain[127.0.0.1] Sep 27 21:21:42 decs-smtp3 postfix/nqmgr[19048]: C3B7A18C08A: to=3D<james.wilson@csm.com.au>, relay=3Dnone, delay=3D0, status=3Ddeferred (transport is unavailable) Sep 27 21:21:56 decs-smtp3 postfix/nqmgr[19048]: warning: connect to transport ,smtp: No such file or directory Sep 27 21:22:56 decs-smtp3 postfix/nqmgr[19048]: warning: connect to transport ,smtp: No such file or directory >=20 > [...] >=20 > > Relay host is empty as this stange, and /etc/postfix/transport contains= : > > > > * smtp:xxx.xxx.xxx.xxx <--- where xxx is a valid IP :) >=20 > This must be: >=20 > * smtp:[xxx.xxx.xxx.xxx] >=20 > > I can post more contents of my contents if that would help.. > > > > Each LDAP user has an attribute such as: > > > > mailHost smtp:10.10.10.10 >=20 > This address must also be enclosed in brackets. >=20 > Hint: You can use result_filter to avoid having to store the "smtp:" in > LDAP. Read ldap_table(5). >=20 > result_filter =3D smtp:%s > or > result_filter =3D smtp:[%s] >=20 > -- > Magnus B=E4ck > magnus@dsek.lth.se >=20 Thanks, I'll be sure to change it. Is there anything wrong with my transport_maps filter? I'm getting results that make no sense... Basically we have two internet facing SMTP (1 and 2) (basic domain relay checking) servers accepting mail for delivery into the internal environment. The internal mail server (SMTP3) relays mail for local ldap users to a mail cluster running courier-imap. It also routes mail to on site mail servers outside of the data centre. Hence the mailHost attribute, as only some users at the external site use the local mail server. The others utilise webmail inside our environment. Cheers! dn: cn=3Djames wilson.csm,ou=3Dcsm,o=3Dxxx,dc=3Dsa,dc=3Dedu,dc=3D au givenName: james objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: inetLocalMailRecipient mailDefaultAddress: james.wilson@csm.sa.edu.au mailMessageStore: /home/mail/csm/james.wilson.csm/ updatePassword: yes uid: james.wilson.csm mail: james.wilson.csm@csm.sa.edu.au uidNumber: 10294 cn: james wilson.csm loginShell: /bin/false gidNumber: 10294 gecos: james.wilson.csm homeDirectory: /home/users/csm/james.wilson.csm/ sn: wilson.csm webDirectory: /home/web/csm/james.wilson.csm/ webDisplay: school shadowWarning: 7 shadowLastChange: 111 shadowMax: 99999 ftpStatus: disabled passwordChange: no n2h2GroupName: csm Admin middleName: accountStatus: active mailLifeLongAddress: 2@staff.sa.edu.au employeeNumber: 2 shadowExpire: 1 inetAccess: no mailHost: smtp:mail.decs.sa.edu.au userPassword:: xxxxxxxx |