[Mimedefang] problems with check_against_smtp_server and a cyrus backend

Matthew Schumacher matt.s at aptalaska.net
Fri Jun 17 16:04:37 EDT 2005


Fernando Gleiser wrote:
> This  is slightly off topic, I'm sorry about it.
> 
> I have an email gateway runing MIMEDefang on a FreeBSD 4.11 box,
> the real mail server is the internal net and runs Sendmail/Cyrus IMAP
> on another FreeBSD box.
> 
> I'm trying to make md_check_against_smtp_server work, but the problem
> is the internal mail server always answers with 250 Recipient OK, like
> you can see here:
> 
> -bash-2.05b# telnet 192.168.1.25 25
> Trying 192.168.1.25...
> Connected to pop.xxxxxxxxxxxxxxx.
> Escape character is '^]'.
> 220 mail2.xxxxxxxxxxxxxxx ESMTP Sendmail 8.12.6p3/8.12.3; Fri, 17 Jun
> 2005 17:03:01 -0300 (ART)
> HELO mailext.xxxxxxxxxxxxxxx
> 250 mail2.xxxxxxxxxxxxxxx Hello mailext.xxxxxxxxxxxxxxx [192.168.4.34],
> pleased to meet you
> MAIL FROM: <fgleiser at cactus.fi.uba.ar>
> 250 2.1.0 <fgleiser at cactus.fi.uba.ar>... Sender ok
> RCPT TO: <nosuchuser at xxxxxxxxxxxxxxx>
> 250 2.1.5 <nosuchuser at xxxxxxxxxxxxxxx>... Recipient ok
> QUIT
> 221 2.0.0 mail2.xxxxxxxxxxxxxxx closing connection
> Connection closed by foreign host.
> 
> I think the problem is that sendmail can't know if the user is valid at
> this stage, because it does the local delivery via LMTL and when the
> cyrus mailer realizes the user isn't valid, it's too late to reply eith
> a 5xx
> code.
> 
> 
> Does anybody have similar setup with md_check_against_smtp_server working?
> 
> Any pointers on how to tweak cyrus/sendmail to fix this will be greatly
> apreciated.
> 
> 

Fer,

There are a couple of ways to skin this cat.  You could setup a sendmail
rule to query the cyrus socketmap server which is hard since you only
really get a yes/no response, or you can query the socket map server
from mimedefang.

Now I don't use socketmap to figure out if a mailbox is available since
I use the autocreate patches.  Instead I lookup my users against LDAP
and if they are valid the mailbox gets created.

I do however, use socketmap to figure out of the user is over quota.
>From mimedefang I query socketmap and if it returns over quota then I
bounce the message.

Hope that helps,

schu




More information about the MIMEDefang mailing list