check msg size before processing?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

check msg size before processing?

11up
Hi,

Is it possible for postfix to check an email's size(incl attachments) before processing the message? My client sends to a remote postfix server and the whole message is uploaded to postfix before it's rejected. It actually never gets rejected, it just sits there in the outbox trying to upload it to the server, eating bandwitdh according to my firewall

my main.cf:

myhostname = XXXXXXX
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = XXXXXXXX, localhost.XXXXXXXX, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
body_checks_size_limit = 1200
bounce_size_limit = 50000
header_size_limit = 102400
message_size_limit = 6000000
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_received_header = yes
smtpd_tls_loglevel = 1
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names


any ideas?