Mail Filter Madness. Pt2

Sometimes when you come up with a new project to work on you jump right in without fully considering all the possible side projects you will need to work on to get the main project working.

For example:-

Step one of my Server Side Mail Filters SSMF was to create a SPAM folder.  All my domains have a catchall email address where all those emails sent to address not existing end up.  this is mainly for people who spell my name wrong, or use weird formats that they are used to.. firstname.surname@ initial.surname@ etc… Or for those rare occasions when I use a new email address for a project/webpage and forget to actually create the email box :0( (Rare but does happen)

So my plan is to have a SPAM folder on my main map box, and all unknown mails automatically be dumped in there for me to check at some later point.  Now while setting up this default basic rule in exim I had the brilliant idea to not just place them in all together in a SPAM folder but to further split them into .SPAM.DOMAIN_NAME this way i can see which domains are getting hit hardest, and easily hunt out mislaid emails.

“What a brilliant simple idea!”

Well yes! and at the same time No!  You see, delivering the emails into separate folders is easy, and took no time at all to set up.  Now the smarter amongst you will have already spotted my problem with this.  “Did you spot it?, No? Never mind. Let me explain” Every time an email comes in for a new domain name, it will create a new subfolder in the SPAM folder and deliver the email there, This is good apart from the fact with IMAP email clients you only see the folder you are subscribed to, which means I will not see the new folder or any emails it contains unless :-

1) I pre create all possible subfolders ready

2) I check every so often for new folders and then subscribe to any new ones.

I considered these two time consuming options and after deep consideration I stood up and declared “I AM GEEK! I do not use the options available to mere users, I make my own options, I choose option 3!

So, Time for a quick Side project to create option 3. A self subscribing mail script. A simple find command piped through cut, sed creates a list of folders which is then outputted to overwrite the courierimapsubscribed file, get this script to run every so often in the cron and as soon as a new folder is created, your subscribed to it.

Now back to the main project.

CN

Mail Filter Madness. Pt1

I have to admit I am a bit unorganised in the email department! In fact,  that’s a bit of an understatement!

I am extremely unorganised in the email department!

Due to different projects, and historical reasons I have several domain names, with different email addresses associated to them.  These emails all go to different popbox’s, most are picked up by my windows box at home (all to individual accounts) And in theory I then check my mail every so often. In truth, due to the number of accounts I do not check them as often as I should and I now have a dozen accounts all with several thousand unread emails in them.

Right!” says I, “This needs to be sorted!“. But what to do?, I could merge them all into one account, so everything gets delivered to the same folders, then write a load of email filters to organise the mail into appropriate folders, so its easier to manage. “Right, I’ll do that!“. Wait a second. What if my windows machine doesn’t have it email client open? the filters wont run and the mail will be scattered, what if I’m on a different machine, with a different email client, No…. There must be a better way to run email filters.

What if I run them at the server level?”

E-mailNow that’s an interesting thought. Actually add a section in the exim configuration to check a database of rules and deliver accordingly. Then have a simple control panel where users can add rules based on sender, local_part, domain, recipient, subject and have the email delivered into the corresponding sub folder.  This would mean your email was sorted as soon as it was delivered, regardless of what email clients you have open and where.

Well I was after a new project to play with for a bit, and it looks like this may just be the one.  I have exim, mysql, courier all installed and running on my home gentoo server, so time to forward a few of my domains at that IP and start playing.

Watch this space…….

CN

Interesting Email Time

I Just had this online test emailed me with the simple comment of ” Thought this may appeal to your work place ;o)”

What it seems to infer is how hard it is to tell the difference between a cerial killer and in Computer Programmer. (Knowing some of the coders I know, I can understand this, especially after an all nighter, and the realisation there is only decaf left!)

Can you judge someone by looking at them?

BY LOOKING AT A PICTURE OF A PERSON, YOU HAVE TO DECIDE IF HE IS A COMPUTER GEEK OR A SERIAL KILLER. GO WITH YOUR GUT FEELING AND CLICK ON YOUR CHOICE.

THERE ARE 10 PHOTOS. YOUR SCORE WILL BE GIVEN AT THE END.

Programming Language Inventor or Serial Killer?