[Mimedefang] howto add another recpient when email's size bigger that X vale

John Rudd john at rudd.cc
Wed Sep 28 09:22:26 EDT 2005


On Sep 28, 2005, at 2:39 AM, Anton Kudris wrote:

> Hello.
>
> What I wanted to do with mimedefang is to add special recipient to all
> emails which size >= 5MB
> for example I have bigemails at mailbox.ru. If there's 10MB incoming
> email I whant it to be passed to bigemails at mailbox.ru along with
> original recipient.
>
> I think I need to add few lines to filter_end() like these
>
> my $x = 5120; #bytes
> if (message_size() >= $x) {
>   add_recipient('bigemails at mailbox.ru');
> }
>
> but I don't know how to write message_size() function... Or is there
> any $MsgSize variable avialable?
>


if (-s "./INPUTMSG" > (5*1024*1024)) {
    add_recipient("bigemails\@mailbox.ru");
    }




More information about the MIMEDefang mailing list