Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incoming/outgoing size limit

Status
Not open for further replies.

datadan

IS-IT--Management
Jul 22, 2002
283
US
I am receiving this error:

relay=127.0.0.1[127.0.0.1], delay=299, status=bounced (message size 13193755 exceeds size limit 8388608 of server 127.0.0.1[127.0.0.1])

I have looked through the postfix/mail.cf and the man pages but do not see anything regarding size restrictions. What am I missing?

Thanks,
 
Well this is odd!

My message_size_limit = 20480000 (which should be about 20mb), yet my mailog states that limit is 8m. Is a restart in order? Perhaps my machine borked. Any other SMTP size restrictions?

I'll reboot tonight and see if that fixes the problem.

 
Despite a restart I am constantly getting the following in my /var/log/maillog

message size 14910198 exceeds size limit 8388608 of server 127.0.0.1[127.0.0.1]

My meesage_size_limit should allow this. Is there anything else that could be interfearing with the delivery?

<snip from /etc/postfix/main.cf>
# increase size limit for emails
# I think 10M is postfix default... this is 20M
#
message_size_limit = 20480000


smtpd_etrn_restrictions =
smtpd_history_flush_threshold = 100
smtpd_noop_commands =
smtpd_recipient_limit = 1000
smtpd_timeout = 300s
</end snip>

 
Are you running additional MTAs on other ports for content filtering purposes? Is it possible that there might be different settings here? Check master.cf and see if you find an additional message_size_limit.
 
jkupski,

I don't see any in the master.cf below. I am running, IMAP/Squirrelmail, but rejection happens to forwarding accounts that exist in the /etc/postfix/alias directory and do not have maildrop/imap/squirrelmail accounts, but get recjected traffic anyway.

Other thoughts?


smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=no -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - locaL

virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
#maildrop unix - n n - - pipe
# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

maildrop unix - n n - - pipe
flags=uR user=maildrop argv=/usr/local/bin/maildrop -d $recipient -w 90

old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient


#
# Re-injection listener
#
localhost:10025 inet n - n - 10 smtpd
-o content_filter=
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
 
Run 'postconf | grep size' and verify that the size limit is changing when you restart postfix--if not, then you have some really weird problem that's beyond my ability to troubleshoot, and may want to look at least at upgrading to a newer version and seeing if the problem persists. You also might not be using the standing configuration files :)

I see nothing wrong with the master.cf posted above, but I don't do local delivery on my box, so I might be missing something; one thing springs to mind, what's your mailbox_size_limit?

Add some context to the log file excepts you posted--what else is going on here?

Here's what I've done to try to replicate your problem:

Postfix 2.1.5 on RHEL4 (centos4, actually.)
message_size_limit set to 10000000
Server is a relay that forwards to an exchange box (with 10000000 msg size limit)

Generated 20MB test file (dd if=/dev/urandom of=/tmp/rand.out count=40960)
MMencode file (file size now 28350390 bytes)

Using elm as MUA. Attempt to send message:
Jun 15 18:21:13 smtp postfix/postdrop[3425]: warning: uid=0: File too large
Jun 15 14:21:13 smtp postfix/sendmail[3424]: fatal: root(0): Message file too big

Adjust message_size_limit to 50MB, and reload postfix configuration. Attempt to send message:
Jun 15 14:23:24 smtp postfix/pickup[3436]: 3AF389A821: uid=0 from=<root>
Jun 15 14:23:24 smtp postfix/cleanup[3446]: 3AF389A821: message-id=<20050615182324.3AF389A821@smtp.xxxxxxxxx.com>
Jun 15 14:23:24 smtp postfix/qmgr[3437]: 3AF389A821: from=<root@xxxxxxxx.com>, size=28739604, nrcpt=1 (queue active)
Jun 15 14:23:24 smtp postfix/smtp[3449]: 3AF389A821: to=<xxxxxxxx@xxxxxxxx.com>, relay=172.17.0.21[172.17.0.21], delay=0, status=bounced (message size 28739604 exceeds size limit 12288000 of server 172.17.0.21[172.17.0.21])
Jun 15 14:23:24 smtp postfix/qmgr[3437]: 3AF389A821: removed

Looks familiar, doesn't it? The difference is, of course, that the MTA that's bouncing my mail is on a remote machine instead of localhost, but the error is the same. Also note that the log excerpt above where postfix's limit is exceeded is a very simple 'fatal: message to big' instead of something bouncing from a relay.

I'm still thinking the problem isn't postfix.
 
dum dum dum dum (ominous music in the background).

The plot thickens. What is bounce_size_limit and where do I set it? I don't see it in master.cf or main.cf. Other problems with below?



<snip>
[root@mail root]# postconf |grep size
berkeley_db_create_buffer_size = 16777216
berkeley_db_read_buffer_size = 131072
body_checks_size_limit = 51200
bounce_size_limit = 50000
header_size_limit = 102400
mailbox_size_limit = 51200000
message_size_limit = 20480000
</snip>

 
That's set in main.cf. Because the setting isn't present, you're using the default of 50kb. Unfortunately, this isn't your problem.

The good news is that the problem isn't postfix--we can believe what postconf tells us. The bad news is that I am unsure where to go from here. Need more logfile info, at least. main.cf would be nice.

Is your postfix/IMAP/squirrelmail solution completely your own doing, or did you follow somebody's HOWTO?

Looking at your master.cf again, I have to ask: is this the entirety of the file, or have you snipped it? The reason I ask is you have a re-injection listener on port 10025, but you're not feeding anything to an external filter that would need to re-inject anything? I would expect to see smtpd_proxy_filter in there somewhere.
 
Complete Log for 88DC915FC03B

<snip>
[root@mail root]# cat /var/log/maillog | grep "88DC915FC03B"
Jun 16 16:09:11 mail postfix/smtpd[1032]: 88DC915FC03B: client=localhost.localdomain[127.0.0.1], sasl_method=LOGIN, sasl_username=myuser@myomain.com
Jun 16 16:09:11 mail postfix/cleanup[32285]: 88DC915FC03B: message-id=<59231.a.b.c.d.1118963351.squirrel@a.b.c.d>
Jun 16 16:09:13 mail postfix/qmgr[3570]: 88DC915FC03B: from=<myuser@mydomain.com>, size=13262518, nrcpt=2 (queue active)
Jun 16 16:09:14 mail postfix/smtp[1201]: 88DC915FC03B: to=<outgoinguser@outgoingdomain.com>, relay=127.0.0.1[127.0.0.1], delay=3, status=bounced (message size 13262518 exceeds size limit 8388608 of server 127.0.0.1[127.0.0.1])
Jun 16 16:09:14 mail postfix/smtp[1201]: 88DC915FC03B: to=<otheroutgoinguser@outgoingdomain.com>, relay=127.0.0.1[127.0.0.1], delay=3, status=bounced (message size 13262518 exceeds size limit 8388608 of server 127.0.0.1[127.0.0.1])
Jun 16 16:09:14 mail postfix/qmgr[3570]: 88DC915FC03B: removed
</snip>

Complete Main.cf:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = mail.mydomain.com
debug_peer_level = 2
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no

#####################
#Read me directory no
#####################

content_filter = smtp:[127.0.0.1]:10024
receive_override_options = no_address_mappings
biff = no
notify_classes = delay, protocol, resource, software
disable_vrfy_command = yes
smtpd_banner = $myhostname NO UCE ESMTP
message_size_limit = 20480000
smtpd_etrn_restrictions =
smtpd_history_flush_threshold = 100
smtpd_noop_commands =
smtpd_recipient_limit = 1000
smtpd_timeout = 300s
smtpd_error_sleep_time = 5
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 100
strict_rfc821_envelopes = no
mynetworks = 127.0.0.0/8, 10.10.10.1/32, 192.168.160.5/32, 192.168.150.5/32, a.b.c.d
smtpd_helo_required = no
body_checks = regexp:/etc/postfix/maps/body_checks
smtpd_client_restrictions =
smtpd_helo_restrictions =
smtpd_sender_restrictions =
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
check_sender_access hash:/etc/postfix/maps/disallow_my_domain
check_recipient_access hash:/etc/postfix/maps/spamtrap
reject_unauth_pipelining
reject_non_fqdn_sender
reject_unknown_sender_domain
check_sender_mx_access hash:/etc/postfix/maps/mx_access
reject_multi_recipient_bounce
reject_non_fqdn_recipient
reject_unknown_recipient_domain
check_recipient_mx_access hash:/etc/postfix/maps/mx_access
check_sender_access hash:/etc/postfix/maps/frequently_forged_senders

address_verify_map = hash:/etc/postfix/maps/verify
allow_untrusted_routing = no

###################
#SASL
###################

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous

##################
#My SQL
##################

transport_maps=mysql:/etc/postfix/maps/transport.cf
virtual_mailbox_maps=mysql:/etc/postfix/maps/mysql_virt.cf
virtual_uid_maps=mysql:/etc/postfix/maps/uids.cf
virtual_gid_maps=mysql:/etc/postfix/maps/gids.cf
virtual_mailbox_base=/
mydestination=$mydomain, $myhostname, $transport_maps
virtual_maps=mysql:/etc/postfix/maps/virtual.cf hash:/etc/postfix/aliases
local_recipient_maps = $virtual_mailbox_maps
unknown_local_recipient_reject_code = 450
maildrop_destination_recipient_limit = 1


#########################
##TSL Settings
#########################
smtpd_tls_cert_file = /etc/httpd/conf/ssl.crt/mail_mydomain1_com.crt
smtpd_tls_key_file = /etc/httpd/conf/ssl.key/mail_mydomain1_com.key
smtpd_tls_CAfile = /etc/httpd/conf/ssl.crt/ComodoSecurityServicesCA.mydomain1.crt


###smtpd_tls_CApath = /etc/httpd/conf/ssl.cacerts
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_session_cache_timeout = 3600s
#smtpd_tls_loglevel = 3
#smtpd_tls_received_header = yes
#tls_random_source = dev:/dev/urandom
## test to ensure that local transport is local and not virtual so we can use piping in the aliases map
# this should already be the default, but just in case....
local_transport = local
html_directory = no





The posfix/IMAP/Squirrelmail was setup by some consultants who know infinately more than I do.

I did snip the master.cf, but that's all that is uncommented. There is IMAPPROXY running, and proxymap is specified in the master.cf.

I checked my /etc/imapproxy.conf and only see a cash_size setting which should not affect the bouncing.


Thanks,

 
Yup....I found it. Virus Milter also as a size setting on it. All is well. Thanks for your help jkupski! You're a genius...
 
Is there any way to make the message size limit "unlimited"?
Or is that a "bad thing"?

Alternatively, is there a limit to the limit?

message_size_limit = 10000000000

 
Is there any way to make the message size limit "unlimited"?

message_size_limit=0

Or is that a "bad thing"?

YES, I think this fits the definition of a "bad thing." Email is not a sane way of transferring large files.
 
I'm still seeing these once every 63 seconds or so...

Aug 8 11:42:59 production postfix/cleanup[20703]: warning: 5C44B9C17B: queue file size limit exceeded
Aug 8 11:44:20 production postfix/cleanup[22123]: warning: 44B8B9C17B: queue file size limit exceeded
Aug 8 11:45:30 production postfix/cleanup[20703]: warning: CAED19C1AD: queue file size limit exceeded
Aug 8 11:46:46 production postfix/cleanup[22866]: warning: B342D9C1AD: queue file size limit exceeded
Aug 8 11:47:56 production postfix/cleanup[22123]: warning: 257079C1AD: queue file size limit exceeded
Aug 8 11:49:09 production postfix/cleanup[20703]: warning: 1CA299C1AD: queue file size limit exceeded

# postconf -n|grep size
message_size_limit = 50000000

I already set to 50 MB. (should be enough)

Could this be something else?
Such as:

queue_file_attribute_count_limit = 100

Are the entries in virtual_alias_maps considered a "queue file attribute"?

I have more than 100 listed in there.
 
1. Did you execute "postfix reload" after changing the message_size_limit?
2. What's your mailbox_size_limit?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top