LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2019, 10:50 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Rep: Reputation: Disabled
Postfix complaining that "message size exceeds limit" even when below limit size


I have a Postfix server that is refusing to accept messages, complaining that they are above the size limit. The following is an attempt to send a message with a 2.5MB JPG attachment:

Code:
Mar 13 22:34:53 MX-VM postfix/smtpd[21494]: warning: 1305211FE75: BDAT request from unknown[xxxxxxx] exceeds message size limit
Disk space is more than adequate. I have set "message_size_limit = 0" and "virtual_mailbox_limit = 0" in main.cf. Changing these to something large (50000000) produces no change. Postfix still complains.

Here is main.cf

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/bin
daemon_directory = /usr/lib/postfix/bin
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = x
mydomain = x
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8 [::1]/128
relay_domains =
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps
home_mailbox = Maildir/
smtpd_banner = $myhostname
debug_peer_list = x
debug_peer_level = 3
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/bin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix/sample


broken_sasl_auth_clients = yes
readme_directory = /usr/share/doc/postfix
inet_protocols = all
inet_interfaces = all
smtpd_relay_restrictions = permit_sasl_authenticated permit_mynetworks defer_unauth_destination
smtpd_client_restrictions = check_client_access hash:/etc/postfix/sender_access
smtpd_helo_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_invalid_hostname
smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unknown_recipient_domain,
    reject_unauth_destination,
    check_sender_access hash:/etc/postfix/sender_access
    check_recipient_access hash:/etc/postfix/recipient_access
smtpd_sender_restrictions = hash:/etc/postfix/sender_access, pcre:/etc/postfix/tld_access
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = $mydomain
smtpd_tls_loglevel = 1
smtp_tls_loglevel = 1
disable_vrfy_command = yes
smtpd_helo_required = yes


virtual_alias_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_forwards.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_minimum_uid = 1001
virtual_mailbox_limit = 0


smtpd_tls_cert_file=x
smtpd_tls_key_file=x
smtpd_tls_CAfile=x
smtp_tls_CApath = /etc/ssl/certs
smtpd_tls_CApath = /etc/ssl/certs
smtpd_use_tls=yes
smtp_use_tls=yes
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_ask_ccert = yes
#smtpd_tls_protocols = !SSLv2,!SSLv3,!TLSv1
#smtp_tls_protocols = !SSLv2,!SSLv3,!TLSv1
#smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1
#smtp_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
smtp_tls_mandatory_protocols = !SSLv2,!SSLv3
smtpd_tls_mandatory_ciphers = high
smtp_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
smtp_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL
tls_preempt_cipherlist = yes
smtpd_tls_auth_only = yes
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_hard_error_limit = 3
smtpd_client_connection_rate_limit = 3
message_size_limit = 0
mailbox_size_limit = 0
append_dot_mydomain = no

msa_cleanup_service_name = msa_cleanup
msa_header_checks = pcre:/etc/postfix/msa_header_checks
msa_body_checks = pcre:/etc/postfix/msa_body_checks

header_checks = regexp:/etc/postfix/header_checks

mime_header_checks = regexp:/etc/postfix/block_attachments
compatibility_level = 2
(btw, this Postfix server has been running in the same configuration for over 5 years, and I have emails in my inbox that are much larger than the one shown here. This randomly started happening.)

Why is Postfix refusing this?
 
Old 03-14-2019, 06:02 AM   #2
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS 6-7; SuSE 8-12
Posts: 321

Rep: Reputation: 74
Have you looked at the postfix log (/var/log/maillog)? Depending on your distribution, it may be different file.
 
Old 03-14-2019, 10:48 AM   #3
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 2,754

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
The error is not about the size of the message, but about the size of the header.

I am a little confused, tho. You say
Quote:
I have a Postfix server that is refusing to accept messages, complaining that they are above the size limit. The following is an attempt to send a message with a 2.5MB JPG attachment:
Is this a message being received by the postfix server? Or a message you're trying to send with it?

What does the BOUNCE message say, exactly, and which server is sending that message?
 
Old 03-15-2019, 01:25 AM   #4
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Is this a message being received by the postfix server? Or a message you're trying to send with it?
The Postfix server is receiving a message that I am sending to it. I am sending from my iPhone 8 using the builtin mail client, which has worked flawlessly ever since I got it. The iPhone has had no updates recently.

There are no other logs. I am using Arch Linux, and everything is logging to systemd journal. The error I listed in the first post is the only one. I don't see any BOUNCE message anywhere.

Last edited by psycroptic; 03-15-2019 at 01:28 AM.
 
Old 03-15-2019, 06:19 AM   #5
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS 6-7; SuSE 8-12
Posts: 321

Rep: Reputation: 74
Quote:
Originally Posted by psycroptic View Post
The Postfix server is receiving a message that I am sending to it. I am sending from my iPhone 8 using the builtin mail client, which has worked flawlessly ever since I got it. The iPhone has had no updates recently.
I am more confused. So, you are sending email from your iPhone, your server receives the email, then what? The recipient does not get the email? And no errors?
Where did you check to see if the server received the email?

Try this from a shell and what happens?
Code:
echo "hello - test email" |  mail -S smtp=<your_SMTP_server_IP> -s "test email" -r <your_email@your_domain.com>  <your_email@your_domain.com>
 
Old 03-15-2019, 08:39 AM   #6
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 2,754

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
^ Yes. Confused. Looking again, I see that the logged message is a warning, not an error.
Does the incoming email actually get received and delivered?
 
Old 03-16-2019, 07:01 PM   #7
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Original Poster
Rep: Reputation: Disabled
From the iPhone, I am sending mail from myself to myself. The iPhone reports a failed send, and places the message in the Outbox. (It never says why it failed, only that it failed). The message never arrives in the mailbox. The logs I posted in the first post are the only log entries available.

Quote:
what happens?
Code:
echo "hello - test email" |  mail -S smtp=<your_SMTP_server_IP> -s "test email" -r <your_email@your_domain.com>  <your_email@your_domain.com>
This works fine. The message arrives.
 
Old 03-18-2019, 05:49 AM   #8
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS 6-7; SuSE 8-12
Posts: 321

Rep: Reputation: 74
Quote:
Originally Posted by psycroptic View Post
From the iPhone, I am sending mail from myself to myself. The iPhone reports a failed send, and places the message in the Outbox. (It never says why it failed, only that it failed). The message never arrives in the mailbox. The logs I posted in the first post are the only log entries available.



This works fine. The message arrives.
Did the mail ever worked from your iPhone?
The command you ran, did you run that from the mail server or a different machine?
Does the email work from another mail client / from different machine?
 
Old 03-25-2019, 06:10 PM   #9
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Original Poster
Rep: Reputation: Disabled
-Mail used to work on iPhone, but randomly started failung recently
-Ran command from another machine
-Mail sending works OK from Thunderbird (on that same machine).

I can find very little information on “BDAT request”. Putting it in quotes in Google returns mostly sites with the source code for Postfix. I cant be the only one with this problem...
 
Old 03-25-2019, 06:35 PM   #10
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 2,754

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
Quote:
Originally Posted by psycroptic View Post
From the iPhone, I am sending mail from myself to myself. The iPhone reports a failed send, and places the message in the Outbox. (It never says why it failed, only that it failed). The message never arrives in the mailbox. The logs I posted in the first post are the only log entries available.
Please clarify: When you say you are sending from the iPhone, do you mean that you are sending email from your Apple address to your postfix domain?
Or, do you mean that you are using your iPhone to send mail using your postfix domain?

Another way to ask that: Is the "from myself" address the same as, or different from, the "to myself" address?

Is the IP address obfuscated in your OP your IP?

Last edited by scasey; 03-25-2019 at 06:56 PM.
 
Old 03-27-2019, 10:06 PM   #11
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Original Poster
Rep: Reputation: Disabled
The "from" and "to" address are the same:

from = me@mydomain.com (my Postfix domain)
to = me@mydomain.com (my Postfix domain)
 
Old 03-27-2019, 10:20 PM   #12
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 2,754

Rep: Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949Reputation: 949
Quote:
Originally Posted by psycroptic View Post
The "from" and "to" address are the same:

from = me@mydomain.com (my Postfix domain)
to = me@mydomain.com (my Postfix domain)
So...you are using your iPhone to send mail using your postfix sever to your postfix server...and getting an error about (I think) the size of the header.
(You’re sending an email with your iPhone, not from your iPhone)
I’d check the settings on the iPhone and/or delete and re-add the account on the iPhone.

Since it works everywhere else, I suspect an issue with your iPhone settings.
 
Old 03-27-2019, 10:21 PM   #13
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 348

Original Poster
Rep: Reputation: Disabled
Already deleted & re-added the mail account on the iPhone numerous times, using the exact same settings that work fine with Thunderbird....

I don't understand how this could randomly break... Nothing has changed about the email settings anywhere, on Postfix or the iPhone...

Last edited by psycroptic; 03-27-2019 at 10:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to run this command "sudo apt-get install libdevil-dev" even after trying "apt-get -f install" getting below error message srihariu1 Linux - Embedded & Single-board computer 2 04-26-2018 06:33 AM
[SOLVED] test-tgmath2.c exceeds variable tracking size limit -- glibc bug-14729 Jerasmussen Linux - Software 3 08-19-2015 07:08 PM
[SOLVED] HTTP 400 - Size of a request header field exceeds server limit dcarrington Linux - Server 5 05-16-2012 10:06 AM
core dump file size exceeds limit with ulimit -f unlimited. initpidzero Linux - Software 0 07-28-2009 02:08 AM
LXer: Firefox market share exceeds 20%, Internet Explorer dips below 70% LXer Syndicated Linux News 0 08-01-2008 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration