I am trying to find a way to have incoming mails to a specific folder based on sender address. My setup is on Ubuntu Server 14.04, Postfix mail_version = 2.11.0 Courier Imap with spamassasin, amavis, clamav. The setup was based on this this online guide. As the server goes mature day by day I have come to a need to separate my incoming mails based on sender address (much like gmail does with the social tab). I got to create a new folder in my existing account with maildirmake
maildirmake -f Social /var/mail/virtual/domain/account
In order for the new folder to work properly I copy pasted permissions and ownership from existing folder like so
sudo chown -R --reference=.Sent/ .Social
sudo chmod -R --reference=.Sent/ .Social
After this the new folder is shown up in Thunderbird and I can move emails in there.
Now the tricky part for me, and even thought I searched around I can not find a doable solution is that I want to apply a filter on Postfix maybe? or any other way so if an incoming email is from Twitter let's say, to be shown in the Social folder. Thanks in advance for any direction I can get. Regards.