[Mimedefang] mimedefang and milter-ahead

George Roberts groberts at purity.net
Fri Jun 18 19:28:06 EDT 2010


I'm using milter-ahead to call ahead to the recipient mail server to see if the receipient(s) of the message exist.  It appears that if milter-ahead rejects the message due to the user not existing on the recipient server that milter processing just ends ... what I really want to be able to do, if possible, is have mimedefang do some processing if milter-ahead rejects the message.  Essentially I want to increment a statistic for the recipient domain in a mysql database so I can keep track of how many messages were attempted to non-existent users for each domain.

Here' a log example:

Jun 18 18:17:50 death sendmail[17754]: NOQUEUE: connect from edge1.exchangecarrier.net [208.127.0.7]
Jun 18 18:17:50 death sendmail[17754]: AUTH: available mech=PLAIN LOGIN ANONYMOUS, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (milter-ahead): init success to negotiate
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (cmilter): init success to negotiate
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (mimedefang): init success to negotiate
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter: connect to filters
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=milter-ahead, action=connect, continue
Jun 18 18:17:50 death cmfilter[12323]: [T4128095120] IP 208.127.0.7 spam score 0, continuing
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=cmilter, action=connect, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=mimedefang, action=connect, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 220 
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: <-- EHLO edge1.exchangecarrier.net
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=cmilter, action=helo, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=mimedefang, action=helo, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-Hello edge1.exchangecarrier.net [208.127.0.7], pleased to meet you
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-ENHANCEDSTATUSCODES
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-PIPELINING
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-8BITMIME
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-SIZE
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-DSN
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-ETRN
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250-DELIVERBY
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250 HELP
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: <-- MAIL FROM:<test at test.net> SIZE=5629
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter: senders: <test at test.net>
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=milter-ahead, action=mail, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=cmilter, action=mail, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=mimedefang, action=mail, continue
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 250 2.1.0 <test at test.net>... Sender ok
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: <-- RCPT TO:<test2 at test.net>
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter: rcpts: <test2 at test.net>
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: milter=milter-ahead, action=rcpt, reject=550 5.7.1 server [] for <test2 at test.net> rejected address saying "<test2 at test.net>... User unknown"
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter: to=<test2 at test.net>, reject=550 5.7.1 server [] for <test2 at test.net> rejected address saying "<test2 at test.net>... User unknown"
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 550 5.7.1 <test2 at test.net>... server [] for <test2 at test.net> rejected address saying "<test2 at test.net>... User unknown"
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: <-- QUIT
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: --- 221 2.0.0  closing connection
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (milter-ahead): quit filter
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (cmilter): quit filter
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: Milter (mimedefang): quit filter
Jun 18 18:17:50 death sendmail[17754]: o5INHoCR017754: from=<test at test.net>, size=5629, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=edge1.exchangecarrier.net [208.127.0.7]

Anyone have any idea if what I'm looking to do is possible?

George




More information about the MIMEDefang mailing list