10 msgpostfix relaying

Restrict sending external mail depending on LDA...
\ Juan Asensio Sánchez (16 May 2007)
. \ Magnus Bäck (17 May 2007)

2 msgmonitoring emails for a particular user
1 msgloops back to myself with antivirus gateway...
2 msgcyrus and postfix issue...
2 msgDeny messages to local mailing lists
2 msgTranslation delivery error messages
3 msgWhy smtp instead of relay?
2 msgChroot Timestamps
18 msgrelay access denied
7 msgQuestion about Successful Mail Delivery Report
6 msgclamav question
2 msgFind/Replace Text, Strip Graphics
7 msgBlacklisted
3 msgCharset problems
4 msg[urgent] how to use remote mail server ?
1 msg[Re: sasl problem]
2 msgoff-topic?
7 msgsmtpd_milter question
1 msgOff-topic: Linux distro compare site
Subject:Re: Restrict sending external mail depending on LDAP attribute
Group:Postfix-users
From:Magnus Bäck
Date:17 May 2007


 
On Thursday, May 17, 2007 at 01:56 CEST,
Juan Asensio Sánchez <okelet> wrote:

> I am trying to integrate Postfix to work with Gosa
> (http://www.gosa-project.org) using this manual
> http://jriosgosa.blogspot.com. I have yet configured Postfix so local
> and remote mails are delivered correctly, and i can see mails using
> courier imap. Each LDAP user has an attribute called
> gosaMailDeliveryMode. This field is a combination of some letters:
> [L], [IL], [ILV], etc. L means that the user can receive mail; I means
> that the user can send mails only to local domains; and V means that
> when the user receives an email, a message will be sent to the sender
> with a vacation message. Fields L y V are configured and works fine,
> although i don't understand very well how does postfix work. I have
> ony to check if that field contains an "I", so when the flag is
> present, i must check if the recipient is local (contained in some
> local domain), and then send it; if not, i must reject the message
> sending to the sender an error message. I know is a "bit" complicated.
> Has anyone made this? Is there any other way?

http://www.postfix.org/RESTRICTION_CLASS_README.html#external

You need to translate this configuration so it works with your LDAP
schema. Replace the restricted_senders lookup table in the example
above with an LDAP query that returns local_only iff the user in
question has I in his or her gosaMailDeliveryMode:

query_filter = &(mail=%s)(gosaMailDeliveryMode=*I*)
result_format = local_only

This assumes that you have proper indexes set up for the
gosaMailDeliveryMode attribute.

--
Magnus Bäck
magnus


© 2004-2008 readlist.com