Koozali.org: home of the SME Server

Not fetching large emails

Offline david000

  • *****
  • 203
  • +0/-0
Not fetching large emails
« on: February 18, 2016, 06:43:48 PM »
We're having an issue where emails with large attachments are not being fetched from our remote server.

The cut off seems to be in the region of 12mb.

I had a quick look and found this:
https://wiki.contribs.org/Email#Large_attachments_not_displaying_in_webmail

but I'm not seeing any of the errors in the logs suggested.

Any suggestions of where to look to get a fix. Even a notification email that it's triad and failed would be handy.

Ta,

David

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Not fetching large emails
« Reply #1 on: February 18, 2016, 07:12:50 PM »
when you say "fetch" do you mean that you're using fetchmail?

Offline david000

  • *****
  • 203
  • +0/-0
Re: Not fetching large emails
« Reply #2 on: February 18, 2016, 08:38:40 PM »
when you say "fetch" do you mean that you're using fetchmail?

Yes and no.  We do use it to collect from a couple of random mail boxes, but not on the account where this 'large email' is an issue.

This is the account configured in the email reception settings.  So our email is delivered to the email account on our web server and then collected by sme via the pop settings as configured.   

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Not fetching large emails
« Reply #3 on: February 18, 2016, 08:45:25 PM »
Take a look at /var/log/qpsmtpd/current

Offline david000

  • *****
  • 203
  • +0/-0
Re: Not fetching large emails
« Reply #4 on: February 18, 2016, 08:49:27 PM »
Thanks will do.   

Looks like you can't do that from within the server admin ? 

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: Not fetching large emails
« Reply #5 on: February 18, 2016, 08:50:59 PM »
Yes, you can, using the logs page

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Not fetching large emails
« Reply #6 on: February 18, 2016, 08:51:13 PM »
So our email is delivered to the email account on our web server and then collected by sme via the pop settings as configured.

OK, so maybe you *do* mean you are fetching via fetchmail.

Quote
We're having an issue where emails with large attachments are not being fetched from our remote server.

Please describe exactly what you are seeing. How do you know there are messages on your remote server which are not being fetched, how do you know they are large, and how do you know they are large because of large attachments?

Have a look in /var/log/maillog.

Can you change your DNS settings so that the mail is delivered directly to your SME server, rather than delivered first to your web server, and then fetched via fetchmail?

Offline david000

  • *****
  • 203
  • +0/-0
Re: Not fetching large emails
« Reply #7 on: February 18, 2016, 09:04:29 PM »
CharlieBrady, Thanks for your reply.

I can log into the 'host' mail account via a web mail client and see an email, that hasn't (seemingly) been collected by SME, and that email typically might have attachments totalling over 12mb.

As all the other mail is being collected it seems reasonable to think it's the attachment that's the issue.

The account in question is not subject to a fetchmail request (assuming I understand correctly what fetch mail is - ie set up in the user section'.

At this time I'd rather keep the DNS arrangements the same as it gives us a little redundancy. 

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Not fetching large emails
« Reply #8 on: February 18, 2016, 11:09:24 PM »
The account in question is not subject to a fetchmail request (assuming I understand correctly what fetch mail is - ie set up in the user section'.

No you don't have a correct understanding. If you have your domain's email delivered to a mailbox on the web server, and then you have the email account settings for that mailbox configured in the email reception section of the server-manager, then you are using multi-drop email configuration, and fetchmail is used to retrieve messages from that mailbox, and distribute them to the different accounts on your SME server.

My guess is that you have a maximum message size configured on your SME server, and fetchmail is not able to transfer the message to qpsmtpd. Check your configuration, and look in /var/log/maillog.

Offline david000

  • *****
  • 203
  • +0/-0
Re: Not fetching large emails
« Reply #9 on: February 20, 2016, 12:26:12 PM »
No you don't have a correct understanding.

No surprise there  :lol:

I've yet to find an error in the logs but will try and run some tests.  However checking the wiki, (https://wiki.contribs.org/Email#Set_max_email_size)  it seems that if I run the command:

config setprop qmail MaxMessageSize

where "No value means no limit." ?

I'm also minded to increase the upload attachment limit for roundcube with:

config setprop php UploadMaxFilesize 20M

Are there any negative implications for this ?

Thanks for your help.
 

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Not fetching large emails
« Reply #10 on: February 20, 2016, 02:56:13 PM »
...
Are there any negative implications for this ?
...

Here are the reasons I limit my users' attachment sizes.  These are all actual problems I've run into in the course of managing mail servers - but that doesn't mean they apply to you.

If none of these scenarios resonates with your situation then I see no reason not to increase the attachment size.

* Email Backups
Email backups may become unmanageable unless you have policies about getting the large attachments out of everyone's mailboxes (including 'Sent').  (By "unmanageable" I mean that the backup window, or the disaster recovery time window, may become too large for your situation)

* Outlook (Windows)
Outlook users develop size-related PST issues if they collect large emails over an extended period of time. (Outlook PSTs have differing levels of "issues" starting as low as 2GB and getting worse as you pass 10GB and approach 50GB.  Ask me how I know...)

* Data security / inappropriate use of email
Users are more likely to email files to themselves "as a backup", or "to work on from home" - including sensitive information that would much better be handled by a file sharing system like Google Drive, owncloud, web folders, or whatever. A forgotten email attachment in a user's mailbox is only one bad password or rogue hotspot away from exposure to malicious hackers...

* Email delays & internet bandwidth issues
Large attachments and untrained users can cripple your email server and possibly your internet connection - if one user sends a 25MB attachment to 100 family & friends ("check out this cool home video!") your mail server has to transmit 2.5GB of data.  At the (admittedly old) T1 speed of 1.544mbps or 150KB/s, this would choke the internet connection for 4 hours or more.  At 10Mbit/s, you're "only" crippled for 45 minutes to an hour... Even if the mail traffic doesn't cripple your internet connection it is likely to interfere with delivery of other email until the large attachment has been dealt with.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Not fetching large emails
« Reply #11 on: February 20, 2016, 04:18:01 PM »
david000

Having an undefined limit is inviting problems later.
Much better to specifiy a large limit that will meet your requirments but prevent abuse
eg
config setprop qmail MaxMessageSize 100000000
& remember to follow with
signal-event email-update

Also
config setprop php UploadMaxFilesize 20M

follow with
expand-template /etc/php.ini
sv t httpd-e-smith
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline david000

  • *****
  • 203
  • +0/-0
Re: Not fetching large emails
« Reply #12 on: February 22, 2016, 10:05:31 AM »
Thanks both.

We're a small business but deal with engineering cad data so some file sizes are quite large. We encourage clients to send big stuff via a pseudo ftp service but a few forget and we end up missing those emails.

It is strange how people relate to email. They press send and assume it's arrived whatever - even for really important stuff !

I'll use the settings below and that should improve matters.  If my counting of zero's is correct, that's 100mb ?    50Mb would be:

config setprop qmail MaxMessageSize 50000000


 Thanks again.

Code: [Select]
config setprop qmail MaxMessageSize 100000000
& remember to follow with
signal-event email-update

Also
config setprop php UploadMaxFilesize 20M

follow with
expand-template /etc/php.ini
sv t httpd-e-smith