LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix forwarding mail with size less than (https://www.linuxquestions.org/questions/linux-server-73/postfix-forwarding-mail-with-size-less-than-720631/)

aduntoredas 04-21-2009 06:50 AM

postfix forwarding mail with size less than
 
Hello all,

I would like to find a solution to the following problem: On my primary MX server, I have postfix installed with a bunch of local accounts that receive mail into maildirs. The mail server is also running Courier IMAP, and mail is read by our employees via Thunderbird. I have different redirections for different accounts in my alias file. I would like to forward, for one account, only the mail that is less than a given size. Imagine I would like to have a copy of my INBOX on gmail or yahoo, but don't want the e-mails with attachments or large in size. I would also like to forward all my e-mails to a secondary server in my network to test different spam filter configurations on the secondary server. Imagine I receive hundreds of e-mails with pretty large attachments, so my primary MX server would go on overtime forwarding the large mail to the secondary server. That's just what I am trying to avoid. Any suggestions?

With respect,
crc

datopdog 04-22-2009 05:41 AM

You can use maildrop to do that http://www.courier-mta.org/maildrop/documentation.html

aduntoredas 04-22-2009 08:21 AM

maildrop use
 
I can use maildrop to retrieve files from pri MX to the test server, however, I cannot use maildrop with what I wanted most: delivering only the small mail to a google or yahoo account. Any other ideas?

datopdog 04-22-2009 08:25 AM

Yes you can use maildrop for that, if you cared read the documentation i pointed you to, you would have seen that you can write a maildrop filter to redirect messages (to a yahoo or google account) based on the size of the message.

aduntoredas 04-22-2009 08:35 AM

Sorry, you are right. I'm gonna try this in the week-end, when nobody's working :) Thank you.


All times are GMT -5. The time now is 02:20 PM.