[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

smtpserver problems




Hi,

I recently observed 2 problems with the smtpserver of zmailer 2.99.50-s8: 

1. Unwanted relaying when using ip adresses.

trace 1:

17488#  connection from mail.twente.nl ipcnt 1 ident: NO-IDENT-SERVICE[2]
17488w  220 schuimpje.snt.utwente.nl ZMailer Server 2.99.50-s8 #ESMTP+IDENT ready at Sat, 9 Jan 1999 14:18:31 +0100
17488#  remote from [194.151.42.12]:32511
17488r  helo frop
17488w  250 schuimpje.snt.utwente.nl expected "HELO mail.twente.nl"
17488r  mail from:<nobody@[130.89.234.181]>
17488w  250 2.1.0 Sender syntax Ok
17488r  rcpt to:<wieger@twente.nl>
17488w  250 2.1.5 Recipient address syntax Ok
17488r  quit
17488w  221 2.0.0 schuimpje.snt.utwente.nl Out

Host mail.twente.nl has no right to relay mail trough
schuimpje.snt.utwente.nl. I see that nic.funet.fi does not do this, but
it's running a newer zmailer (s10), is this a config error or a fixed bug?


trace 2:

220 schuimpje.snt.utwente.nl ZMailer Server 2.99.50-s8 #3 ESMTP+IDENT ready at Mon, 11 Jan 1999 10:16:16 +0100
HELO xs3.xs4all.nl
250 schuimpje.snt.utwente.nl Hello xs3.xs4all.nl
MAIL FROM:<remco@schuimpje.snt.utwente.nl>
250 2.1.0 Sender syntax Ok
RCPT TO:<rvdmeent@xs4all.nl>
553-5.7.1 This target address is not our MX service
553-5.7.1 client, nor you are connecting from address
553-5.7.1 that is allowed to openly use us to relay
553-5.7.1 to any arbitary address thru us.
553 5.7.1 We don't accept this recipient.
RSET
250 2.0.0 Ok
MAIL FROM:<remco@[130.89.230.134]>
250 2.1.0 Sender syntax Ok
RCPT TO:<rvdmeent@xs4all.nl>
250 2.1.5 Recipient address syntax Ok
RSET
250 2.0.0 Ok
MAIL FROM:<remco@schuimpje.snt.utwente.nl>
250 2.1.0 Sender syntax Ok
RCPT TO:<rvdmeent@xs4all.nl>
250 2.1.5 Recipient address syntax Ok
QUIT
221 2.0.0 schuimpje.snt.utwente.nl Out

It seems that not enough of smtpserver's internal state is reset on a smtp
RSET. Is this a known (and possibly fixed) bug?

2. Incorrect handling of maximum message size.

When there is a maximum message size limit, smtpserver multiplies the
SIZE= of the MAIL FROM:<..> line with the number of recipients for
calculating the 'actual size' of the message. This can have rather
surprising effects as users can send a 400 kilobyte message to one
recipient but not to 3 recipients if the maximum message size is 1
megabyte. 

I fixed this as follows:

--- smtpcmds.c.org      Mon Dec 28 22:09:29 1998
+++ smtpcmds.c  Mon Dec 28 22:13:35 1998
@@ -1045,7 +1045,7 @@

     if (SS->sizeoptval < 0)
        SS->sizeoptval = 0;
-    SS->sizeoptsum += SS->sizeoptval;
+    SS->sizeoptsum = SS->sizeoptval;
     if (ferror(SS->mfp)) {
        type(SS, 452, m430, (char *) NULL);
     } else if (maxsize > 0 && SS->sizeoptsum > maxsize) {

But maybe there is a cleaner solution?

Thanks in advance for any helpfull replies...


~~  Wieger