FreeBSD Port: milter-regex-1.5

Regis McEwen regism at
Fri Jun 11 06:23:43 GMT 2004



I can't, unfortunately, get this to work (I even tried the developers


I compiled milter-regex with sendmail 8.12.11 (with MILTER support
compiled in)


I used the following /etc/mail/milter-regexp.conf:


reject "Rejected, spamvertised website"

body ,http://[^/]*cyberpromo\.com/,i



It does not get rejected, but gets delivered and I see the following in

/var/log/syslog file:


Jun 11 02:14:38 elvirus2 milter-regexp: [ID 308449 mail.error] bad
config line:

"reject "Rejected, spamvertised website""

Jun 11 02:14:38 elvirus2 milter-regexp: [ID 646957] error in
new confi

g file: /etc/mail/milter-regexp.conf

Jun 11 02:14:38 elvirus2 sm-mta[20623]: [ID 801593 mail.error]
i5B6EcCZ020623: m

ilter_read(milter-regex): cmd read returned 0, expecting 5


I get this error whether or not I use double quotes (") around the


What is the error "cmd read returned 0, expecting 5" mean?


I also got a core file dumped. (I don't have gdb on this machine yet so

I don't have a stack trace available, unfortunately).


I put an unrelated milter to see if MILTER in sendmail was working

of milter-regex. 


Here's what I got:



connect_callback localhost


envfrom_callback <opsadmin at>

envrcpt_callback <regism at>

header_callback 'Received: (from root at localhost)

        by (8.12.11/8.12.11/Submit) id

        Fri, 11 Jun 2004 02:13:57 -0400 (EDT)'

header_callback 'Date: Fri, 11 Jun 2004 02:13:57 -0400 (EDT)'

header_callback 'Message-Id:
<200406110613.i5B6Dv5o020589 at>'

header_callback 'From: <regism at>'

header_callback 'To: <regism at>'

header_callback 'Subject: Testing milter-regex'








Once I can get this working, what I really want to do is to scan the
body for

a specific pattern and if found, change the "Subject:" line to:

    [Likely Junk]  <original subject line>


either directly or by having milter-regex put in an X-header and then

having another milter search for that X-header and then calling the

routine smfi_chgheader to change the subject (unless there is a

better way to do make this change).



Can you help me to figure this out?


I am on Solaris 9 using gcc 2.95.2


Thanks for your assistance.






More information about the freebsd-ports mailing list