On tor 20 feb 2014 20:14:20, Deeztek Support via amavis-users wrote: > On 2/19/2014 10:41 PM, Deeztek Support via amavis-users wrote: >> On 2/19/2014 4:22 PM, Patrick Ben Koetter via amavis-users wrote: >>> * Deeztek Support via amavis-users <[email protected]>: >>>> Is there a way to output msgs quarantined in mysql into a file and >>>> then >>>> feed that file to spamassassin for bayes training? Or is there a much >>>> simpler way of doing this that I'm not aware of? >>> You could use the Resend-format when you release messages and >>> reroute them to >>> a dedicated mailbox. Then feed the content of that mailbox to SA. >>> >>> p@rick >>> >> There are no mailboxes on the system I'm trying to do this on. It's a >> relay server and I rather not get another server in the mix. I want >> to see if I can accomplish it on the same system. Could I somehow >> query the database and output the contents into a file and feed that >> to spamassassin? Has anyone tried anything like this before. I can't >> be the only one? > Just in case anyone wants to know, I was able to query the quarantine > table using the mail_id of the message sorting by chunk_ind ascending > and I was able to output the query output into a file. I then fed that > file into spamassassin using the sa-learn command and it looks like it > worked like a charm. > >
I'm doing it like this: select UNCOMPRESS(mail_text) from <table> where mail_id='XXXXX' order by chunk_ind into outfile "/tmp/email.eml" FIELDS ESCAPED BY ''; Else you will get it escaped, that’s bad!
signature.asc
Description: OpenPGP digital signature
