Writing Custom Function

Julian Field MailScanner at ecs.soton.ac.uk
Thu Jan 13 12:05:42 GMT 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

hkbyte wrote:

> hkbyte wrote:
>
>> Julian Field wrote:
>>
>>> Scott Silva wrote:
>>>
>>>> hkbyte wrote:
>>>>
>>>>> I am learning how to write custom function. I attached my function to
>>>>> Non Spam actions. If my return value are 'deliver' and 'store' , both
>>>>> work properly as I want. But when I  change  'store' return value to
>>>>> 'bounce' , it failed and the maillog  said "Does not make sense to
>>>>> bounce non-spam". How can I send a custom bounce back message to
>>>>> sender.
>>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Bounce back message to a spammer is useless, as they are usually;
>>>
>>>
>>>
>>>
>>> He wants to bounce back to a NON-spammer. Bouncing a message which is
>>> not spam doesn't make much sense to me (hence the error message). Why
>>> would you want to reject mail you have decided you want to deliver?
>>>
>> Julian,
>> I want to restrict user to send outgoing email based on some
>> restrictions. I want to tell the sender why his mail is rejected.
>> BTW, I have another question about  the "@headers" attributes. It
>> seems that the format are different with different MTAs. Is there any
>> simple way I can retreive some header fields? e.g. The return-path and
>> date fields.
>>
>>
>>
> Julian, Is there any hints you can give me to proceed. I tried  to
> analyse the structure of @headers content but still  don't clearly
> understand.

I don't think there is any code to extract an arbitrary header, as I
have never needed to. The format of @headers does indeed depend on the
MTA. There are methods in Sendmail.pm, Exim.pm etc to provide an API for
changing @headers.

--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list