Re: qmail-smtpd, qmail-send and multiple IP addresses

2001-05-04 Thread Rodrigo Severo

Darcy Buskermolen wrote:
 
 Is there a way to get qmail to use the IP that mail is recived in on to
 resend it back out ?

AFAIK the answer is no. I have been looking for some similar feature: I
want to set the src address depending on the e-mail bandwidth
requirement, you want to set it acording to the address it entered
through.

I managed to implement what I want with a major hack (also called
gambiara in portuguese): I already used qmail-scanner to filter my
e-mails for virus. Now qmail-scanner is also choosing which of my - now
- two qmail instances to use.

The new instance I installed yesterday has Damir Cifer outgoingip patch.

I believe you should take a look at http://www.qmail.org looking for
the 'bind to ip' patches. Besides Damir Cifer patch there are others
that might interest you, for example: Bill Nugent's updated patch.

None of them is exactly what you are looking for but you might be able
to create a gambiara that suit your needs.


I hope I helped you in some way,

Rodrigo Severo



Separating messages by size.

2001-05-02 Thread Rodrigo Severo

Hi,


I want to separate big messages and send them via a different
connection.

How can I do this?

Would maildrop help me in this case?

If I could send these big messages with a different source address it
would be perfect. Is it possible?


Rodrigo Severo



Re: limit to RCPT TO

2000-06-29 Thread Rodrigo Severo



Jason Ingham wrote:
 
 There is purportedly a patch for this but the link on the qmail website
 is stale. (The site exists but the file isn't there anymore.)
 
 Search for "limits the number of RCPT TO: commands" on:
 
   http://www.qmail.org/top.html
 
 I'm in need of this myself, does anyone have it lying around?

Just found it through ftpsearch at
ftp://ftp.comunit.net/pub/soft/qmail/qmail-1.01-maxrcpt.patch for
example. There are other places.

I couldn´t find the 1.03 version Ricardo Cerqueira mentioned. Does
anybody knows how it´s called?


Rodrigo

-- 
-------
Rodrigo Severo
[EMAIL PROTECTED]
Fabrica de Ideias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasilia-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
---



Re: limit to RCPT TO

2000-06-29 Thread Rodrigo Severo



Ricardo Cerqueira wrote:
 
 Here:
 
 http://www.ornl.gov/its/archives/mailing-lists/qmail/1999/11/msg00245.html

Ricardo,


The message above has an incomplete patch (last 2 lines missing). Here
is the complete patch:

---
*** qmail-1.03/qmail-smtpd.maxrcpt  Mon Jun 15 07:53:16 1998
--- qmail-1.03/qmail-smtpd.cFri Nov 19 16:09:34 1999
***
*** 25,34 
--- 25,36 
  #include "commands.h"
  
  #define MAXHOPS 100
  unsigned int databytes = 0;
  int timeout = 1200;
+ int rcptcounter = 0; /* Agregado por mi para el maxrcpt */
+ int maxrcpt = -1; /* Agregado por mi para el maxrcpt */
  
  int safewrite(fd,buf,len) int fd; char *buf; int len;
  {
int r;
r = timeoutwrite(timeout,fd,buf,len);
***
*** 56,66 
  void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
  void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); }
  void err_noop() { out("250 ok\r\n"); }
  void err_vrfy() { out("252 send some mail, i'll try my best\r\n"); }
  void err_qqt() { out("451 qqt failure (#4.3.0)\r\n"); }
! 
  
  stralloc greeting = {0};
  
  void smtp_greet(code) char *code;
  {
--- 58,68 
  void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
  void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); }
  void err_noop() { out("250 ok\r\n"); }
  void err_vrfy() { out("252 send some mail, i'll try my best\r\n"); }
  void err_qqt() { out("451 qqt failure (#4.3.0)\r\n"); }
! void err_excessrcpt() { out("666 Too many recipients specified
(#5.5.4)\r\n"); } /* Agregado por mi para el maxrcpt */
  
  stralloc greeting = {0};
  
  void smtp_greet(code) char *code;
  {
***
*** 107,116 
--- 109,119 
  die_control();
liphostok = control_rldef(liphost,"control/localiphost",1,(char *)
0);
if (liphostok == -1) die_control();
if (control_readint(timeout,"control/timeoutsmtpd") == -1)
die_control();
if (timeout = 0) timeout = 1;
+   if (control_readint(maxrcpt,"control/maxrcpt") == -1)
die_control(); /* Agregado por mi para el maxrcpt */
  
if (rcpthosts_init() == -1) die_control();
  
bmfok = control_readfile(bmf,"control/badmailfrom",0);
if (bmfok == -1) die_control();
***
*** 238,256 
--- 241,262 
out("250 flushed\r\n");
  }
  void smtp_mail(arg) char *arg;
  {
if (!addrparse(arg)) { err_syntax(); return; }
+   rcptcounter = 0; /* Agregado por mi para el maxrcpt */
flagbarf = bmfcheck();
seenmail = 1;
if (!stralloc_copys(rcptto,"")) die_nomem();
if (!stralloc_copys(mailfrom,addr.s)) die_nomem();
if (!stralloc_0(mailfrom)) die_nomem();
out("250 ok\r\n");
  }
  void smtp_rcpt(arg) char *arg; {
+   rcptcounter++; /* Agregado por mi para el maxrcpt */
if (!seenmail) { err_wantmail(); return; }
+   if (checkrcptcount() == 1) { err_excessrcpt(); } /* Agregado por mi
para el maxrcpt */
if (!addrparse(arg)) { err_syntax(); return; }
if (flagbarf) { err_bmf(); return; }
if (relayclient) {
  --addr.len;
  if (!stralloc_cats(addr,relayclient)) die_nomem();
***
*** 390,399 
--- 396,411 
if (hops) { out("554 too many hops, this message is looping
(#5.4.6)\r\n"); return; }
if (databytes) if (!bytestooverflow) { out("552 sorry, that message
size exceeds my databytes limit (#5.3.4)\r\n"); return; }
if (*qqx == 'D') out("554 "); else out("451 ");
out(qqx + 1);
out("\r\n");
+ } /* Agregado por mi para
el maxrcpt */
+ 
+ int checkrcptcount() {/* Agregado por mi para
el maxrcpt */
+   if (maxrcpt == -1) {return 0;}  /* Agregado por mi para
el maxrcpt */
+   else if (rcptcounter  maxrcpt) {return 1;} /* Agregado por mi para
el maxrcpt */
+   else {return 0;}/* Agregado por mi para
el maxrcpt */
  }
  
  struct commands smtpcommands[] = {
{ "rcpt", smtp_rcpt, 0 }
  , { "mail", smtp_mail, 0 }
---


Rodrigo

-- 
---
Rodrigo Severo
[EMAIL PROTECTED]
Fabrica de Ideias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasilia-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
---



Re: limit to RCPT TO

2000-06-29 Thread Rodrigo Severo



Ricardo Cerqueira wrote:
 
  The message above has an incomplete patch (last 2 lines missing). Here
  is the complete patch:
 
 Errr... No, it isn't. It's a patch! You apply it using the GNU patch utility. It 
does NOT have to be "fully working" C code.

Yes, you are right, sorry.

Rodrigo

-- 
-------
Rodrigo Severo
[EMAIL PROTECTED]
Fabrica de Ideias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasilia-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
---



A addition for Chris Johnson's tarpit patch.

2000-06-05 Thread Rodrigo Severo

Dear List,


I sent Chris and now I am sending to this list this addition I made for
Chris Johnson's tarpit patch
http://www.palomine.net/qmail/tarpit.html.

I just made a patch to qmail-smtpd man's page to list the 2 new control
files and environment variables Chris's patch creates.


Rodrigo Severo

-
*** qmail-smtpd.8.orig  Mon Jun 15 07:53:16 1998
--- qmail-smtpd.8   Sat Jun  3 13:50:36 2000
***
*** 162,171 
--- 162,195 
will refuse to run.
The first word of
.I smtpgreeting
should be the current host's name.
.TP 5
+   .I tarpitcount
+   Number of RCPT TOs
+   .B qmail-smtpd
+   will accept before start tarpitting or 0 for no tarpit.
+   
+   If the variable
+   .B TARPITCOUNT
+   is set, it overrides
+   .IR tarpitcount .
+   .TP 5
+   .I tarpitdelay
+   Number of seconds of delay 
+   .B qmail-smtpd
+   will insert after
+   .IR tarpitcount
+   RCPT TOs. See 
+   .IR tarpitcount
+   above.
+   
+   If the variable
+   .B TARPITDELAY
+   is set, it overrides
+   .IR tarpitdelay .
+   .TP 5
.I timeoutsmtpd
Number of seconds
.B qmail-smtpd
will wait for each new buffer of data from the remote SMTP client.
Default: 1200.
- 
-- 
---
Rodrigo Severo
[EMAIL PROTECTED]
Fabrica de Ideias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasilia-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
---



Re: qmail questions

2000-06-03 Thread Rodrigo Severo

Jens Georg wrote:
 but, there are still some questions not answered to me yet.

There always are, always are my boy...

 first of all i haven't found any informations about how to limit
 the maximum size of an incoming email. i want to set the limit
 to 1mb in order to stop users exchanging i.e. mp3's or mpegstuff
 abusing my mail-server.

Take a look on the DATABYTES control file/enviroment variable under "man
qmail-smtpd".

 second, i have set up control/virtualdomains without any problems
 using the good faq. but, i haven't found anything about forwarding
 emails. let's assume i have set up test-domain.com:testuser in
 the virtual domain control file. now, any incoming mail is delivered
 to the local user "testuser". ok, but how to forward i.e. any incoming
 emails to "[EMAIL PROTECTED]" to i.e. borther-of-
 [EMAIL PROTECTED] ??

I am not sure about this one but you can try to include a file named
.qmail-brother-of-testuser on testuser maildir with the following
contents:

[EMAIL PROTECTED]

Anyway, if I hadn't completely missed the point here you should take a
look at "man dot-qmail".


I hope this helps,

Rodrigo


-- 
---
Fábrica de Idéias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasília-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
[EMAIL PROTECTED]
---



Does someone knows what is this about?

2000-06-03 Thread Rodrigo Severo

I was looking at ORBS page about MTAs vulnerabilities and found this
about qmail:

-
Qmail admins: Qmail's current version is insecure by default. Most
admins know enough to follow the instructions for securing it before
putting qmail into service, however it usually drops ORBS test messages
checking for UUCP pathing vulnerabilities - "! pathing" - into the admin
mailbox. As ! is a standard network addressing indicator, this should be
regarded as a Qmail bug.
-

This entry arised 2 questions for me:

1. Isn't there a reasonable (easy?) way to make the default qmail
installation open relay safe?

2. What is this "UUCP pathing vulnerabilities"  talk all about? Can it
represent any kind of real trouble no tbeing able to properly process !
as "a standard network addressing indicator"?


Thanks in advance for your attention,

Rodrigo Severo

-- 
---
Fábrica de Idéias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasília-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
[EMAIL PROTECTED]
---



Re: Translating qmail messages.

2000-06-03 Thread Rodrigo Severo



James Raftery wrote:
 
 On Fri, Jun 02, 2000 at 09:14:02AM -0300, Rodrigo Severo wrote:
  what is QSBMF? I think I should know more about it before I start
  translating qmail messages.
 
 The "qmail-send Bounce Message Format":
 http://cr.yp.to/proto/qsbmf.txt

I am looking at it right know, thanks,

Rodrigo

-- 
---
Fábrica de Idéias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasília-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
[EMAIL PROTECTED]
---



Re: SMTP SIZE command revisited (new patch)

2000-06-03 Thread Rodrigo Severo

I am already using it, having applied it without problems and everything
seems to be ok.

Thanks Harris.

BTW, doesn anybody knows a simple way to test it? I mean, a SIZE capable
client that would send SIZE entries for example?


Rodrigo
-- 
---
Rodrigo Severo
[EMAIL PROTECTED]
Fabrica de Ideias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasilia-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
---



Re: Translating qmail messages.

2000-06-02 Thread Rodrigo Severo


 This will not work unless you put a space on the (currently) blank
 line in the paragraph above.  Without a space, the Portugese text gets
 interpreted by QSBMF readers as an email address and cause for the
 bounce.
 
 Otherwise, I see no reason why it shouldn't work, as long as you don't
 break QSBMF.

First of all, thanks for your answer, but please don't mind me asking,
what is QSBMF? I think I should know more about it before I start
translating qmail messages.

BTW, is there a single place for qmail messages or do I have to look in
all executables? Any clues about where to look for them?


TIAAA,

Rodrigo Severo



Translating qmail messages.

2000-06-01 Thread Rodrigo Severo

Dear list,


I am interested in providing translated versions of qmail messages.

I want qmail to answer with the already existing messages AND with the
translated versions. Something like:

---
Hi. This is the qmail-send program at fabricadeideias.com.
I'm afraid I wasn't able to deliver your message to the following
addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

Olá. Este é o programa qmail-send rodando em fabricadeideias.com.
Infelizmente não foi possível entregar sua mensagem para o endereço
abaixo.
Este é um erro permanente, eu não vou tentar novamente. É uma pena que
não tenha funcionado.
---

Has anybody tried it already? Does anybody knows about any issues
regarding this idea? Can someone give some clues about where to look for
the messages?


Thanks in advance for your attention,

Rodrigo Severo

P.S.: Just in case somebody is curious, the above translation is in
portuguese.

-- 
---
Fábrica de Idéias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasília-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
[EMAIL PROTECTED]
---



Re: SMTP SIZE command?

2000-05-29 Thread Rodrigo Severo

I was just taking a look at RFC 1870. Just at the end section: "7. 
Minimal usage" I found:

"A minimal server (...) must accept the
   extended MAIL command and return a 552 reply code if the client's
   declared size exceeds its fixed size limit (if any), but it need not
   detect "temporary" limitations on message size."

Won´t we need this extra feature do use the SIZE extention properly?

I am asking this AFTER I put Will Harris patch to work... Bad timing,
uh?

Anyway my smtp server has it and the gretting part seems to be working
just fine.


Rodrigo Severo

Will Harris wrote:
 
 Sorry, I just realised I forgot about the "-" conventions...  this is the
 correct patch.
 
 regards,
 Will
 
 At 20:11 27.05.2000, Jim Breton wrote:
  Are there any patches available that will make qmail support the RFC 1870
  SMTP SIZE extension?
  
 
 Here's one:
 
 *** qmail-smtpd.c.orig  Mon May 29 11:54:41 2000
 --- qmail-smtpd.c.new   Mon May 29 11:54:59 2000
 ***
 *** 227,235 
 --- 227,242 

-- 
---
Fábrica de Idéias
sbs - ed. empire center - bl. s - sala 109
cep 70070-904 - brasília-df - brazil
tel: (61) 321 1357
fax: (61) 321 6096
[EMAIL PROTECTED]
---



Re: slow answer through firewall

2000-05-15 Thread Rodrigo Severo

Antje,


 we are testing a firewall setup at the moment and see the strange behaviour that
 connections from inside to an outside mailserver take about 30 seconds to
 initiate while the connection to port 25 of an outside proxy machine that
 forwards the requests to the outside mailserver is fast.
 That's why we assume it's not a problem of the firewall but that qmail handles
 the connections differently. But I don't see a reason for this.
 Any clues?


I had a similar problem sometime ago. It was related to the firewall not
allowing ident requests to pass. They didn't even had to be answered,
they just had to pass the firewall.

As I wrote this it really looked strange but to allow ident request to
pass my fierwall was all I did and my delay problem got solved.



I hope this helps,

Rodrigo



Qmail died!!! Help!

1999-10-15 Thread Rodrigo Severo

Hi,


I have installed Qmail on my company 2 or 3 weeks ago. I installed
qmail with Nick Leverton's patch for qmail-send for remote delivery
control and with Christopher K. Davis's patch to accept oversize DNS
packets. Everything was going just fine.

Today I decided to create a few scripts to start and stop qmail remote
delivery when my dial-up connection came up and down. Before that I was
halting the computer every night.

AFAIK I have just created a few extra scripts that would be called by
cron. Obviously I must have done something else...

My problem is that qmail - as called by the rc script - doesn't runs
anymore.

I tried 'strace /var/qmail/rc' and just at the end of it I saw
qmail-start trying to call qmail-send and getting a 'Permission denied'
error. I runned ./instcheck and it found no problems. Can I have some
permission problems? 

I am sending the whole strace outputs for a 'strace -orc.trace
/var/qmail/rc' and for a 'strace -oqmail-send.trace qmail-send'. I am
sending also my dir list of /var/qmail and of /var/qmail/bin. I am
sending also the rc script I used.

My machine is a Pentium 200mHz with 64MB of RAM and 1.1GB harddisk. I
am running RedHat Linux 6.0.


Sorry for the huge attachments but I am in such a hurry to make qmail
work again that I tried to send all necessary info - and probably lots
of unnecessary also. :(



A confused to-be network administrator, hungry and helpless,

Rodrigo Severo


P.S.: One last piece of info, when I runned 'strace -orc.trace
/var/qmail/rc' I got the following error message which I don't
undestand: 'ptrace: umoven: Input/output error'.
 QmailDiedInfo.zip