Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am in the process of setting up a email solution. One of my few outstanding tasks is to get the mail server to automatically zip/unzip any zip files.
I am running PostFix (Maildir), Courier-IMAP and Spamasssassin. I need the email server to automatically zip any outgoing attachments and unzip any incoming. What is the best way to accomplish this?
Unzipping incoming attachments shouldn't be hard, could do that with a procmail recipe. The problem is attaching it back on if the client expects anything else than plain text e-mail. Why would anyone want *outgoing* attachments to be zipped automagically? If it's due to batch sending you could make a script that compresses attachments and send it with 'mpack'? Not that it's not possible. The method should be somewhat the same as for those that require their outbound traffic to have a "disclaimer" attached, a LQ search should show some threads about that.
The plan is that this email server is going to act as a relay for several other servers. The other servers will have extremely little/slow and expensive internet connectivity. I have therefore been looking at compression to make the system more efficient.
The other servers are all running Exchange were I found a plugin for which can automatically zip outgoing emails and unzip incoming. The ide is to have something like this, email arrives at Linux server, all attachments get zipped, email is then collected via pop3 from the Exchange server when internet access is available and then automatically gets unzipped again. This would work the same for outgoing emails as well, meaning you get compression and the user would never even know that the attachments had been zipped.
To be honest I am not familior with procmail but I will look into this now.
Testing the right procmail recipe will be the least of your problems, compatibility with non-plain text MUA's could be. Maybe get ideas from TNEFclean or Sanitizer or similar.
A very compelling reason to zip attachments is when your users like to send 15MB excel files and have to authority to override a decision to only allow 4MB attachments. Those 15MB excel files will zip down to 2MB. This is much better! Some mobile users have aircards and a 15MB email will effectively take thier email down for 30 minutes.
on that subject, anyone figured out how to automatically zip attachments?
A very compelling reason to zip attachments is when your users like to send 15MB excel files and have to authority to override a decision to only allow 4MB attachments. Those 15MB excel files will zip down to 2MB. This is much better! Some mobile users have aircards and a 15MB email will effectively take thier email down for 30 minutes.
on that subject, anyone figured out how to automatically zip attachments?
I never figured this out, the project got put on hold as I had other stuff to deal with but I do plan to revisit this someday. I didnt have a good testing environment to test procmail with as my main server was already up and being used by clients.
Let me know if you have any luck and I will try the same when I get time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.