[Mimedefang] md_check_against_smtp_server and md_graphdefang_log

Tilman Schmidt t.schmidt at phoenixsoftware.de
Mon Mar 25 18:43:15 EDT 2013

Am 25.03.2013 20:54, schrieb James Curtis:

>> 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.

> Should it be in a separate section of the code, it's own section of code.  I have tried adding it to filter_begin, filter_end, and as it's own section of code directly after the } after all of the filter_begin.  

filter_recipient is a filter function of its own. It should
not be stuffed inside one of the other filter functions.

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.

> 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20130325/cc3d252c/attachment-0003.sig>

More information about the MIMEDefang mailing list