Results 1 to 6 of 6

Thread: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

  1. #1
    Join Date
    Sep 2010
    Posts
    65

    How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    I have a postfix set up of the emails which forwards the mail to the different address properly. It is done using the ldap and virtual domain I have used this line to get this setting working:
    Code:
    virtual_alias_maps = ldap:aliases
    . Actually I want to keep a copy of the forwarded email into the mail box. I have a space into the ldap which is for the forwarding and have a option yes/No and also have a forward address field. Actually I want this setting as my business partners are asking to have a copy of the email which I have sent them on my domain. So they can be able to check it, reply it, and whatever they want to do using my domain. Anybody have any solution for this problem please suggests me.

  2. #2
    Join Date
    Nov 2009
    Posts
    1,035

    Re: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    As you want to keep a copy on the domain so that your business partners can be able to edit, reply or whatever they want they can do on the domain. I have a solution for this problem you should to try this I think this may be able to give you a solution for the problem you are facing just following the steps given below:
    • Go into the alias map and add both the addresses.
    • Both the address means the forwarded address means to which you are sending the message and the local address from where you are sending the message.
    • Popstfix will not get into a loop and it will keep a copy of the email to the local address.
    • Miguel: Miguel my external [email]address@hotmail.com
      I have used this setup for my workplace and it is working for me.

  3. #3
    Join Date
    Sep 2010
    Posts
    65

    Re: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    In my LDAP directory I have done as you have told to do I included both the address forwarded and the local address. It works accordingly what I exactly want to do it sends the email and keep the copy to the mailbox into the local address box. After this the problem I am facing is it just forwards a multiple copies to the forwarded address. Now what do I do to send only a single copy to the forwarded address. Please suggest me.

  4. #4
    Join Date
    May 2008
    Posts
    859

    Re: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    I think you are getting this because your alias query might not returning the list of forwarded address with comma separation. Which results you to need a third account for the local address after using another local address you might be able to get the solution for the multiple messages to the forwarded address. If still the problem is persists then I think this is because you are getting some looping into postfix setting. I would like to suggest you to do these things using maildorop-delivery script. I think this script will help you get the desired solution.

  5. #5
    Join Date
    May 2008
    Posts
    962

    Re: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    To keep the copy of the forwarded mail you should use this tutorial which I am giving you below. Use this script with your modification file I would like toi suggest you to use this script with the postfix configuration files which you have done before:
    Code:
    server_host = [LDAP HOST] 
    search_base = [Search Base - i.e. (ou=Where to Search,dc=example,dc=com)] 
    version=3 
    timeout = 10 
    size_limit = 1      (Directive to inform the LDAP searching utility that only one SET of results should come back per search (i.e. if I search for one CN then only one CN with all resultant attributes should be returned.) 
    bind = yes 
    bind_dn = [Bind DN for searching] 
    bind_pw = [Bind Password] 
    query_filter = ([Attribute to search for here]=%s)                  - Note that this is the address of the email being recieved. 
    result_attribute = [Attribute Containing Local Address], [Attribute Containing External Address], [More Attributes containing addresses, separated by commas]
    After doing this now keep your LDAP directory file to the virtual_alias_maps. This depends on whether the address being distributed to is converted as a local or virtual domain. A totally operating pattern looks somewhat similar to what I have beneath:
    Ldap-forward-example.cf:
    Code:
    server_host = ldap-server.example.com 
    search_base = ou=People,dc=example,dc=com 
    version=3 
    timeout = 10 
    size_limit = 1 
    bind = yes 
    bind_dn = cn=Manager,dc=example,dc=com 
    bind_pw = password 
    query_filter = (mail=%s) 
    result_attribute = mail, addressToForward
    Within the main.cf file:
    Code:
    #for virtual domains: 
    virtual_alias_maps = ldap:/etc/postfix/ldap-forward-example.cf 
    # 
    # OR 
    # 
    #For local domains: 
    alias_maps = hash:/etc/mail/aliases,ldap:/etc/postfix/ldap-forward-example.cf

  6. #6
    Join Date
    Nov 2009
    Posts
    1,292

    Re: How to keep a copy of the postfix forwarded email into the mailbox using LDAP and virtual domain

    Thank you as I was searching for this solution for the problem. I would like tell everybody who is facing such problem with their postfix setting then they should use this script for keeping the mail into the domain. Now I am able to do what I want exactly for my business partners.

Similar Threads

  1. "pictures could not be found" in forwarded email
    By sivaranjan in forum Windows Vista Mail
    Replies: 4
    Last Post: 13-08-2011, 06:20 PM
  2. Need to create new mailbox user in child domain in Exchange
    By Cosmonos in forum Technology & Internet
    Replies: 5
    Last Post: 12-12-2010, 07:39 PM
  3. Replies: 2
    Last Post: 24-11-2009, 08:43 PM
  4. Replies: 4
    Last Post: 07-03-2008, 07:13 AM
  5. Replies: 3
    Last Post: 22-02-2008, 10:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,518,459.06871 seconds with 17 queries