On Thu, Jun 17, 1999 at 01:05:07PM +0300, Anand Buddhdev wrote:

A follow on to my own post. In my hurry to go have lunch, I failed to note
that simply advertising ETRN isn't enough. qmail-smtpd.c must also
acknowledge an ETRN request with at least a "250 ok". So I added a bit more
code to do that. I apologise to everyone for my mistake.

I added an smtp_etrn subroutine after the smtp_help subroutine:

..
..
void smtp_help()
{
  out("214 qmail home page: http://pobox.com/~djb/qmail.html\r\n");
}
void smtp_etrn()
{
  out("250 ok\r\n");
}
void smtp_quit()
{
  smtp_greet("221 "); out("\r\n"); flush(); _exit(0);
}
..
..

And then the following line in the SMTP commands structure:

struct commands smtpcommands[] = {
  { "rcpt", smtp_rcpt, 0 }
, { "mail", smtp_mail, 0 }
, { "data", smtp_data, flush }
, { "quit", smtp_quit, flush }
, { "helo", smtp_helo, flush }
, { "ehlo", smtp_ehlo, flush }
, { "rset", smtp_rset, 0 }
, { "help", smtp_help, flush }
, { "noop", err_noop, flush }
, { "vrfy", err_vrfy, flush }
, { "etrn", smtp_etrn, flush }   <----- inserted line
, { 0, err_unimpl, flush }
} ;

I think this is better. Although the "250 ok" in response to ETRN is not
really needed (I could care less what the client machine thinks of the
response), it is the right thing to do.

> On Thu, Jun 17, 1999 at 12:06:11PM +0545, HTP Communication Pvt. Ltd wrote:
> 
> *smile* Exchange is trying to be clever by parsing the output of its EHLO
> to qmail-smtpd! That's a first.
> 
> Anyway, qmail *does* support ETRN - it just doesn't advertise it. You'll
> need to do 2 things: First, download serialmail-0.75, install it, read the
> AUTOTURN file and setup the necessary configuration for your customer. Your
> current setup doesn't sound right.
> 
> Secondly, you'll have to patch qmail-smtpd.c to make it advertise ETRN.
> It's a very simply patch. Look for the following code in qmail-smtpd.c:
> 
> void smtp_ehlo(arg) char *arg;
> {
>   smtp_greet("250-"); out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
>   seenmail = 0; dohelo(arg);
> }
> 
> And change it to:
> 
> void smtp_ehlo(arg) char *arg;
> {
>   smtp_greet("250-");
>   out("\r\n250-PIPELINING\r\n250-8BITMIME\r\n250 ETRN\r\n");
>   seenmail = 0; dohelo(arg);
> }
> 
> And then recompile with "make". Finally, copy the new qmail-smtpd binary
> from this source directory to your qmail bin directory.
> 
> Maybe DJB can add this to his TODO list for qmail 2.0. I've also been
> contemplating doing something about the SIZE parameter of ESMTP. qmail
> does support a size limit for incoming mail, but doesn't advertise it - as
> a consequence, big messages end up being transmitted, before they are
> rejected. Thing is, I'm not good with C programming, and don't feel
> comfortable with making major code changes. DJB: Any comments?
> 
> > Hello,
> >  I have a client who is using M/S Exchange 5.5 to download/upload the emails
> > from my server. I have qmail-1.03 running in my server. He has a domain
> > called blah.htp.com.np and is give a fixed IP address from my server. I have
> > an MX entry for his domain as well and created a virtual doamain such that
> > all the messaes for his domains comes to his mail box. But whenever he tries
> > to send the mails from my server it says
> > 
> > Internet mali service is configured to used ETRN to Dequeue mail but
> > 206.82.132.2 does not support ETRN
> > 
> > what does this means, does not qmail supports ETRN?
> > 
> > I am not on the list, pls reply personally.
> 
> -- 
> Anand

-- 
System Administrator
See complete headers for address, homepage and phone numbers

Reply via email to