Got it! Works like a charm! I missed the bit about using Mime::Tools to build the entity.
For anyone who wants to build a quota system and notify both the sender and receiver, it's easy... just get a size from the entity and compare it against a hard-coded limit. Then you reject if it's too big using replace_entire_message and action_notify_sender. -----Original Message----- From: Cliff Hayes [mailto:cha...@afo.net] Sent: Tuesday, November 10, 2009 11:50 PM To: mimedefang@lists.roaringpenguin.com Subject: FW: [Mimedefang] quota alert ok, I tried that ... bad idea. Then I tried this in filter_end ... and it ignored the "replace_entire_message" and simply delivered the message as-is: action_notify_sender("The mailbox for $userName is full. Subject: $afoMsgSubject \n"); $entity = "From: Support\nSubject: Your mailbox is full!\nYour mailbox is full and rejecting messages\n"; replace_entire_message($entity); -----Original Message----- From: mimedefang-boun...@lists.roaringpenguin.com [mailto:mimedefang-boun...@lists.roaringpenguin.com]on Behalf Of Cliff Hayes Sent: Tuesday, November 10, 2009 9:33 PM To: mimedefang@lists.roaringpenguin.com Subject: [Mimedefang] quota alert Hello, I programmed mimedefang to send a reject to the sender if user's mailbox is full. I'd also like to send a one-line email to the receiver notifying him/her that messages are being rejected due to full box. That way the user knows why they are suddenly not receiving email and can fix the issue without calling support. Since I'm not using the Linux quota system, so the mailbox isn't really full, it's just over the limit that I set. What is the best way to send a message to a user from within mimedefang? I'm planning to use the standard perl "sendmail -t" from filter_end in mimedefang-filter unless there is something built into mimedefang. Thanks, Cliff _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang