[Mimedefang] md_check_against_smtp_server and md_graphdefang_log

James Curtis jameswcurtis at hotmail.com
Mon Mar 25 19:37:54 EDT 2013


*Date: Mon, 25 Mar 2013 23:43:15 +0100
From: t.schmidt
>>> your filter_recipient could in fact be as simple as:
>>> sub filter_recipient
>>> {
>>> my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer,
>>> $rcpt_host, $rcpt_addr) = @_;
>>> return md_check_against_smtp_server($sender, $recip,
>>> "<filter serverexternal DNS name>", "<internal private address>");
>>> }
>>
>> OK, so I tried this simple strip of code, just to get it to reject unknown users without logging. It still doesn't seem to be>>working.
>That doesn't match what I am observing. With my very similar
>setup I get log entries for all rejections. So whatever it is
>that rejects unknown users in your setup, I'm pretty sure it
>isn't that filter_recipient function.
>What exactly do you mean by "reject unknown users without
>logging", anyway? What happens when a server attempts to
>deliver a mail message for an unknown user? What response
>does the sending server get? What does your server log?
>Nothing at all? That would be very odd. In my experience,
>Sendmail always logs at least the connection attempt.
>Please show an actual log excerpt.
I get the normal sendmail logs, but since my filter is a relay, it doesn't know what users exist, so it accepts the email, and then has to send a bounce message. when I said reject without logging, I meant md_graphdefang_log
>
>One other thing I forgot: MIMEdefang must actually be told
>that you want it to run a filter_recipient function, by
>starting it with the -t option. If you don't give that option
>it'll just ignore any filter_recipient function you might
>have in your filter script. Bit me more than once, that one.
>
I modified the mimedefang init script as follows is this correct for what you meant? (previously the -t wasn't there):
 daemon $PROGDIR/$prog-multiplexor -t -p /var/spool/MIMEDefang/$prog-multiplexor.pid\
ps ax |grep mimedefang reports this:
32559 ?        S      0:00 /usr/bin/mimedefang-multiplexor -t -p /var/spool/MIMEDefang/mimedefang-multiplexor.pid -m 2 -x 10 -y 0 -U defang -b 600 -l -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
32560 ?        S      0:12 /usr/bin/perl /usr/bin/mimedefang.pl -server
32575 ?        Sl     0:00 /usr/bin/mimedefang -P /var/spool/MIMEDefang/mimedefang.pid -m /var/spool/MIMEDefang/mimedefang-multiplexor.sock -R -1 -U defang -q -p /var/spool/MIMEDefang/mimedefang.sock
32588 ?        S      0:00 /usr/bin/perl /usr/bin/mimedefang.pl -server
 
>> Could location be part of the equation that I'm missing?
>Well, of course where you place code makes all the difference.
>In programming, where you place a piece of code determines
>when it is run.
>If you are unsure how all of this hangs together, perhaps it
>would be best to post your mimedefang-filter script in its
>entirety so knowledgeable people can have a look at it.
Is this forum a good place to post in entirety, or somewhere else? It really is simple mods to the stock mimedefang-filter. 		 	   		  


More information about the MIMEDefang mailing list