qmail Digest 12 May 1999 10:00:01 -0000 Issue 638

Topics (messages 25436 through 25465):

middleman for outgoing messages
        25436 by: [EMAIL PROTECTED]
        25455 by: olli <[EMAIL PROTECTED]>

smtproutes failover
        25437 by: [EMAIL PROTECTED] (Lorens Kockum)

help: adding reply-to field to redirected mails????
        25438 by: Bruno Boettcher <[EMAIL PROTECTED]>

setting relay clients
        25439 by: Dave Sill <[EMAIL PROTECTED]>

how to delete messages from queue ?
        25440 by: "Claudiu Balciza" <[EMAIL PROTECTED]>
        25441 by: Harald Hanche-Olsen <[EMAIL PROTECTED]>
        25456 by: olli <[EMAIL PROTECTED]>
        25462 by: "Alex at Star" <[EMAIL PROTECTED]>

Fundamental flaws in List-Unsubscribe
        25442 by: "Fred Lindberg" <[EMAIL PROTECTED]>
        25444 by: "Chris Garrigues" <[EMAIL PROTECTED]>
        25464 by: Pavel Kankovsky <[EMAIL PROTECTED]>

pine.conf under RedHat 6.0
        25443 by: Mate Wierdl <[EMAIL PROTECTED]>

Impossible?
        25445 by: Jonathan W Herbert <[EMAIL PROTECTED]>
        25446 by: "Timothy L. Mayo" <[EMAIL PROTECTED]>
        25450 by: Chris Johnson <[EMAIL PROTECTED]>
        25451 by: <[EMAIL PROTECTED]>
        25452 by: <[EMAIL PROTECTED]>

Difficult routing problem
        25447 by: "Ralf Guenthner" <[EMAIL PROTECTED]>

Error 500 when qmail talks to windows SMTP relay through a firewall...
        25448 by: "DUGRES Hugues, I.T. manager at C.Q.E." <[EMAIL PROTECTED]>
        25449 by: Chris Johnson <[EMAIL PROTECTED]>

qmail, checkpasswd, and POP3 help
        25453 by: "New Hope Hostmaster" <[EMAIL PROTECTED]>
        25454 by: Chris Johnson <[EMAIL PROTECTED]>

qmail-popup/qmail-pop3d logging patch?
        25457 by: Dan Peterson <[EMAIL PROTECTED]>
        25463 by: Balazs Nagy <[EMAIL PROTECTED]>

qmail config questions
        25458 by: <[EMAIL PROTECTED]>

strange interaction with netscape and tcpserver
        25459 by: "Peter Samuel" <[EMAIL PROTECTED]>

FORWARDING MAILl to aPO in sheltered Domain
        25460 by: "Walter Danielsen" <[EMAIL PROTECTED]>
        25461 by: Magnus Bodin <[EMAIL PROTECTED]>

[PATCH] MAIL FROM:... 2nd. ed
        25465 by: Balazs Nagy <[EMAIL PROTECTED]>

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To bug my human owner, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Hi!

I'm developing some sort of database which should keep all messages
with a given subject (like listserver, but in the database would go
all the messages with given subject).

I wrote parser (PERL) to do it (pipe-driven).

Now the question is:
  Where I could stick the parser so it would intercept all
(local/remote) messages (check/make note to db), let them go?

I suppose it should be hooked to qmail-queue, but could somebody
more knowledgeable enlighten me please?
Could it be done in "clean" way (without patching the sources)?

Thank you in advance!

PS.
  Reply to me directly, as I'm not subscribed to the mailing list.

-- 
Bye,                        | "Unix is simple. It just takes a
Penn.                       |  genius to understand its simplicity"
http://peter.netline.net.il |                        Dennis Ritchie




On Tue, 11 May 1999 [EMAIL PROTECTED] wrote:
> I'm developing some sort of database which should keep all messages
> with a given subject (like listserver, but in the database would go
> all the messages with given subject).
> I wrote parser (PERL) to do it (pipe-driven).
> Now the question is:
>   Where I could stick the parser so it would intercept all
> (local/remote) messages (check/make note to db), let them go?
> I suppose it should be hooked to qmail-queue, but could somebody
> more knowledgeable enlighten me please?
> Could it be done in "clean" way (without patching the sources)?
As another way to do it is recompiling qmail w/ logging all mail (as in
FAQ) & then parse all from .qmail-log , but I'm not sure that it is better
then what you wanna do. 

Bye.Olli.





On the qmail list [EMAIL PROTECTED] wrote:
>On Mon, May 10, 1999 at 05:09:25PM -0400, Jason wrote:
>> [...] if it fails trying to send to the first host (10.1.1.1),
>> qmail will try sending it to the second host (10.1.1.2)
>
>No.

Could be useful ... wouldn't it be easy, though, since MXs
already work like that ? In the code that looks for MXs, you'd
just have to consider smtproutes if there exists one for the
destination, with a value related to its position in the file.

Disclaimer: haven't looked at the code.

-- 
#include <std_disclaim.h>                          Lorens Kockum




hello,

i have set up a .qmail-list to redirect some messages, i would like the
recipients to be able de make a reply directed onto this generic address and
not the original sender...

for this  i would like to change or set the REPLY-TO field of the incoming
messages. I looked into the FAQ, and the man of qmail-inject but didn't found
this problem adressed... i tryed to parse the thing through deliver, but the
messages goes out inchanged, thus the return from deliver to qmail doesn't seem
to work....

so is there a way to manipulate the header in user-land through a .qmail-list? 

please i really need to get this fixed....


ciao
bboett
==============================================================
acount at earthling net 
http://erm6.u-strasbg.fr/~bboett
===============================================================
Unsolicited commercial email is NOT welcome at this email address
To contact me replace acount by bboett in above addresses






Jari Tenhunen <[EMAIL PROTECTED]> wrote:
> 
>Has anyone succesfully configured selective relay with tcp_wrappers ??

Yes, but it's not supported. One problem is that tcp_wrappers has to
be built with a certain non-default option for it to work.

>Or do I have to install tcpserver ??

That *will* work.

-Dave




there are some messages waiting in the queue for a long time.
how can I delete them ?

TIA
Claudiu





+ "Claudiu Balciza" <[EMAIL PROTECTED]>:

| there are some messages waiting in the queue for a long time.
| how can I delete them ?

You can bounce them immediately by a sort of backwards FAQ 7.3: Just
make the message older than one week (GNU touch is handy for this).
If you want to delete them without bouncing, you must stop qmail (wait
for qmail-send to exit) and delete all the relevant files from the
queue before restartning qmail.

- Harald




On Tue, 11 May 1999, Claudiu Balciza wrote:
> there are some messages waiting in the queue for a long time.
> how can I delete them ?
you may use qmHandle avaliable on http://www.qmail.org


Bye.Olli.







| "there are some messages waiting in the queue for a long time.
| how can I delete them ?"

| You can bounce them immediately by a sort of backwards FAQ 7.3: Just
| make the message older than one week (GNU touch is handy for this).

| - Harald

I tried this (eg touch -d 1-jan-1999 /var/qmail/queue/mess/15/26902) and
also restarted qmail (for luck) but the file is still there. I also checked
the log - sure enough, it had tried to send but failed:

May 12 08:34:14 1999 926494454.122750 delivery 17: deferral:
Sorry,_I_wasn't_abl
e_to_establish_an_SMTP_connection._(#4.4.1)/



What am I doing incorrectly?


__________________________________________________________________________
This message has been checked for all viruses by the Star Screening System
http://academy.star.co.uk/public/virustats.htm




On 11 May 1999 00:10:35 -0000, D. J. Bernstein wrote:

>Let's say a user clicks the ``unsubscribe'' button while he's looking at
>an old message from the SOS mailing list. What should the MUA do?
>
>RFC 2369 suggests that the MUA follow the List-Unsubscribe instructions
>in that message. But what happens when the instructions are out of date?

You are arguing against the MUA support as suggested in rfc2369, but
for the MLM support as suggested in rfc2369. I'm arguing for MLM
support.

>What the MUA should do is find the most recent subscription confirmation
>from the SOS list, and follow the instructions in _that_ message. This
>is why I proposed putting a List-ID field into every message; it lets
>the MUA reliably keep track of the latest information for each list.

List-ID is a good idea. I don't know if
http://www.within.com/~chandhok/ietf/listid.shtml is your exact
implementation, but that one seems reasonable and is progressing
towards an rfc. The MUA still needs info from the MLM on how to
implement "unsubscribe". It should come with posts, as the info may
change. The WELCOME message to the list alone is not sufficient for
this reason.

>The RFC 2369 List-Unsubscribe syntax might be tolerable for confirmation
>messages. But there's no excuse for MUAs to assume that List-Unsubscribe
>appears in _every_ message. The MUA support envisioned in RFC 2369 is
>not the right thing to do.

Then you need a system to notify the MUA that e.g. the list address or
syntax (maybe even MLM) has changed. Unnecessarily complex and not
perfect. Subscribe under a new address, then unsubscribe. The new
address is unsubscribed. Not what you intended. It's cheap for the MLM
to include the info with every message. Of course, a MUA designer is
free to implement a more complex scheme.

rfc2369 says that the info _should_ be in every message. IMHO, it
suffices to do it in distributions, as per ezmlm-0.53 DIR/headeradd.
General VERP support would allow the MUA to extract it from the
envelope sender. However, qmail could provide a mechanism to make such
info available within the boundaries of rfc2369 (e.g.
ftp://ftp.id.wustl.edu/pub/patches/qmail-verh-0.02.tar.gz). With this,
we no longer have people that need help to unsubscribe (even without
rfc2369 supporting MUA). I doubt subscribers use info from old
messages, since it's the new ones that remind them that they want to
unsubscribe. The only questions we get are how to "see headers" and we
answer only that one. rfc2369-support in the MUA would eliminate also
this problem.


-Sincerely, Fred

(Frederik Lindberg, Infectious Diseases, WashU, St. Louis, MO, USA)






> From:  "Fred Lindberg" <[EMAIL PROTECTED]>
> Date:  Tue, 11 May 1999 09:44:48 -0500
>
> On 11 May 1999 00:10:35 -0000, D. J. Bernstein wrote:
> 
> >Let's say a user clicks the ``unsubscribe'' button while he's looking at
> >an old message from the SOS mailing list. What should the MUA do?
> >
> >RFC 2369 suggests that the MUA follow the List-Unsubscribe instructions
> >in that message. But what happens when the instructions are out of date?
> 
> You are arguing against the MUA support as suggested in rfc2369, but
> for the MLM support as suggested in rfc2369. I'm arguing for MLM
> support.

I added RFC2369 support to exmh in about 40 lines of code (plus another 32 
lines of comments to include the relevant portion of the RFC).  This was the 
simple support that Dan argues against.

On my todo list is to have a database of mailing lists which would include the 
most recent info about each list in it.  However, doing that requires a bunch 
of other stuff that isn't there yet and I could never do it in 40 lines.

I like RFC2369 because a minimal useful level of support is *easy*.  Good MUAs 
will support more, but that's no reason to argue against the minimal level.

As more MUAs support the easy level more lists will support the headers.  As 
more lists support the headers, more MUAs will support more sophisticated 
handling.  Right now a total of 3 lists that I get have RFC2369 headers and 
two of those are low-volume.  If this doesn't increase, it won't matter what 
the MUA support is like.

Chris

-- 
Chris Garrigues                 virCIO
+1 512 432 4046                 4314 Avenue C                    O-
http://www.DeepEddy.Com/~cwg/   Austin, TX  78751-3709
                                +1 512 374 0500

  My email address is an experiment in SPAM elimination.  For an
  explanation of what we're doing, see http://www.DeepEddy.Com/tms.html 

    Nobody ever got fired for buying Microsoft,
      but they could get fired for relying on Microsoft.


PGP signature





On 11 May 1999, D. J. Bernstein wrote:

> What the MUA should do is find the most recent subscription confirmation
> from the SOS list, and follow the instructions in _that_ message. This
> is why I proposed putting a List-ID field into every message; it lets
> the MUA reliably keep track of the latest information for each list.

I can't resist the temptation...

What happens when List-ID is out of date? (Even if changing the id is
strongly discouraged, nothing in the world can prevent it. According to
Murphy's laws, this means some change WILL happen.) What happens if the
instructions in the most recent message the user has received (!= the most
recent message sent) are out of date? :)

--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"NSA GCHQ KGB CIA nuclear conspiration war weapon spy agent... Hi Echelon!"





pine.conf is now under /etc.  But it seems that one does not have to
specify 

sendmail-path=/usr/sbin/sendmail  -oem -oi -t

anymore.  This is version 4.10 of pine.  

Mate
---
Mate Wierdl | Dept. of Math. Sciences | University of Memphis  






Hello,

I could be entirely wrong, but do the limitations of pop3 make
virtualhosting mail somewhat impossible?

The difficulty seems to come from the lack of a suitable identifier
from which to discern the corresponding domain name in the
conversation between pop3 client and server.

One solution suggested pop3 usernames of `[EMAIL PROTECTED]',
but there doesnt seem to be a standard way of having a number of
muas do this correctly. Netscape for instance, in a misguided
attempt to be helpful, strips off @.* from your pop3 username.

I'm really scratching my head on this one.

Cheers,
Jonathan

--
Jonathan W. Herbert
Senior Systems Engineer
--------------------------------------------
Tortus Tek, Inc.
1789 Northampton Street  Phone:(413)535-5080
Holyoke, Ma.  01040      URL: tortus-tek.com
--------------------------------------------
Tortus Tek: A-head of Art, A-head of Science







Try the addresses in the following order:

name@domain
name%domain
name_domain

For any given MUA, one of them should work.  (I believe that Netscape
required the "%" syntax.)

The documentation included with vchkpw also talks about this issue.

On Tue, 11 May 1999, Jonathan W Herbert wrote:

> Hello,
> 
> I could be entirely wrong, but do the limitations of pop3 make
> virtualhosting mail somewhat impossible?
> 
> The difficulty seems to come from the lack of a suitable identifier
> from which to discern the corresponding domain name in the
> conversation between pop3 client and server.
> 
> One solution suggested pop3 usernames of `[EMAIL PROTECTED]',
> but there doesnt seem to be a standard way of having a number of
> muas do this correctly. Netscape for instance, in a misguided
> attempt to be helpful, strips off @.* from your pop3 username.
> 
> I'm really scratching my head on this one.
> 
> Cheers,
> Jonathan
> 
> --
> Jonathan W. Herbert
> Senior Systems Engineer
> --------------------------------------------
> Tortus Tek, Inc.
> 1789 Northampton Street  Phone:(413)535-5080
> Holyoke, Ma.  01040      URL: tortus-tek.com
> --------------------------------------------
> Tortus Tek: A-head of Art, A-head of Science
> 
> 
> 
> 

---------------------------------
Timothy L. Mayo                         mailto:[EMAIL PROTECTED]
Senior Systems Administrator
localconnect(sm)
http://www.localconnect.net/

The National Business Network Inc.      http://www.nb.net/
One Monroeville Center, Suite 850
Monroeville, PA  15146
(412) 810-8888 Phone
(412) 810-8886 Fax





On Tue, May 11, 1999 at 09:06:38AM -0700, Jonathan W Herbert wrote:
> Hello,
> 
> I could be entirely wrong, but do the limitations of pop3 make
> virtualhosting mail somewhat impossible?
> 
> The difficulty seems to come from the lack of a suitable identifier
> from which to discern the corresponding domain name in the
> conversation between pop3 client and server.
> 
> One solution suggested pop3 usernames of `[EMAIL PROTECTED]',
> but there doesnt seem to be a standard way of having a number of
> muas do this correctly. Netscape for instance, in a misguided
> attempt to be helpful, strips off @.* from your pop3 username.
> 
> I'm really scratching my head on this one.

You can use literally any user names you like, and they don't have to have
anything at all to do with the e-mail addresses they're associated with. I use
domain-user for most virtual users, but you can come up with any scheme you
like, or assign user names at random, or anything else, as long as you have
some way of associating the user name with the correct mailbox. With
qmail-pop3d, this would be done with a custom version of checkpassword, links
to a number of implementations of which you'll find at www.qmail.org.

Chris




On Tue, 11 May 1999, Jonathan W Herbert wrote:

> I could be entirely wrong, but do the limitations of pop3 make
> virtualhosting mail somewhat impossible?
> 
> The difficulty seems to come from the lack of a suitable identifier
> from which to discern the corresponding domain name in the
> conversation between pop3 client and server.
> 
> One solution suggested pop3 usernames of `[EMAIL PROTECTED]',
> but there doesnt seem to be a standard way of having a number of
> muas do this correctly. Netscape for instance, in a misguided
> attempt to be helpful, strips off @.* from your pop3 username.
> 

The easiest way for me was to do ip-based virtual pop3 servers.  With
tcpserver the TCPLOCALIP environment gives you the local ip address they
are connecting to, you can use this information to determine which
password database to look up the info in.  In my case, I use the ip
address to determine the Base DN to search on in my LDAP Directory.  

James





On Tue, 11 May 1999, Jonathan W Herbert wrote:

> I could be entirely wrong, but do the limitations of pop3 make
> virtualhosting mail somewhat impossible?
> 
> The difficulty seems to come from the lack of a suitable identifier
> from which to discern the corresponding domain name in the
> conversation between pop3 client and server.
> 
> One solution suggested pop3 usernames of `[EMAIL PROTECTED]',
> but there doesnt seem to be a standard way of having a number of
> muas do this correctly. Netscape for instance, in a misguided
> attempt to be helpful, strips off @.* from your pop3 username.
> 

The easiest way for me was to do ip-based virtual pop3 servers.  With
tcpserver the TCPLOCALIP environment gives you the local ip address they
are connecting to, you can use this information to determine which
password database to look up the info in.  In my case, I use the ip
address to determine the Base DN to search on in my LDAP Directory.  

James






System: SUSE Linux, qmail 1.03

Is it possible to set up qmail in such a fashion that it routes messages, eg. to my 
address [EMAIL PROTECTED] not to our normal mail server inside the LAN but directly to 
another host? This would have to be definable on a per-user basis.
Currently all mail for techem.de is routed to a single host whose address is stated in 
the /var/qmail/control/smtproutes file.

Strangely enough qmail already routes a message addressed to 
[EMAIL PROTECTED] to the host named mail-gwia...

Thanks
Ralf








I have a very strange bug using qmail...

Here is a very breif description of my configuration.

In my lan, I use 3 qmail servers running under Linux. It works great ;-) !
Whenever an e-mail is not internal to my company, the email is processed on
a separate mail server that is located in a DMZ. This mailer redirect the
mail to the proper SMTP relay.

On the other way around, all the incoming mails are processed on this
server and redirected trhough the firewall to the relevant site.

All this works great in 95% of the case. The bug occurs when a SMTP client
running une windows tries to communicate with my mail server. It generates
hundreds of 500 Command Unrecognized

So, at the end of the day, I can't receive any mail from servers running
under windows.

As it works fine when a unix client talk through the firewall, I dod'nt
know how to handle the problem.

If you want to see the bug, you can try a telnet 212.180.16.58 on port 25
from a windows machine and try the same thing from a unix machine. You will
see what I mean.


Any Idea ???

============================================================

We aim at delivering high specification products at very
competitive prices.

For all your filters, resonators, oscillators and rubidium 
clocks, think TEMEX Time & Frequency.

/-----------------------+------------------------------\
|                       |  TEMEX Time & Frequency      |
| TTTTTT TTTTTT  FFFFFF |  C.Q.E.                      |
|   TT     TT    FF     |  2, rue Robert Keller        |
|   TT     TT    FFFF   |  10150 Pont-Sainte-Marie     |
|   TT     TT    FF     |  France                      |
|   TT     TT    FF     |  tel : +33 (0)3 25 76 45 00  |
|                       |  fax : +33 (0)3 25 80 34 57  |
\-----------------------+------------------------------/

For more details, please :
   mailto:[EMAIL PROTECTED]
      Or visit our web site http://www.tekelec-temex.com





On Tue, May 11, 1999 at 06:25:49PM +0200, DUGRES Hugues, I.T. manager at C.Q.E. wrote:
> I have a very strange bug using qmail...
> 
> Here is a very breif description of my configuration.
> 
> In my lan, I use 3 qmail servers running under Linux. It works great ;-) !
> Whenever an e-mail is not internal to my company, the email is processed on
> a separate mail server that is located in a DMZ. This mailer redirect the
> mail to the proper SMTP relay.
> 
> On the other way around, all the incoming mails are processed on this
> server and redirected trhough the firewall to the relevant site.
> 
> All this works great in 95% of the case. The bug occurs when a SMTP client
> running une windows tries to communicate with my mail server. It generates
> hundreds of 500 Command Unrecognized
> 
> So, at the end of the day, I can't receive any mail from servers running
> under windows.
> 
> As it works fine when a unix client talk through the firewall, I dod'nt
> know how to handle the problem.
> 
> If you want to see the bug, you can try a telnet 212.180.16.58 on port 25
> from a windows machine and try the same thing from a unix machine. You will
> see what I mean.

I didn't have any problem telnetting to port 25 from a Windows machine and
entering commands. I also configured a Windows MUA to use your machine as an
SMTP server and that worked as well. (By the way, you're running an open relay
on that machine. You want to fix that.) 

So if there's a problem, it's not with Windows itself, but more likely with a
particular Windows MUA or MTA. Do you know what kind of software is having this
problem with you?

Chris




I have been struggling with setting up Qmail to work on my Linux box.  I can
send email from the machine, and at one point could send email to a valid
email address on that machine, although that is not working now, but that's
as far as I can get.

I've been through lots of docs, and I'm not sure where the break is, so I'm
hoping someone can help me trouble shoot.

Here's the specs:
Linux 5.2 on i386
Qmail (current version)
I.P. 204.144.178.140

I get this error when I try to send mail via a pop client on another
machine:
Your server has unexpectedly terminated the connection.  Possible causes for
this include server problems, network problems, or a long period of
inactivity.

If I "telnet localhost 110" I get:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

If I run /var/mail/bin/qmail-pop3d I get:
-ERR this user has no $HOME/Maildir

If I run /var/mail/bin/instcheck I get:
instcheck: warning: /var/qmail/users has wrong permissions
(I changed this to 777 to be safe, and don't know what the correct
permissions are.)

Typing "ps" gives me:
  PID TTY STAT TIME COMMAND
  457   2 S    0:00 /sbin/mingetty tty2
  458   3 S    0:00 /sbin/mingetty tty3
  459   4 S    0:00 /sbin/mingetty tty4
  460   5 S    0:00 /sbin/mingetty tty5
  461   6 S    0:00 /sbin/mingetty tty6
 1001   1 S    0:00 -bash
10296  p1 S    0:00 bash
10850  p2 S    0:00 su
10854  p2 S    0:00 bash
11771  p2 S    0:00 su
11773  p2 S    0:00 bash
11885  p2 S    0:00 su
11889  p2 S    0:00 bash
12817  p2 T    0:00 vi inetd.cong
12836  p2 T    0:00 vi inetd.conf
26571  p2 R    0:00 ps

Relevant lines from /etc/inetd.conf:
smtp stream  tcp  nowait  qmaild   /var/qmail/bin/tcp-env  tcp-env
/var/qmail/bin/qmail-smtp

pop-3   stream  tcp     nowait  root /var/qmail/bin qmail-popup
/var/qmail/bin checkpasswd /var/qmail/bin qmail-pop3d

I installed the check checkpasswd package, and wrote the Perl script below
to try to allow account creating via cgi.  (Don't bother warning me about
taint checking, I'll put that in when I find out where the big problems
are.)

If there are other checks/test I can run please let me know.

I am really stuck here, any help would be much appreciated.

Thanks in advance,

Peter Janett

#!/usr/bin/perl -U
#
# Peter's user setup script
# This adds a Qmail POP3 user via http
# It uses qmail patches available at
# http://www.tibus.net/pgregg/projects/

# password files
$assign = "/var/qmail/users/assign";
$assign_BU = "/var/qmail/users/assign_BU";
$poppasswd = "/var/qmail/users/poppasswd";
$poppasswd_BU = "/var/qmail/users/poppasswd_BU";

#Use cgi-lib.pl to parse data
require "/home/httpd/cgi-bin/library/cgi-lib.pl";

&ReadParse(*FORM);
print "Content-type: text/html\n\n";
print<<"EEE";
<HTML>
 <BODY>
EEE

# Backup assign file
# Open file, read into @bu
# to create a backup

open(DATAFILE, "$assign") || print "I can't Open file, read into bu $!\n";
flock DATAFILE, 2;
@bu=<DATAFILE>;
close(DATAFILE);
flock DATAFILE, 8;

# write data to backup file
open(BU, ">$assign_BU") || print "I can't write to backup file $!\n";
flock BU, 2;
 foreach $line (@bu) {
  chomp $line;
  unless ($line eq "."){print BU "$line\n";}
 }

close(BU);
flock BU, 8;

# check for username and ID dups,
open(DATAFILE, "$assign") || print "I can't check for username and ID dups
$!\n";
flock DATAFILE, 2;
 while(<DATAFILE>) {
    ($username, $popidusername, $popid, $popgrpid,
 $homedir, @junk) = split (/:/, $_);

$cleanedusername = $username;
$cleanedusername =~ s/=domain\-com\-//g;

# Found exising username
if ($cleanedusername eq $FORM{'username'}){
  print "<H1>USERNAME $FORM{'username'} already taken\!\!</H1>";
  print<<"EEE";
 </BODY>
</HTML>
EEE
exit;
 }
} # End while <DATAFILE>
close(DATAFILE);
flock DATAFILE, 8;

# write new data to assign file
open(ASSIGN, ">$assign") || print "I can't write write new data to assign
file $!\n";
flock ASSIGN, 2;

 foreach $line (@bu) {
  chomp $line;
   unless ($line eq "."){print ASSIGN "$line\n";}
 }

print ASSIGN
"=domain-com-$FORM{'username'}:popuser:888:231:/var/qmail/popboxes/domain-co
m/$FORM{'username'}:::\n.";
close(ASSIGN);
flock ASSIGN, 8;

# encrypt password
$pw = &GetPword;

###############################################################
# Backup passwd file
# Open file, read into @bu
# to create a backup
###############################################################

open(DATAFILE, "$poppasswd") || print "I can't Open poppasswd file, to read
into bu $!<P>\n";
flock DATAFILE, 2;
@bu=<DATAFILE>;
close(DATAFILE);
flock DATAFILE, 8;

# write data to backup file
open(BU, ">$poppasswd_BU") || print "I can't write to $poppasswd_BU backup
file $!<P>\n";
flock BU, 2;
 foreach $line (@bu) {
  chomp $line;
  print BU "$line\n";
 }
close(BU);
flock BU, 8;

# write new data to assign file
open(ASSIGN, ">>$poppasswd") || print "I can't write write new data to
$poppassword file $!<P>\n";
flock ASSIGN, 2;
print ASSIGN
"$FORM{'username'}:$pw:popuser:/var/qmail/popboxes/domain-com/$FORM{'usernam
e'}\n";
close(ASSIGN);
flock ASSIGN, 8;
###############################################################

###############################################################
# Create user directories with .qmail files inside
###############################################################

system("mkdir /var/qmail/popboxes/domain-com/$FORM{'username'};chown popuser
/var/qmail/popboxes/domain-com/$FORM{'username'};
chgrp -R popusers /var/qmail/popboxes/domain-com/$FORM{'username'};chmod 700
/var/qmail/popboxes/domain-com/$FORM{'username'}");

###############################################################
#          Now create a .qmail file for delivery
###############################################################

$dot_qmail = "/var/qmail/popboxes/domain-com/$FORM{'username'}/.qmail";

print "<H1>$dot_qmail</H1>";

open(QMAIL, ">$dot_qmail") || print "I can't write write the .qmail file
$!<P>\n";
flock QMAIL, 2;
print QMAIL
'./Mailbox';
close(QMAIL);
flock QMAIL, 8;

system("chown popuser
/var/qmail/popboxes/domain-com/$FORM{'username'}/.qmail;
chgrp -R popusers /var/qmail/popboxes/domain-com/$FORM{'username'}/.qmail");

# update the cab file
system('/var/qmail/bin/qmail-newu');

###############################################################
print<<"EEE";
<H2>User: $FORM{'username'} added</H2>
=domain-com-$FORM{'username'}:popuser:888:231:/var/qmail/popboxes/domain-com
/$FORM{'username'}:::
 </BODY>
</HTML>
EEE

################ subroutines ###############################

# Subroutine to prompt for and return (encrypted) password.
sub GetPword {

    my ( $pwd1, $pwd2, $salt, $crypted );
    my @saltchars = (a .. z, A .. Z, 0 .. 9);

    $pwd1 = $FORM{'username'};

    # Generate a random salt value for encryption:
    srand(time || $$);
    $salt = $saltchars[rand($#saltchars)] . $saltchars[rand($#saltchars)];
    return crypt($pwd1, $salt);
}








On Tue, May 11, 1999 at 02:30:25PM -0600, New Hope Hostmaster wrote:
> pop-3   stream  tcp     nowait  root /var/qmail/bin qmail-popup
                                                     ^
> /var/qmail/bin checkpasswd /var/qmail/bin qmail-pop3d
                ^                          ^

You need slashes in there, not spaces. But if you fixed that, it still wouldn't
work anyway. See FAQ 5.3 for the correct invocation of qmail-popup and
qmail-pop3d.

Chris




        hi. at www.qmail.org(/top.html), there is a mention of a patch to
qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
where i can pick this patch up? any help would be greatly appreciated! :)

thanks in advance,
-dan

`--- dan peterson [ [EMAIL PROTECTED] ] http://erinyes.net
 `-- network engineer, digitaldune networks -- yuma, az
  `- (520) 344-1110 -- http://www.digitaldune.net




On Tue, 11 May 1999, Dan Peterson wrote:

>       hi. at www.qmail.org(/top.html), there is a mention of a patch to
> qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
> broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
> where i can pick this patch up? any help would be greatly appreciated! :)

I do have a logger patch but it's broken.  AFAIK it's a waste of time to
talk about logging qmail-pop* until we cannot do logging with tcpserver. 
The problem is:

        supervise tcpserver qmail-popup 2>&1 | {some logger}

This tcpserver opens stderr to print its log messages and opens a pipe to
stdin-stdout for qmail-popup's connection.  In fact there isn't a way to do
logging right now.
-- 
Regards: Kevin (Balazs)






Hello,

I just set up qmail, and I'm wondering how to get fetchmail to run w/ it.
I'm using fetchmail to get messages from a remote server via pop3.
Unfortunately, since my rcpthosts file is set to only accept connections
from my local machine, fetchmail complains that it can't send the messages
to my local address. Is there anyway to receive pop mail w/o having to
allow other servers to send from my local server?

Also, I'm wanting to set up qmail so that it's rather unfriendly to people
who telnet straight into it. I want to completely turn off help so that it
doesn't display any version info etc., as well as turning off echo so they
can't see what they're typing. How do I go about this?

Thanks in advance,
Jason





I'm seeing a strange interaction between netscape, tcpserver and
identd lookups.

I finally got around to running qmail-smtpd from tcpserver on Monday
night.

Details:

    Operating system    = Solaris 2.5.1
    Qmail version       = 1.03 (no patches)
    daemontools         = 0.53 (no patches)
    uscpi-tcp           = 0.84 (no patches)


Relevant portions of startup script:

    USER=qmaild
    GROUP=nofiles
    CLIMIT=40
    TCPRULES=/var/qmail/etc/run/smtpd/rules
    PORT=smtp
    QMAILBIN=/var/qmail/bin
    LOG=/var/log/smtpd
    SVCDIR=/var/qmail/etc/run/smtpd

    # Logging, no identd lookups, tcprules
    CMD="tcpserver -u $USER -g $GROUP -c $CLIMIT -v -R -x ${TCPRULES}.cdb \
        0 $PORT $QMAILBIN/qmail-smtpd 2>&1 \
        | accustamp \
        | cyclog -s 1000000 $LOG"

    # The eval is required to ensure any redirection is handled
    # correctly. If not then bizarre results can be expected.

    eval "env - PATH=$PATH supervise -r $SVCDIR $CMD &"

Contents of /var/qmail/etc/run/rules:

    #
    # Tcprules file for incoming SMTP connections
    #

    # Allow the localhost to relay
    127.:allow,RELAYCLIENT=""

    # Allow tansu machines to relay
    149.135.:allow,RELAYCLIENT=""

    # Allow all other machines to connect, but do not allow relaying
    :allow

cdb file confirms this:

    cdbdump < /var/qmail/etc/run/smtpd/rules.cdb | cat -vet
        +4,14:127.->+RELAYCLIENT=^@$
        +8,14:149.135.->+RELAYCLIENT=^@$
        +0,0:->$

On Tuesday morning, my users began to complain that after sending mail
via netscape 4.05 (Sparc Solaris version), their netscape would crash.
The mail is successfully received by qmail-smtpd, queued and
delivered.

This wasn't a problem when I was running  qmail-smtpd from inetd:

Old inetd.conf entry:

    /var/qmail/bitream tcp nowait qmaild /pkgs/bin/tcpd
        /var/qmail/bin/tcp-env /var/qmail/bin/qmail-smtpd

Old /etc/hosts.allow entry:

    tcp-env: ALL : ALLOW

The only difference I can see is that tcp-env performs identd lookups
whereas I'm telling tcpserver NOT to perform these lookups.

Sure enough, when I remove the -R argument to tcpserver, netscape is
happy. This does not happen with netscape 4.5 (Sparc Solaris version).

I can't even understand WHY netscape is unhappy because it isn't even
seeing the identd request.

Any ideas?

My work around is to enable identd and then ensure all relevant users
are running Netscape 4.5 instead of 4.05. Once everyone is on 4.5 (or
above) I'll disable identd lookups.

Regards
Peter
----------
Peter Samuel                                [EMAIL PROTECTED]
Technical Consultant                        or at present:
eServ. Pty Ltd                              [EMAIL PROTECTED]
Phone: +61 2 9206 3410                      Fax: +61 2 9281 1301

"If you kill all your unhappy customers, you'll only have happy ones left"





hello,
we started running a qmailer in a DMZ on a dedicated host to only forward Mail coming from the Internet to a Postoffice, set in the sheltered LAN on another host. (This PO uses a separate Domain). Whenever we mail from the outside, the mail is correctly forwarded to qmail via MX-Record, but qmail doesn't forward to the sheltered PO. What do we have to configure in the config-files e.g. smtproutes, locals, rcpthosts, to let the qmail run as a simple mail-hub, without making user-accounts and with a direct forwarding - command to the PO ?
 
thanks for a reply,
greetings,
Walter




On Wed, 12 May 1999, Walter Danielsen wrote:

> hello,
> we started running a qmailer in a DMZ on a dedicated host to only 
> forward Mail coming from the Internet to a Postoffice, set in the
> sheltered LAN on another host. (This PO uses a separate Domain).
> Whenever we mail from the outside, the mail is correctly forwarded to
> qmail via MX-Record, but qmail doesn't forward to the sheltered PO.
> What do we have to configure in the config-files e.g. smtproutes,
> locals, rcpthosts, to let the qmail run as a simple mail-hub, without
> making user-accounts and with a direct forwarding - command to the PO?
>  

1. Put all domains that you want to collect into rcpthosts

2. Put the following into smtproutes:

:<ip-of-sheltered-PO-as-seen-by-the-qmail-host>

e.g.

:172.100.0.4


/magnus

-- 
"MOST USELESS site of the year 1998" --> http://x42.com/urlcalc/





Hiyas,

My second edition of MAIL FROM: checking is accessible3 from now from
http://lsc.kva.hu/dl/qmail-1.03-mfcheck.2.patch

BTW I think this can be very useful in the main qmail src too.

About qmail-antispam4.patch: a patch must contain exactly one extension. In
this patch some extensions are unneccessary or badly designed.  Flames to
me, please.
-- 
Regards: Kevin (Balazs)




Reply via email to