Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: kadybee on November 17, 2011, 08:20:20 AM
-
I'm having an issue where large messages are not being delivered or rejected but ending up with multiple copies on the spool drive.
SME 7.5:
I have an SME Server in a DMZ simply accepting mail and forwarding it to an internal mail server (also SME 7.5). At the moment there is no spam or av checking just the standard qpsmtp stuff.
Someone has sent a 25+MB message! As the message is coming in, it runs through the basic checks and then just stops (at around 20MB) and leaves a copy of that data in the /var/spool/qpsmtd/ directory without even attempting to pass it onto the internal mail server.
The upstream (ISP) just gets lost data signal and requeues it for another attempt.
Would I be right in assuming that the rejection is not occurring as it hasn't reached its final delivery point? I really would like this DMZ server to reject the message based on size. Any thoughts anyone?
Thanks
Klaus
-
Have a look here:
http://wiki.contribs.org/Email#Set_max_email_size
-
Have a look here:
http://wiki.contribs.org/Email#Set_max_email_size
Yes - thanks - already did all that. That's the issue, I have set a max size, but the server is not rejecting it.
Klaus
-
Did you set them all the same?
-
Yes - and then toyed with a number of other settings with the same result.
-
kadybee
Did you follow your db changes commands with
signal-event email-update
?
Please post your actual settings here & the procedure (commands issued) you used to make those changes.
Show output of
config show qmail
config show clamav
config show qpsmtpd
config show php
-
Yes Mary, updated, even rebooted! I'm fairly comfortable I set a max size of 20MB here. I even upped it to 50MB at one stage in an attempt to allow the large message that was looping in the queue directory through. That didn't work either. I have since had the failing message removed from the ISP queue.
# config show qmail
qmail=service
MaxMessageSize=20000000
status=enabled
# config show clamav
clamav=service
ArchiveBlockEncrypted=no
ArchiveBlockEntrypted=no
ArchiveBlockMax=no
ArchiveMaxCompressionRatio=300
Checks=24
DNSDatabaseInfo=current.cvd.clamav.net
DatabaseMirror=db.local.clamav.net
Debug=no
DetectBrokenExecutables=no
FilesystemScan=weekly
FilesystemScanExclude=/proc,/sys,/usr/share,/var
FilesystemScanFilesystems=/
FilesystemScanReportTo=admin
Foreground=yes
HTTPProxyPassword=
HTTPProxyPort=
HTTPProxyServer=
HTTPProxyUsername=
HeuristicScanPrecedence=no
IdleTimeout=60
LeaveTemporaryFiles=no
LogClean=no
LogFileUnlock=yes
LogTime=no
LogVerbose=yes
MaxAttempts=6
MaxConnectionQueueLength=30
MaxDirectoryRecursion=20
MaxFileSize=20M
MaxFiles=1500
MaxRecursion=8
MaxThreads=20
Quarantine=enabled
QuarantineDirectory=/var/spool/clamav/quarantine
ReadTimeout=300
ScanArchive=yes
ScanHTML=yes
ScanMail=yes
ScanOLE2=yes
ScanPE=yes
ScanRAR=no
SelfCheck=1800
ShowProxySettings=no
ShowUpdateSettings=no
SignaturesUpdated=unknown
UpdateNonOfficeHrs=disabled
UpdateOfficeHrs=disabled
UpdateWeekend=disabled
status=enabled
# config show qpsmtpd
qpsmtpd=service
Bcc=disabled
BccMode=cc
BccUser=maillog
DNSBL=disabled
LogLevel=6
MaxScannerSize=25000000
RBLList=whois.rfc-ignorant.org:dnsbl.njabl.org:zen.spamhaus.org
RHSBL=disabled
RequireResolvableFromHost=no
SBLList=dsn.rfc-ignorant.org
access=public
qplogsumm=disabled
status=enabled
# config show php
php=service
AllowUrlFopen=Off
status=enabled
-
I'm not quite sure which way the email is going here - are you recieving a large email from your ISP, or is your ISP rejecting your 25MB message from one of your users ? You don't mention if these settings are from your internal SME or your DMZ SME. Is it bouncing from one SME to the other ?
-
Coming inbound from the ISP, landing on the DMZ server and not going further (to the internal server) nor being rejected.
-
databytes
The file config/databytes determines the maximum size of messages qpsmtpd will accept, in bytes. The default is not to have a limit (except memory and storage limitations, of course). This file is used by lib/Qpsmtpd/SMTP.pm.
I read this to indicate that on a SME server you need the file /var/service/qpsmtpd/config/databytes in order to ahve qpsmtpd enforce email size limits on in-bound messages.
My SME servers don't have this file.
This should set the qpsmtpd message size to match the message limit configured for qmail:
echo `config getprop qmail MaxMessageSize` > /var/service/qpsmtpd/config/databytes
sv t qpsmtpd
If this works, please open a 'new feature request' in bugzilla asking to have 'databytes' for qpsmtpd set to match qmail::MaxMessageSize
-
Yes, thanks, that did the trick.
-
If this works, please open a 'new feature request' in bugzilla asking to have 'databytes' for qpsmtpd set to match qmail::MaxMessageSize
If qpsmtpd is leaving partially received message files in its spool directory, then that is a problem as well. Please create a bug report.