How to remove all attachments in Linux-Postfix before deliver to each mailbox?

Folks,

I need your experts advise to achieve the followings:

OS: CentOS 5.x
Postfix: postfix-2.3.3-2.1.el5_2

Requirements:
Need to remove all the mail attachments before deliver into each mailbox. In other words users should not receive any attachments but mail contents should reach them. Mails which has attachments should not bounce back.

How we can do this?

/Jay
LVL 7
Jayachandran PalanisamyTechnical Consultant - LinuxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
You would need to use a filter maildrop, postfix to properly process the stripping out of attachments.

Presumably you would allow in a mixed attachment, text/html text/plain attachments to be included but others zip, exe, etc. not.

Your best bet to avoid corrupting the message when an attachment is detected, store it into a separate set, and generate a notification to the user that an email with an attachment was sent their way.

Why not place a restriction on the sender i.e. notify sender that attachments are not accepted?

What are your programming/scripting skills like?
familiar with perl? MIME handler
Take any message with attachments and look at the raw message source.
Look at  You will see within the header portion indication that an attachment is included. you would then see a "separator" identified that starts/ends each attached item with its own content-type, filename....

Some mail clients always include an attachment i.e. when they send email with HTML/PLAIN text versions
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.