Categorization in folders
- Someone liked your page,
- Linkedin: People in <country> Also follow these accounts:
- ecommerce you use: Check these products. Free coupon for 5% off
- Don’t miss the updates on our platform
- Discounts for the next 5 days
- 3 People left a comment on your post
mailbox Social {
auto = subscribe
}
mailbox Promotions {
auto = subscribe
}
mailbox Updates {
auto = subscribe
localuser:
driver = accept
transport = local_delivery
localuser_social:
driver = accept
transport = local_social
condition = ${if or {
{match{${lc:$header_from:}}{.*@facebook.com}}
{match{${lc:$header_from:}}{.*@facebookmail.com}}
{match{${lc:$header_from:}}{.*@*.facebook.com}}
{match{${lc:$header_from:}}{.*@twitter.com}}
{match{${lc:$header_from:}}{.*@*.twitter.com}}
{match{${lc:$header_from:}}{.*@instagram.com}}
{match{${lc:$header_from:}}{.*@*.instagram.com}}
{match{${lc:$header_from:}}{.*@linkedin.com}}
{match{${lc:$header_from:}}{.*@*.linkedin.com}}
{match{${lc:$header_from:}}{.*@pinterest.com}}
{match{${lc:$header_from:}}{.*@*.pinterest.com}}
{match{${lc:$header_from:}}{.*@tiktok.com}}
{match{${lc:$header_from:}}{.*@*.tiktok.com}}
}{yes}{no}}
As you see, our condition will match all the known e-mail addresses from social media by their domain name.
Now it is time to create the transport for it, so you need to find “begin transports” and then after it search for local_delivery: and also copy paste the whole transport as you did with the route before.
Change the name to what you used in the route before, transport = local_social so that means if the original local_delivery transport looks like this for example:
local_delivery:
driver = appendfile
maildir_format
maildir_use_size_file
user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}
group = mail
create_directory
directory_mode = 770
mode = 660
use_lockfile = no
delivery_date_add
envelope_to_add
return_path_add
directory = “${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}/${lookup{$local_part}dsearch{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}/mail/${lookup{$domain}dsearch{/etc/exim4/domains/}}}}”
quota = ${extract{6}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/passwd}}}}M
condition = ${if or {
{match{${lc:$header_subject:}}{.*% off.*}}
{match{${lc:$header_subject:}}{.*discount.*}}
{match{${lc:$header_subject:}}{.*buy.*}}
{match{${lc:$header_subject:}}{.*recommended.*}}
{match{${lc:$header_subject:}}{.*promotion.*}}
{match{${lc:$header_subject:}}{.*sales.*}}
{match{${lc:$header_subject:}}{.*pair with.*}}
{match{${lc:$header_subject:}}{.*new items.*}}
{match{${lc:$header_subject:}}{.*new products.*}}
{match{${lc:$header_subject:}}{.*limited time.*}}
{match{${lc:$header_from:}}{.*sales*[^@]*@.*.com}}
{match{${lc:$header_from:}}{.*deals*[^@]*@.*}}
{match{${lc:$header_from:}}{.*marketing*[^@]*@.*}}
{match{${lc:$header_from:}}{.*promotion*[^@]*@.*}}
{match{${lc:$header_from:}}{.*deals@.*}}
{match{${lc:$header_from:}}{.*marketing@.*}}
{match{${lc:$header_from:}}{.*offers@.*}}
{match{${lc:$header_from:}}{.*promotions@.*}}
{match{${lc:$header_from:}}{.*@groupon.com}}
Updates:
condition = ${if or {
{match{${lc:$header_from:}}{.*transaction@.}}
{match{${lc:$header_from:}}{.*no-reply@.}}
{match{${lc:$header_from:}}{.*newsletter@.}}
{match{${lc:$header_from:}}{.*newsletters@.}}
{match{${lc:$header_from:}}{.*news-letter@.}}
{match{${lc:$header_from:}}{.*noreply@.}}
{match{${lc:$header_from:}}{.*support@.}}
{match{${lc:$header_subject:}}{.*alert.*}}
{match{${lc:$header_subject:}}{.*report.*}}
{match{${lc:$header_subject:}}{.*downtime.*}}
{match{${lc:$header_subject:}}{.*update.*}}
{match{${lc:$header_subject:}}{.*updates.*}}
{match{${lc:$header_subject:}}{.*maintenance.*}}
{match{${lc:$header_subject:}}{.*reminder.*}}
{match{${lc:$header_subject:}}{.*order.*}}
{match{${lc:$header_subject:}}{.*transaction.*}}
{match{${lc:$header_from:}}{.*@amazon.com}}
{match{${lc:$header_from:}}{.*transaction*[^@]*@.*}}
{match{${lc:$header_from:}}{.*orders*[^@]*@.*}}
{match{${lc:$header_from:}}{.*order*[^@]*@.*}}
Forums:
condition = ${if or {
{match{${lc:$header_from:}}{.*forum@.}}
{match{${lc:$header_subject:}}{.*new topic.*}}
{match{${lc:$header_subject:}}{.*new post.*}}
{match{${lc:$header_subject:}}{.*new reply.*}}
{match{${lc:$header_subject:}}{^Re: [*/]}}