SOLVED: Limiting INCOMING email size?

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

SOLVED: Limiting INCOMING email size?

Postby bluemike » Mon Jan 23, 2006 4:40 pm

I know I can limit the size of a file sent through webmail, but is there a way to limit the size of incoming attachments as well? I just had some joker send me a 250MB file via email. It took f-o-r-e-v-e-r to come through. Meanwhile all the stuff behind it (for the same user) just waits...

Anyway, if there is some way to only allow, say, 10MB or less to come though in an email (and even send the offending sender a custom rejection notice) that would be cool....

Thanks.
Last edited by bluemike on Fri Feb 10, 2006 1:00 pm, edited 1 time in total.

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jan 23, 2006 7:25 pm

Hi Mike,

You're using Spamassassin right? In that case, just go into /etc/mail and edit your sendmail.cf file. Search for the string "MaxMessageSize". The line probably looks like this:

Code: Select all

#O MaxMessageSize=1000000


uncomment the line and change it from 1000000 (1MB) to 10000000 (10MBs). So, the line should now look like:

Code: Select all

O MaxMessageSize=10000000


Now save the file and restart sendmail.

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Mon Jan 23, 2006 7:44 pm

Negitive on Spamassassin.

We are going to be getting a spam-filter appliance soon, so I never set it up. And wouldn't that just move it to the 'junk mail' folder anyway? I want to reject the emailcompletely and send a message stating why to the sender.

This seems like it would be a basic feature; it is in Exchange at least. Is there a way to accomplish this without SA?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jan 23, 2006 7:52 pm

Hi Mike,

You misunderstood my message, this isn't using Spamassassin to reject the message, it's using sendmail. The only reason I brought up Spamassassin is that would mean you already have SMTPFILTER=TRUE in your /var/opt/scalix/sys/smtpd.cfg file.

So, the first step for you would be to add that line to your smtpd.cfg file, then stop and restart smtpd by typing:

omoff -d0 smtpd
omon smtpd

Now, do the other steps I posted in my previous message. That should take care of it for you.

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Mon Jan 23, 2006 8:19 pm

Well, I did everything as instructed, but I just myself a 17MB test and it came through.

I inserted SMTPFILTER=TRUE into the var/opt/scalix/sys/smtpd.cfg file (just above RELAY=127.0.0.1)
Then I restarted the smtp daemon.
Then I changed the sendmail.cf; uncommenting MaxMessageSize. (I made it 12000000).
I saved the sendmail.cf file and used service sendmail restart to restart sendmail.

Did I miss a step?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jan 23, 2006 8:26 pm

Hi Mike,

Did you send the message from some place like your ISP, Yahoo or gmail? Or did you send it from within Scalix?

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Mon Jan 23, 2006 8:33 pm

I sent it using an alternate Verizon email account in Outlook. I have my personal email configures with Verisons SMTP server. I will try in again tonight from home, and see if the message comes though.

BTW, will the sender get a rejection message and if so, can I customize it at all?

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Mon Jan 23, 2006 8:41 pm

Hi Mike,

Yes, the user will receive a rejection messsage that says something like:

The original message was received at Mon, 23 Jan 2006 14:24:19 -0800
from root@localhost

Code: Select all

   ----- The following addresses had permanent fatal errors -----
<user@domain.com>
    (reason: 552 5.2.3 Message size exceeds fixed maximum message size (1000000))


I don't believe there's an easy way to change that message.

If you're still having problems, please post a snippet of your sendmail.cf file and your smtpd.cfg file with the modifications you made.

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Tue Jan 24, 2006 2:42 pm

I couldn't send a 17MB message from home (Verizon only allows 10MB). So I temporarily set the limit to 8MB, restarted sendmail, and used my Gmail account to send a 10MB message to my internal email.

My syslogs show the Gmail servers connecting, but I have yet to see the email in my inbox. So I guess it's blocking it. That's a good thing! While writing this I just received the rejection message in my Gmail inbox. Sweet!

But I would really like to customize that rejection message is AT ALL possible.

Thanks Rachel!

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Tue Jan 24, 2006 8:36 pm

Hi Mike,

Well, it is possible, but it does require editing the sendmail source code and changing the message there. You'll then have to recompile the source. While not particularly complicated for someone experienced with C, makefiles and the like, it's not something I would recommend the average user attempt. Perhaps you could contact a Linux Consultant in your area for help with this.

Thanks,
Rachel

bluemike
Posts: 202
Joined: Fri Oct 28, 2005 1:30 pm
Location: Everett,WA
Contact:

Postby bluemike » Tue Jan 24, 2006 8:58 pm

Well, as I fall soundly in the 'average user' catagory, I think I will live with it as is.

Thanks again ;)


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 11 guests

cron