SMTP Email Size Detection / Rejection

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
SoKki
New Forum User
New Forum User
Posts: 4
Joined: Wed Apr 22, 2009 8:55 pm

SMTP Email Size Detection / Rejection

Unread post by SoKki »

Hi Guys,

Just wondering if anyone has come accross this sitation or solution / if its even possible / in regards to smtp mail size.

When a client tries to send a large email eg 17mb via outlook, and say qmail smtp databyte config file is set to 10mb, is there any way for either qmail scanner or qmail itself detect the size and reject the email immediately rather then allowing it to try. As i noticed that when a failed email of that size in outlook fails, it attempts to send it over and over and over again. (not every client who uses out look is very smart when there is an email still trying to send for the past 8 hrs).

This tends to waste bandwith when the same email keeps coming through or attempting to. 17mb files over X amount of hrs x X amount of clients = waste of my money and bandwith.

Any insight would be appreciated.

Thanks Guys
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Re: SMTP Email Size Detection / Rejection

Unread post by Highland »

AFAIK there's no way to detect a file's size before sending said file. You would have to rely on the client to tell you that and there's no guarantee that the client would be correct. PHP suffers the same problem. PERL is the only language (maybe Python too) I know of that can do real-time file upload monitoring but even then it simply looks for that hard cap and cuts it off. I don't know of any that do this for email, only web based CGI.

I've always found email limits to be a source of contention anyways. People want to send these huge files, not realizing what a drain on resources it can be to process the file and then send it to recipients (especially on a broadcast list). I used to have a problem with a coworker that would hand out the company broadcast list for everything, including file emails. Imagine what having 10 people download a 5MB file all at once does to your server and your local bandwidth. If they really want to do this, tell them to use Gmail.
"Its not a mac. I run linux... I'm actually cool." - scott
SoKki
New Forum User
New Forum User
Posts: 4
Joined: Wed Apr 22, 2009 8:55 pm

Re: SMTP Email Size Detection / Rejection

Unread post by SoKki »

Thanks for the info. I didnt think there was a solution on this, buti have noticed some ISP return the email notice quiet quickly. Like almost instantly saying the email is to big. But then again i could be dreaming.
Post Reply