LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-25-2008, 09:45 AM   #1
Drognan
LQ Newbie
 
Registered: Jun 2005
Location: Florida
Distribution: RHEL, Debian, FreeBSD
Posts: 3

Rep: Reputation: 0
Postfix - forward email to another address and keep a copy in the mailbox


Hi, I have postfix setup using LDAP and virtual domains, here is the line that got forwarding working:
virtual_alias_maps = ldap:aliases, ldap:virtualforward

This forwards the mail to a different address properly but I've had requests for it to keep a copy in the mailbox.

I have a field in ldap for forwarding yes/no then a field for forward address. I have a couple business partners that have their email at my domain forwarded to theirs but they also want a copy to stay on my server so they can check it(and reply or whatever) from my domain.

How do I keep a copy?
 
Old 01-25-2008, 10:50 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
in the alias map, add both addresses: the forwarded address and the local. Postfix is smart enough to not get into a loop and retains one copy for the local address;

from a working setup here at my workplace:
Code:
miguel: miguel myexternaladdress@hotmail.com
 
Old 08-24-2008, 09:18 PM   #3
theands
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
In my LDAP directory I included both forward address and the local address. When an email is sent to the local address a copy is stored in the local address mailbox, which is exactly what I want.

The problem is the forward address receives multiple copies of the email.

The setup I am trying to achieve is a email archive. All email sent to the address forumadmin@ example.net will also goto the email address forumadmin.archive@ example.net. When I check the forumadmin.archive mailbox multiple copies of all email reside in this mail box.

postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, orig_to=<forumadmin@example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

postfix/virtual[5276]: 356CC540D117: to=<forumadmin@ example.net>, relay=virtual, delay=0.11, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

As you can see from the above log file, mail sent to forumadmin@ example.net is sent to the archive account, but multiple copies are delivered.
Does anyone know why this occurs?

Last edited by theands; 08-24-2008 at 09:32 PM.
 
Old 10-23-2010, 01:37 PM   #4
ckoeber
LQ Newbie
 
Registered: Oct 2010
Posts: 7

Rep: Reputation: 0
Smile

Quote:
Originally Posted by theands View Post
In my LDAP directory I included both forward address and the local address. When an email is sent to the local address a copy is stored in the local address mailbox, which is exactly what I want.

The problem is the forward address receives multiple copies of the email.

The setup I am trying to achieve is a email archive. All email sent to the address forumadmin@ example.net will also goto the email address forumadmin.archive@ example.net. When I check the forumadmin.archive mailbox multiple copies of all email reside in this mail box.

postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

postfix/virtual[5276]: 356CC540D117: to=<forumadmin.archive@ example.net>, orig_to=<forumadmin@example.net>, relay=virtual, delay=0.1, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

postfix/virtual[5276]: 356CC540D117: to=<forumadmin@ example.net>, relay=virtual, delay=0.11, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)

As you can see from the above log file, mail sent to forumadmin@ example.net is sent to the archive account, but multiple copies are delivered.
Does anyone know why this occurs?
Try this guide I wrote up here with LDAP:

http://forums.gentoo.org/viewtopic-t...8.html#6463502

Keeps a local copy, forwards the email, and doesn't deliver multiple copies.

Regards,
Chris K.
 
  


Reply

Tags
forwarding, postfix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto copy/forward mail on mailserver (postfix/courier) Pinkdog Linux - Server 2 04-11-2007 08:58 AM
Postfix Email Address Filtering... CRCool75 Linux - Software 8 04-14-2006 10:08 AM
forward users mail to email address tradnbillies Linux - General 3 01-04-2006 02:33 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 05:43 AM
Postfix : update email address with ISP VincentB Linux - General 0 03-18-2004 01:04 PM


All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration