Hi Scott,

and hello to everybody else, because this is my first post here :-)

My XMail also uses a Windows machine and I use custom filters for several things. It's easier than it seems: You can use every script that your windows machine can parse and even executables if they give back their results using STDOUT (command line style).

I have used VB Script, WSH and even .NET command line executables. An example:

My filter.post-data.tab has a line:

"d:\MailRoot\filters\RecipientFilter\RecipientName.exe" "@@FILE" "@@FROM" "@@CRCPT" "@@USERAUTH" "@@REMOTEADDR"

RecipientName.exe is my .NET command line executable, which parses the incoming parameters and logs the sender/recipient and headers of incoming and outgoing mails to a mySQL database. It was a simple VB Script before I decided to use an executable to have something I can properly debug. ;-)

Additionally, my filter can reject a message without sending a notification/bounce to the sender. You can do this by simply returning '3' from the filter. If you add '16' to the return value, so you get '19', you can stop processing of any following filters in filter*.tab file.


From Xmailserver README.TXT:

Filter commands have the ability to inspect and modify the content of
   the message (or info) file. The exit code of commands executed by XMail
   are used to tell XMail the action that has to be performed as a
   consequence of the filter. The exit code is composed by a raw exit code
   and additional flags. Currently defined flags are:

   '16' Stop selected filter list processing.

Currently defined raw exit codes are:

   '3' Reject the message.

When rejecting the message, the filter command has the ability to specify the SMTP status code that XMail will send to the remote SMTP client, by creating a file named $(FILE).rej containing the message
in the very first line. Such file will be automatically removed by XMail.


See MESSAGE FILTERS section for further details.


Regards,

Mathias Wührmann
FLEXact


Scott schrieb:
Hi,

Since there is no facility within XMail to prevent all bounce-messages, I need a filter, script or something that will do it for us.

Any tips/pointers on where to start are appreciated (not sure the best way to do it). Unfortunately the PHP based script/filter on the XMail forums does not appear to work for us. It's a Windows box with ActivePerl installed, so any default 'Windows script' or Perl would be fine to use.

I hope that it should not be too hard to do - check all outbound mail and if the sender is the local server and the subject contains "Error sending Message" to drop the mail.

The adverse consequences of "Poor" reputation on SenderBase, due to the server(s) bouncing NDR messages (spam bouncing to spoofed addresses) is far greater than missing a few valid 'Error sending message' may be generated. Not being able to send/receive email to/from the largest companies and ISP's in the country, does not compare to the the handful of of legitimate 'Mail box full' messages that would otherwise be useful. Our servers are not used for spam and SenderBase have confirmed that the bounced NDR's are the cause of the problem, so we need a way to stop them.

Thanks for any  help and pointers.
Regards,
Scott
_______________________________________________
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail

_______________________________________________
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to