LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix Maildir delivery. (https://www.linuxquestions.org/questions/linux-server-73/postfix-maildir-delivery-616559/)

NaCo 01-26-2008 11:55 PM

Postfix Maildir delivery.
 
Hello,

I have Postfix running in a testing server; I have the installation set for Maildir delivery using virtual accounts (virtual mailboxes-non existing linux accounts) and I am able to send and receive e-mails.

I am looking for a way to make Postfix deliver an e-mail to two (or more if specified) Maildir (s) at the same time; for example, I have set to directories for virtual-mailbox delivery:

/vmail/examplehost.com/angel/
/vmail/examplehost.com/mark/

My goal is to have Postfix deliver an e-mail for angel@examplehost.com to both directories!

I have the next parameters in Postfix's main.cf configuration file:

virtual_mailbox_base = /vmail
virtual_mailbox_maps = mysql:/etc/postfix/virtual_mysql_map.cf

In MySql table I have:

mail-----------------------------destination
angel@examplehost.com----------examplehost.com/angel/

This and the rest of the configuration is working fine, but I just can not get to a solution for what I want to do.

I try inserting in the table's destination field: examplehost.com/angel/, examplehost.com/mark/
but the virtual daemon does not like that.

I have also tried the Postfix's parameter in main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual_alias

but this parameter's conventions are:

test@test.com test@test2.com
and not
test@test.com test.com/test/ (as in virtual_mailbox_maps)


I will extremely apreciate help for this issue.

Thank you
Angel.

trickykid 01-28-2008 09:55 AM

I'm not familiar with virtual users with MySQL but you could probably get away with this by setting up a regular alias to deliver to each user in the /etc/aliases or /etc/postfix/aliases, whichever one you use in that aspect.

angel: angel, mark

NaCo 01-30-2008 11:16 PM

perhaps a shell script?
 
Thank you for your reply trickykid!

but for my understanding etc/aliases and /etc/postfix/aliases are for local accounts(linux accounts), their equivalent for virtual accounts would be the virtual_alias_maps in Postfix's main.cf configuration file, but this parameter just forwards email to another email or perhaps a local account.

I was thinking that maybe a shell script would be able to do the job, working to copy new content to another directory as soon as new content is detected in the original directory, again this is just a hypothesis; but if some one is got better skills than me to confirm this, it will be a great help for me.

Once again thank you, and any help/comment is welcome.

Angel.

Berhanie 02-01-2008 09:38 AM

In reference to your question on this post, assuming mail to angel@examplehost.com is delivered to /vmail/examplehost.com/angel/, and mail to mark@examplehost.com is delivered to /vmail/examplehost.com/mark/, the way to do what you want is by means of virtual alias, in the manner stated by trickykid:
Code:

angel@examplehost.com    angel@examplehost.com, mark@examplehost.com
.

Alternatively, as you mention in the post, you could use recipient_bcc_maps, and plop a copy of mail to coming to angel into mark's box:
Code:

angel@examplehost.com    mark@examplehost.com
Note that the target of a bcc is single address, while the target of a virtual alias can be a list of addresses.


All times are GMT -5. The time now is 02:51 AM.