Koozali.org formerly Contribs.org

Mail settings question

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Mail settings question
« on: September 20, 2016, 06:43:46 PM »
Been ages since I last looked at this but a guy at the office recently asked me;

Someone sent me an email with 25Mb attachment. I saw it come into the ISP mailbox, I saw SME collect but it never reached my mailbox on SME?

These are the settings I have currently;

config setprop php UploadMaxFilesize 15M
config setprop qmail MaxMessageSize 25000000
config setprop clamav MaxFileSize 25M
config setprop qpsmtpd MaxScannerSize 25000000
db configuration setprop spamassassin MaxMessageSize 2000000

My main question is, should oversize messages not generate an error message to the sender?

Also, based on the above, do these affect send as well as receive?

Thanks a mill!




"If you don't know what you want, you end up with a lot you don't."

Re: Mail settings question
« Reply #1 on: September 20, 2016, 07:54:34 PM »
My main question is, should oversize messages not generate an error message to the sender?

Yes, but not all ISP's deliver them, for various reasons - including being oversized!

You say you "saw SME collect" - are you using fetchmail? If so, that complicates things. Fetchmail won't send a bounce to the sender - the message has been delivered into your care, after all, in the mailbox sitting at your ISP.

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #2 on: September 20, 2016, 09:26:05 PM »
Thanks for the reply. We monitor the ISP mailbox with a windows mail client. When its emptied at every 15 mins we know [as well as we can do] that SME has collected the mail for local distribution.

Could it be that SME sent out an 'oversize error message' but the recipients ISP did not deliver it to them?
"If you don't know what you want, you end up with a lot you don't."

guest22

Re: Mail settings question
« Reply #3 on: September 21, 2016, 07:10:41 AM »
Thanks for the reply. We monitor the ISP mailbox with a windows mail client. When its emptied at every 15 mins we know [as well as we can do] that SME has collected the mail for local distribution.

Could it be that SME sent out an 'oversize error message' but the recipients ISP did not deliver it to them?


Why not have your domain email delivered to SME Server directly?

Re: Mail settings question
« Reply #4 on: September 21, 2016, 03:00:36 PM »
Someone sent me an email with 25Mb attachment. I saw it come into the ISP mailbox, I saw SME collect but it never reached my mailbox on SME?

You need to study your fetchmail, qpsmtpd and qmail logs to determine what happened.

Offline janet

  • ****
  • 4,685
Re: Mail settings question
« Reply #5 on: September 22, 2016, 02:09:32 AM »
gbentley

Based on the settings you have, the email attachment is larger than your system will accept/handle, so NO further processing by your SME server would be the expected outcome. If you want to receive attachments that are actually 25Mb, then ALL the necessary settings will need to be larger than 25Mb (say 30 or 35Mb to allow for overheads).

As the message was delivered & accepted by your ISP, then no undeliverable message was sent to the sender.

I would also suggest that you stop using fetchmail, it only complicates the situation.


Quote
Someone sent me an email with 25Mb attachment. I saw it come into the ISP mailbox, I saw SME collect but it never reached my mailbox on SME?
These are the settings I have currently;
config setprop php UploadMaxFilesize 15M
config setprop qmail MaxMessageSize 25000000
config setprop clamav MaxFileSize 25M
config setprop qpsmtpd MaxScannerSize 25000000
db configuration setprop spamassassin MaxMessageSize 2000000

My main question is, should oversize messages not generate an error message to the sender?

Also, based on the above, do these affect send as well as receive?
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #6 on: September 22, 2016, 10:28:11 PM »

Why not have your domain email delivered to SME Server directly?

I intend to look into doing this once I have upgraded to 9.x - of course any tips / links to info would be helpful. I *think* I would need to alter my DNS record so that MX is the same as our WANIP then get port 25 forwarded to SME. Is that about it?
"If you don't know what you want, you end up with a lot you don't."

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #7 on: September 22, 2016, 10:30:07 PM »
I would also suggest that you stop using fetchmail, it only complicates the situation.

Can I assume that fetchmail is invoked once I choose multi-drop and a collection schedule for office hours?
"If you don't know what you want, you end up with a lot you don't."

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #8 on: September 22, 2016, 10:33:21 PM »
then ALL the necessary settings will need to be larger than 25Mb (say 30 or 35Mb to allow for overheads).

I was under the impression that this one ;

config setprop php UploadMaxFilesize 15M

only affects webmail / horde?

Also that the spamassassin setting dictates that messages over that size do not get scanned but are accepted?

I also need to know whether any of these affect outgoing emails with attachments.

I guess I better go back and re-read the email section of the wiki :)

"If you don't know what you want, you end up with a lot you don't."

guest22

Re: Mail settings question
« Reply #9 on: September 22, 2016, 10:55:24 PM »
I intend to look into doing this once I have upgraded to 9.x - of course any tips / links to info would be helpful. I *think* I would need to alter my DNS record so that MX is the same as our WANIP then get port 25 forwarded to SME. Is that about it?


Just about. Obviously your SME Server needs to carry the domain name too...

Offline ReetP

  • *
  • 1,866
Re: Mail settings question
« Reply #10 on: September 22, 2016, 11:37:21 PM »
You don't need to foward port 25. A email server will attempt to deliver to the lowest numbered mx record via port 25

You will preferably need a static IP and setup up the correct mx records for your domain.

It isn't rocket science but pay attention to details and have a good read around first.

You could set your own domain record as say '1' and change your ISP to say '10' and leave fetchmail running as a backup. So if your own IP is unreachable for any reason mail will get delivered to your ISP and fetchmail should pick it up (though getting off fetchmaol is a good idea as suggested)

It shouldn't really necessary as a well behaved mail server should attempt delivery over a period of days so if your IP is offline for a bit it shouldn't be the end of the world.

HTH.

B. rgds
John

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Mail settings question
« Reply #11 on: September 23, 2016, 12:27:20 AM »
Can I assume that fetchmail is invoked once I choose multi-drop and a collection schedule for office hours?

You can be assured that is the case, although I can see that the User guide doesn't state that explicitly.

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #12 on: September 23, 2016, 08:24:15 AM »
Quote from: ReetP link=topic=52657.msg271314#msg271314 date=
You don't need to foward port 25. A email server will attempt to deliver to the lowest numbered mx record via port 25. You will preferably need a static IP and setup up the correct mx records for your domain.

John

Thanks John. I think in our case we will need some port redirection on the router for mail reception. Our connection is via a company who specialise in bonded fibre then distribute this via rooftop microwave. The router is theirs, locked down and I have to ask for rules to be setup. I had to do this for https into sme, as well as ssh which I only activate via the admin panel when really needed. Apart from that no standard ports are open / directed. I also had to ask that for ssmtp and imaps that these where routed via a static ip so I could setup the iphones etc Browsing sessions for example can be from different ips allocated by them which has caused some issues with certain banking activity. Having said all this the performance is way better than anything offered by BT currently. 100 up, 100 down and no bandwidth limit at a cost of £90 / month.



"If you don't know what you want, you end up with a lot you don't."

Offline ReetP

  • *
  • 1,866
Re: Mail settings question
« Reply #13 on: September 23, 2016, 12:43:14 PM »
Ah ok. Get that.

I was thinking your server had a public IP !

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Mail settings question
« Reply #14 on: September 23, 2016, 09:06:39 PM »
That is the same thing i wanted to ask,...

The question has already been answered. Yes, multi-drop email is collected using fetchmail. If fetchmail cannot deliver the message, the message will be left in the mailbox at the ISP.

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #15 on: September 23, 2016, 09:17:11 PM »
Charlie - think WendyMoor might fake account to promote her site ?


[modified by moderator, deleting url]
« Last Edit: September 23, 2016, 10:00:13 PM by Stefano »
"If you don't know what you want, you end up with a lot you don't."

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Mail settings question
« Reply #16 on: September 23, 2016, 09:56:45 PM »
removing wendymoor's posts, spamming
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline gbentley

  • *
  • 468
  • Forum Lurker
    • Earth
Re: Mail settings question
« Reply #17 on: January 28, 2017, 02:03:55 PM »
You could set your own domain record as say '1' and change your ISP to say '10' and leave fetchmail running as a backup. So if your own IP is unreachable for any reason mail will get delivered to your ISP and fetchmail should pick it up (though getting off fetchmail is a good idea as suggested) - It shouldn't really necessary as a well behaved mail server should attempt delivery over a period of days so if your IP is offline for a bit it shouldn't be the end of the world. John

Sorry for replying so late to this thread but I am now in a position to look at this again - I have updated SME to 9 with new discs and done all the updates so I am happy :)

If I 'switch off' fetchmail on SME and in the case where my microwave link goes down for an hour, all the mail would then be collected / sitting on the ISP. Whilst I could just add a forwarder there, this would be to a specific mailbox on my SME when the link comes backup - which isn't too convenient. I was thinking that in case of the above scenario I could just invoke fetchmail manually or from script? Would need to locate the existing script to glean cli mojo and make into a manual version. Does this sound reasonable?
"If you don't know what you want, you end up with a lot you don't."