[bglug] Ancora antispam

Diego Settimi mlpita@bergamo3.it
Mar 29 Maggio 2007 10:38:45 CEST


Ciao a tutti,
Ho XMAIL come mailserver su windows, in accoppiata con spamassassin per il
filtraggio delle mail.
Faccio filtrare a SA le email in ingresso. Il problema è che le email, nel
momento in cui posso processarle, non sono ancora in un formato digeribile
da SA, ma sono in un formato che antepone alla mail vera e propria una
serie di TAG che XMAIL stesso usa per processare la mail (vedi sotto).

La mia soluzione "arrangiata" è stata quella di splittare in 2 il file,
all' altezza della tag <<MAIL-DATA>>, far processare a SA la 2 parte del
file, quella con il msg vero e proprio, e poi ricomporre la mail. Questa
soluzione, pur essendo funzionante, non mi soddisfa un gran che.

Secondo voi, non esiste un modo piu elegante, magari per far processare a
SA l'email nel formato dello spool senza bisogno di splittarla e poi
ricomporla?

Si accettano consigli, Diego


****************************************************
The spool files has this structure:
   Info Data           [ 1th line ]
   SmtpDomain          [ 2nd line ]
   SmtpMessageID       [ 3rd line ]
   MAIL FROM:<...>     [ 4th line ]
   RCPT TO:<...>       [ 5th line ]
   <<MAIL-DATA>>       [ 6th line ]
   ...

After the '<<MAIL-DATA>>' tag (5th line) the message follows. The message
is composed of a headers section and, after the first empty line, the
message body. The format of the ``Info Data'' line is:
   [ClientIP]:ClientPort;[ServerIP]:ServerPort;Time

'EXTREME' care must be used when modifying the message because the filter
will be working on the real message, and a badly reformatted file will
lead to message loss. The spool file header (any data before
<<MAIL-DATA>>) 'MUST' be preserved as is by the filter in case of message
rewrite happens.
******************************************************


Maggiori informazioni sulla lista bglug