Re: Auth problems

2001-06-29 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 I was running qmail-pop3d from inetd on FreeBSD 4.3 with no problems 
 getting my mail.  I took a suggestion and moved to running it under 
 tcpserver.  Now using the same username and password I get a -ERR 
 authorization failed.
 
 qmail-pop3d start script:
 
 #!/bin/sh
 exec /usr/local/bin/softlimit -m 200 \
  /usr/local/bin/tcpserver -v -l 0 0 110 /var/qmail/bin/qmail-popup \
  mail.oims.net /bin/checkpoppasswd relay-ctrl-allow 
 /var/qmail/bin/qmail-pop3d Maildir 21
 
 the program /bin/checkpoppasswd worked just fine under inetd.
 
 Now, even when I try /var/qmail/bin/qmail-popup mail.oims.net 
 /bin/checkpoppasswd and enter USER myusername and PASS mypassword
 
 I get the same error.  the checkpoppasswd came form Paul Gregg's projects 
 (http://www.pgregg.com/projects/)
 
 Any suggestions?

Turn on auth.warning in syslog.conf, then check your syslog messages
to see where it is failing.

My guess tho is that relay-ctrl-allow is not in the cleaned out $PATH
of the tcpserver/checkpoppasswd environment and so the execvp() is failing.
Solution: specify the full path to relay-ctrl-allow

Paul.
-- 
Signature files available here:
Personal:  http://www.pgregg.com/sigs/personal_sig.txt
Technical: http://www.pgregg.com/sigs/technical_sig.txt
Corporate: http://www.pgregg.com/sigs/corporate_sig.txt




Re: stopping Possible_duplicate!

2001-06-29 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 Hi,
 
 I'm running some mailing lists using qmail+ezmlm-idx.  Sometimes, I
 get something like this in the logs:
 
 Jun 28 08:22:56 bl qmail: 993730976.165287 delivery 859660: deferral: 
Connected_to_64.94.200.235_but_connection_died._Possible_duplicate!_(#4.4.2)/
 
 I understand that this is the result of the remote mail server failing
 to give a final confirmation that the message was received successfully,
 so qmail re-queues the message for future delivery.
 
 Is there any way to make qmail less conscientious about re-delivery?
 That is, where qmail normally reports the ...Possible_duplicate! error,
 I'd like it to assume that it has been delivered and cease future
 attempts.
 
 In most cases, the message has in fact been delivered, and since this
 is mailing list email, it's (arguably) less critical (there are archives).

My advice is to ignore it.  Better to have qmail work reliably than not.
It will be causing the recipient much more pain than you - so let them
fix their end.  If you really want to stop them, write a logfile processor
looking for them (its not difficult), send em a warning email and
unsubscribe them from the list.

Paul.




Re: mailquotacheck program exit code meaning?

2001-06-06 Thread Paul Gregg

In article 9fjudv$dss$[EMAIL PROTECTED] you wrote:
 Hello all:
   I has read mailquotacheck.sh .but I can't understand some exit code ,example ,exit 
111,exit 100,Would you can explain ? where can found these code define ?
 and I want to specify some return to sender message how to do? 
 
 Thank you.


man qmail-command
 
EXIT CODES
   command's exit codes are interpreted as follows:  0  means
   that the delivery was successful; 99 means that the deliv-
   ery was successful, but that qmail-local should ignore all
   further delivery instructions; 100 means that the delivery
   failed permanently (hard error); 111 means that the deliv-
   ery  failed  but  should  be tried again in a little while
   (soft error).
 
Paul.

-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: Commercial Support

2001-05-24 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 Hi List,
 
 I would like to get some commercial support for Qmail from somebody based 
 in Ireland or England.
 
 Can anybody recommend anybody? I would prefer to contract somebody who
 has been recommended, rather than somebody listed on the Qmail home page:
 http://www.ie.qmail.org/top.html#paidsup
 
 Thanks,
 
 Ross

We may be able to help.  I'm sure others here would recommend me
(or maybe not!).  Based in N.Ireland.

Paul.

PS. Please ensure offlist replies are marked OffList as replies directly
will appear in my mailinglist newsgroup with the rest of the list.
-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: pulling mail from other than new/cur (sorry again...better reply address)

2001-05-22 Thread Paul Gregg

Dave Sill [EMAIL PROTECTED] wrote:
Sure you can - rather stupid buying the cake in the first place if you
can't eat it ;-)
 
 No you can't. If you eat it, you no longer have it. Of course, you
 could eat half of it and still have half of it. :-)

Yes you do still have it.  Might not be quite as accessable after eating it
and I'm not sure you'd want to get it back.  But you still have it for 
the next 24-48 hours and possibly longer if you like Mr. Hankey.
:-)

Paul.
-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: pulling mail from other than new/cur

2001-05-18 Thread Paul Gregg

In article 000101c0df38$7ccac500$[EMAIL PROTECTED] you wrote:
 Greetings,
We've got a POP3 setup working just fine, but there is a desire to
 add IMAP servers so that web mail might be added also.  The problem
 I see is that users will be making misc new subdir's in their Maildir
 on the same level as new and cur, such as stuff_from_joe, spam, whatever.
 
 So I've been asked to munge up qmail-pop3d so it can pull mail from
 all these potential directories, not just new and cur, just in case that
 user
 decides to use our POP3 server at a later date to check mail.
 
 Think this would be a major undertaking?
 
 Snooping around qmail-pop3d.c I see a call to maildir_scan which seems
 to look in new and cur for mail during its getlist process.  Perhaps I could
 have that code first do a lookup for other directories besides new and cur
 (and tmp) and loop through that list of directories looking for mail to give
 to getlist.
 
 Am I just making a mess of things here?  Is there an easier way to do this?
 
 Thanks for any thoughts, good or bad.

The difficulty is to not cause problems for the user, e.g. say they use IMAP
normally then use POP3 once (for some reason) - you don't want all their
carefully stored mails in each IMAP folder getting deleted (do you?).

Thus, the simplest way to fix this is to:

Write a program, perl / shell / whatever which will be run after the
checkpoppassword, but before qmail-pop3d which uses the env variables supplied
by checkpoppasswd. 
The program will ensure its UID is the same as $USER's and change to $HOME.
It will read in all files/dirs in $HOME, then loop through each, skipping
new, cur and tmp.  For every other folder, read in the list of files
then for each file symlink it to new.

That way, when the user POP3's they get access to all their mails in all
IMAP folders, but when pop3d deletes the mails, it is deleting the symlinks,
not the real emails.

Very crudely something like this will work:

#!/usr/bin/perl

$HOME = $ENV{'HOME'};
$USER = $ENV{'USER'};
$MAILDIR = $HOME/Maildir;

chdir($MAILDIR);
$dirs = `ls`;
@dirs = split(/\n/, $dirs);
foreach $dir (@dirs) {
  chomp($dir);
  if (-d $MAILDIR/$dir) {
next if ($dir =~ /^(new|cur|tmp)$/ );   #Skip new/cur/tmp dirs
$files = `ls $dir`;
@files = split(/\n/, $files);
foreach $file (@files) {
  chomp($file);
  symlink($MAILDIR/$dir/$file, $MAILDIR/new/$file);
}
  }
}

exec(/var/qmail/bin/qmail-pop3d);
exit(0); #redundant


I have not tested this - simply typed into this mail - and I've been
lazy with the system `ls` calls - you really should use opendir/readdir
to do this properly.

Paul.
-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: pulling mail from other than new/cur (sorry again...better reply address)

2001-05-18 Thread Paul Gregg

In article 001b01c0df3b$ff09c9f0$6464a8c0@ALCATRAZ you wrote:
 my 0.02
 you cant have your cake and eat it too...
 /my 0.02

Sure you can - rather stupid buying the cake in the first place if you
can't eat it ;-)

Yes it opens a can of worms, just plan it properly and make sure none
can escape.

Paul.
-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: quota setting

2001-05-17 Thread Paul Gregg

Or [he said following the top posting]...

mailquotacheck:  http://www.pgregg.com/projects/qmail/mailquotacheck/

Paul.

/me wonders why searching for quota on www.qmail.org is so tough...

In article [EMAIL PROTECTED] you wrote:
 Use vdelivermail (part of vpopmail at http://www.inter7.com/qmail) or
 maildrop (http://courier.sourceforge.net)
 
 I am assuming that you are running under single UID, of course.
 
 Tim
 
 On Tue, May 15, 2001 at 10:07:45AM -, Jati wrote:
 
 Could you help me how to :
  -set quota for each user
  -block receiving mail if : used space + size of incoming mail = 5MB
 
 Until this time i've used this rules :
 
 |if [ `du |tail -1|awk '{print $1}'` -ge `cat ../../mailquota-limit` ] ; then 
/var/qmail/bin/bouncesaying User quota exceeded ; fi
 
 
 Best Regards
 
 Klateno
 

-- 
| Paul Gregg|T: +44 (0) 28 90424190
| Technical Director|F: +44 (0) 28 90424709
| The Internet Business Ltd |W: http://www.tibus.com
| Holywood House, Innis Court   |E: [EMAIL PROTECTED]
| Holywood, Co Down, BT18 9HF   |P: [EMAIL PROTECTED]




Re: $EXT value clarification, virtual domain question

2001-05-07 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 Doh, that was a complete misunderstanding of what you were saying on my
 part. Sorry!
 
 Allright, so let's say I want to pass the local part of the address to the
 .qmail file from virtualdomains, i.e.:
 
 control/virtualdomains:
   mail.aaa.com:alias-mail.aaa.com-$LOCAL
 ~alias/.qmail-mail:aaa:com-default:
   # could use $DEFAULT which refers to the $LOCAL of virtualdomains.
 
 Would $LOCAL in virtualdomains be the variable to use?

You wouldn't use it in the virtualdomains file, but in the .qmail file.

I tend not to use ~alias, but users/assign - but it is the same anyway...

e.g. Say I receive mail for foobar.co.uk and want to map every username
to the equivalent foobar.com address for delivery, e.g. [EMAIL PROTECTED]
- [EMAIL PROTECTED], [EMAIL PROTECTED] - [EMAIL PROTECTED], etc

cd /var/qmail
echo foobar.co.uk:foobar-co-uk  control/virtualdomains
echo foobar.co.uk  control/rcpthosts

Put:
+foobar-co-uk:popuser:888:888:/var/qmail/popboxes/foobar-co-uk:::
into users/assign  (remember this file should have a . on the last line
and you have to run qmail-newu to create the cdb)

Then in /var/qmail/popboxes/foobar-co-uk, create .qmail-default with:

Each of these does the same thing:

| if U=`echo $LOCAL@foobar.com | sed 's/foobar-co-uk-//'`; then forward $U; fi
(this should all be on one line)
Here $LOCAL is foobar-co-uk-user1, so we need sed to get rid of the
virtual user.  If you use alias, you'll probably have to remove something
else.

Or 

| forward $EXT2@foobar.com

Or

| if U=`echo $EXT2@foobar.com`; then forward $U; fi

Hope this helps,

Paul Gregg.




Re: unable_to_chdir_to_maildir

2000-06-23 Thread Paul Gregg

Sounds like you really don't know what you are doing.
Qmail can be setup *many* different ways so there is no definative answer
to your problem - you must describe in detail how you got to this
point.  Then pick a problem email address and describe how that is setup,
what entries are in the control files, where you want mail delivered to,
etc - only then will anyone be in a position to help you.

Paul.

In message [EMAIL PROTECTED],
Vince [EMAIL PROTECTED] writes:
| 
| 
| 
| i have now this message
| 
| Jun 23 11:49:24 qmail qmail: 961732164.968370 delivery 8: success:
| 204.254.175.103_accepted_message./Remote_host_said:_250_XAA02111_Message_acc
| epted_for_delivery/
| Jun 23 11:49:24 qmail qmail: 961732164.969507 status: local 0/10 remote 0/20
| Jun 23 11:49:24 qmail qmail: 961732164.986256 end msg 95452
| 
| but still i cant find the mail in my home directory...
| 
| sorry for my ignorance but i really really need your help here...
| 
| my /var/qmail/rc file is 
| 
| # Bunch of comments here
| exec env - PATH="/var/qmail/bin:$PATH" \
| qmail-start './Maildir/' splogger qmail
| 
| then i made a maildirmake in the home directory 
| 
| what did ive done wrong here or do i missed something to configure here
| 
| in my my home directory i have 
| "vhernz and Maildir" directory with the permissions of 755 
| 
| 
| 
| At 05:35 PM 6/22/00 +0100, you wrote:
| In article [EMAIL PROTECTED]
| Thorkild Stray [EMAIL PROTECTED] wrote:
| | On Thu, 22 Jun 2000, Vince wrote:
| 
| | please help i got this error in my qmail system,
| | Jun 22 18:30:02 qmail qmail: 961669802.819169 starting delivery 15: msg
| | 95447 to local [EMAIL PROTECTED]
| | Jun 22 18:30:02 qmail qmail: 961669802.820265 status: local 1/10 remote
| 0/20
| | Jun 22 18:30:02 qmail qmail: 961669802.894011 delivery 15: deferral:
| | Unable_to_chdir_to_maildir._(#4.2.1)/
| | Jun 22 18:30:02 qmail qmail: 961669802.895107 status: local 0/10 remote
| 0/20
| | what is my mistake here? 
| 
| | What are the permissions on the Maildir/ catalog in the vhernz's home
| | catalog? 
| 
| | Did you make that Maildir with maildirmake?
| 
| Yes,
| 
| You'll also get this error from qmail is you are using a +domain
| in users/assign and the $HOME defined in users/assign does not
| have a .qmail-default
| 
| Paul.
| -- 
| | Paul Gregg  | T: +44 (0) 28 90 424190 |  |
| | Technical Director  | F: +44 (0) 28 90 424709 | CLUB24  INTERNET
| |  
| | The Internet Business Ltd   | W: http://www.tibus.net |   Free  Access
| |  
| | Holywood House, Innis Court | E: info  @ tibus . net  | www.club24.co.uk
| |  
| | Holywood, Co Down, BT18 9HF | P: pgregg @ tibus . net |  |
| 
| 
| 
| 


-- 
| Paul Gregg  | T: +44 (0) 28 90 424190 |  |
| Technical Director  | F: +44 (0) 28 90 424709 | CLUB24  INTERNET | 
| The Internet Business Ltd   | W: http://www.tibus.net |   Free  Access   | 
| Holywood House, Innis Court | E: info  @ tibus . net  | www.club24.co.uk | 
| Holywood, Co Down, BT18 9HF | P: pgregg @ tibus . net |  |



Re: unable_to_chdir_to_maildir

2000-06-22 Thread Paul Gregg

In article [EMAIL PROTECTED] Thorkild 
Stray [EMAIL PROTECTED] wrote:
| On Thu, 22 Jun 2000, Vince wrote:

| please help i got this error in my qmail system,
| Jun 22 18:30:02 qmail qmail: 961669802.819169 starting delivery 15: msg
| 95447 to local [EMAIL PROTECTED]
| Jun 22 18:30:02 qmail qmail: 961669802.820265 status: local 1/10 remote 0/20
| Jun 22 18:30:02 qmail qmail: 961669802.894011 delivery 15: deferral:
| Unable_to_chdir_to_maildir._(#4.2.1)/
| Jun 22 18:30:02 qmail qmail: 961669802.895107 status: local 0/10 remote 0/20
| what is my mistake here? 

| What are the permissions on the Maildir/ catalog in the vhernz's home
| catalog? 

| Did you make that Maildir with maildirmake?

Yes,

You'll also get this error from qmail is you are using a +domain
in users/assign and the $HOME defined in users/assign does not
have a .qmail-default

Paul.
-- 
| Paul Gregg  | T: +44 (0) 28 90 424190 |  |
| Technical Director  | F: +44 (0) 28 90 424709 | CLUB24  INTERNET |  
| The Internet Business Ltd   | W: http://www.tibus.net |   Free  Access   |  
| Holywood House, Innis Court | E: info  @ tibus . net  | www.club24.co.uk |  
| Holywood, Co Down, BT18 9HF | P: pgregg @ tibus . net |  |



Re: AOL Problem - Looked in archive ....

2000-03-30 Thread Paul Gregg

Dave Kitabjian [EMAIL PROTECTED] wrote:
 We've seen this as well.

 My understanding was that AOL was having internal mail problems, and that's 
 why those AOL customers weren't receiving the message. AOL was reluctant to 
 admit fault, but that's what it turned out to be.

 If this turns out to be something else, I'd like to know what you discover!

A customer of ours was having the same problem a couple of months ago.

I managed to get hold of a top AOL person who pointed me to the Postmaster
(i.e. the real person, not postmaster@) who fixed the problem.

Official line is: We know what it is and can fix specific domains (that
email is sent from).  It is embarrasing, but we can't say what the problem
is.

Keep pushing AOL and it'll get fixed.

Paul.
-- 
Email pgregg at tibus.net  |  T: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director |  F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business Ltd  |  W: http://www.tibus.net  |  www.club24.co.uk  | 



Re: POP Toaster

2000-02-28 Thread Paul Gregg

Stephen Remillard [EMAIL PROTECTED] wrote:
 Hi,

 I just finished installing qmail on my Linux box.  I would like to replace
 our NT mail server with qmail running on Linux.  There are no local users on
 this Linux box so everyone will get their e-mail using POP3.

 I have a few beginner's questions for you.

 I am reading the FAQ on how to setup a "POP Toaster" and I am a little
 confused.
 Could someone explain to me the purpose of the checkpassword utility.
 Is it to maintain the list of authorized people without creating user
 account on Linux? Can I do without it?

 Also is there a more detailed document on how to setup qmail-pop3d.

In short Qmail is completely modular.  The checkpassword you choose is entirely
dependent on which method of authentication you wish to use:
/etc/password
plaintext password file (other than /etc/passwd)
LDAP
cdb password file
Mysql Database
Radius
etc
etc

In setting up "qmail-pop3d" you need to understand that qmail-pop3d provides
nothing more than the POP3 functions to operate on a users Maildir - it does
not collect useranem/password or arrange the authentication of the user.

Qmail operates as a sequence of programs doing their thing then running the
next program in the chain, e.g.  you could setup the following scenario:
Using Daemontools, and the UCSPI packages you may wish to launch the
qmail-pop* system from tcpserver (which listens on port 110), further you
may wish to run tcpserver under a supervisory process, so the execution
"string" would be something like:

echo "Starting POP3 daemon."
/usr/local/bin/tcpserver -v -p -lmail.mydom.net -t2 -u 888 -g 888 0 110 \
/var/qmail/bin/qmail-popup mail.mydom.net \
/var/qmail/bin/checkpoppasswd \
/var/qmail/bin/qmail-pop3d Maildir 21 | \
/var/qmail/bin/splogger pop3d 

The only real variable in this is getting your checkpasswd/checkpoppasswd
functioning  - advice on testing your checkpasswd is available on www.qmail.org

Paul Gregg
-- 
Email pgregg at tibus.net  |  T: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director |  F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business Ltd  |  W: http://www.tibus.net  |  www.club24.co.uk  | 



Re: Big and/or famous sites using qmail?

2000-02-24 Thread Paul Gregg

Bruce Guenter [EMAIL PROTECTED] wrote:
 On Wed, Feb 09, 2000 at 12:02:17PM +0800, Michael Boman wrote:
 Wouldn't it great if there was a list of big/famous sites that uses qmail
 as their MTA?

 I just compiled a list of these from searching through the qmail mailing
 list archives:

 OneList
 Yahoo
 egroups
 InterNIC
 RIPE (European research organiziation, I believe)
 xoom.com (heavily modified)
 USA.net
 MatchLogic
 Algonet (Sweedish ISP with 50,000+ users)
 gmx.de (German ISP)
 NetZero
 Critical Path
 -- 
 Bruce Guenter [EMAIL PROTECTED]   http://em.ca/~bruceg/

-- 
Email pgregg at tibus.net  |  T: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director |  F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business Ltd  |  W: http://www.tibus.net  |  www.club24.co.uk  | 



Re: Wildcard virtual email mapping

2000-02-21 Thread Paul Gregg

Also, take off the "-username" in the users/assign entry to leave:
+assign:domain-com:..

And rename .qmail to .qmail-default in their directory.

Paul.

Tong [EMAIL PROTECTED] wrote:
 Use '+' instead of '=' in users/assign as described in the FAQ.

 At 10:44 AM 1/24/00 -0500, Robbie Honerkamp wrote:
I'm running Qmail in a single-UID POP server setup (as in Paul
Gregg's HOWTO). Everything is working fine except.. Some users
want any email coming to any possible address in their domain 
mapped to their mailbox. I've been playing with several possibilities
in /var/qmail/users/assign, but nothing seems to work so far.

Has anyone done this before under such a setup?

Thanks,
Robbie






Re: Pop/Single-UID based POP3/problem

1999-11-08 Thread Paul Gregg

Sounds like you have test.com in control/locals

Make sure there is nothing in control/locals - this file denotes domains which
are handled by system useraccounts.

Paul.

Jørgen Skogstad [EMAIL PROTECTED] wrote:

 Kindest,

 I am having some problems with the setup provided
 from Paul Greg. I get these errors in the log when
 trying to get incoming mail routed to the users
 mailbox;

-- 
Email pgregg at tibus.net  |  T: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director |  F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business Ltd  |  W: http://www.tibus.net  |  www.club24.co.uk  | 



Re: Big mama ISP server

1999-09-12 Thread Paul Gregg

Ira Abramov [EMAIL PROTECTED] wrote:

 at 150K users, the loads on my server aren't impressive, I'm guessing
 Israeli users surf and chat more than write Emails, possibly because of
 the software limitations (very few Right-to-left clients available, fewer
 agree on the encoding of the characters)

 My bosses are quite happy with an outgoing Qmail server, so now I want to
 make all other functions work on Qmail (local delivery, virtual domains,
 pop, ETRN users moving to AUTORUN etc.)

 right now an ugly 8 meg password file with a 6 meg shadow sidekick are
 pushed around the servers with scp. I'm going to move delivery and RADIUS
 auth all to RDBMs... (anyone done this? It's really hard to find useful
 info about this online... should I patch them all to lookup CDB files, or
 lookup an SQL server maybe?)

 the main question I'd like to pose to people, because getting sun machines
 just for tests is too expensive an option here, has anyone compared the
 speed advantage or loss when moving between the following setups:

 1. current: sendmail delivers to a local in-house agent written in C (15k
 tool) that tests for a vacation flag for a user, then delivers to a two
 level hashed spool directory (/var/spool/mail/u/s/username) mounted from a
 net appliance box after checking mail quota limits (not standard fs
 quota). a second machine servers pop with qpopper.

 2. wanted: qmail uses qmail-users or an external lookup (of CDB or some
 SQL?) to deliver to a a single-UID hash of maildirs if within quota, while
 checking for a vacation flag and executing if necessary. POP is served
 from another machine using qmail-pop3d. no dialup users have a UID or an
 entry in the /etc/passwd (YEAH!!!)

 is qmail-pop3d up to such volumes? is the 2-order growth in number of
 directories and files on the fileserver a speed damper? should I let qmail
 deliver to the existing hash and keep Qualcomm's popper poppin'?

 all sugestions and experianced tips are welcome, on-list or off it. TIA!

 Ira.

 (Oh yeah, and Russel, if you have a ready-made solution you can offer for
 a fee, send me an offer!)

Your (2) wanted isn't that difficult to do.  We have a MySQL DB holding
account details of all users and our mailhub uses the ~alias/.qmail-default
to deliver all mail to a custom built program which then
a) Checks to see if the hash directory exists /u/domain.com/u/s/username
   and if so delivers to the Maildir in that directory  (mail would
   have been sent to [EMAIL PROTECTED])
b) If not, then it performs a Mysql lookup to see if the account exists
   and isn't disabled or locked. If ok then makes the directory and performs
   as a) above.
c) If a and b fail then bounces the message with No such user.

checkpoppasswd currectly is custom written to check the same DB (but for speed
I'm going to change it so that cron produces a cdb of the password file).

Both smtp and pop3 run on the same box and we've 7,500 users now (not one of
them involved any human intervention in setting up the account or management
of the mailhub).

As regards, speed advantage.  On the delivery, you should be able to use
a slightly modified version of your existing C delivery program.  As such
you won't see any great speed difference, other than less memory usage
overall.  On the Pop3 your checkpasswd is going to be your potential slow
problem (which is why I need to get away from direct DB querying).

Paul Gregg
-- 
Email pgregg at tibus.netT: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director   F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business LtdW: http://www.tibus.net  |  www.club24.co.uk  | 



Qmail and Virus Protection

1999-07-26 Thread Paul Gregg

Well everyone, my new hobbyhorse is Anti-Virus (or Virus Protection) of
Qmail systems.

Essentially, I don't believe that anyone is actually running anything
like this at this point in time.

There is probably two options:

1) In .qmail pipe the incoming email *for delivery* through a traditional
   antivirus package.  Possibly using Amavis.

2) Write a qmail-queue wrapper which reads in the email as normal,
   sweeps it using an external virus sweeper, if clean passes it to
   the real qmail-queue.

There are problems and advantages with both. Neither of which I like.
1 allows fine grained control over who's email does and doesn't get
sweeped, but unless the antivirus is a clientserver model will take
ungodly amounts of resources in startup per email.
2 - I really don't like interrupting the smtpd-queue process with an
external program.  Plus qmail-queue can't print diagnostics.

The third option is perhaps the "best".  DJB in qmail-2.0 needs to
have an external "hook" to sweep emails via an external 3rd party daemon or
command.  The hook could either be in qmail-queue as a central point, or
in qmail-inject and qmail-smtpd.  Either option needs to be able to return
an errordiagnosic message.

I'm sure this message will touch nice/sore spot with most readers and
is something that will in the near future will become something with which
we must all deal with, so lets get the ball rolling.

Paul Gregg
-- 
Email pgregg at tibus.netT: +44 (0)  1232 424190  |  CLUB24  INTERNET  | 
Technical Director   F: +44 (0)  1232 424709  |Free  Access| 
The Internet Business LtdW: http://www.tibus.net  |  www.club24.co.uk  | 



Re: Virtual Mail Setup

1999-06-16 Thread Paul Gregg

Richard Roderick [EMAIL PROTECTED] wrote:
 Thank you Paul!

 First, thank you for the guide on how to use a single uid. It was clean
 simple and I could easily understand it.

 Second, thank you for understanding my question. I was tempted to use a
 character other than -, and I didn't know which would be a good choice. Was
 hoping '=' or '+' was.

I think using "+" really should be the default option. I don't use it myself
(maybe Dan knew of some strange unix FS that didn't like +s in filenames).
Someone really should write an explanation of how exactly it all works.

However, I wrote the UID howto based upon a normal qmail install.

Paul.
-- 
Email pgregg at tibus.net |   CLUB24   | Email pgregg at nyx.net| 
Technical Director|  INTERNET  | System Administrator   |
The Internet Business Ltd |Free  Access| Nyx Public Access Internet |
http://www.tibus.net  |  www.club24.co.uk  | http://www.nyx.net |



$ to do this? Re: Concept: 'infinate' POP3 accounts per pop3 user.

1999-06-14 Thread Paul Gregg

Seeing as nobody has offered to do this free ;) 

I'd be interested to hear is anyone out there is interested in developing
this project for me.  It doesn't seem like a difficult task - security of the
resultant qmail-pop3d is also important.

I can swing $200-$300 for this.

Please email me if you are interested.

Regards,

Paul.

In article 7jhl3c$lvp$[EMAIL PROTECTED] you wrote:
 In article [EMAIL PROTECTED] you wrote:
 Paul Gregg writes:

 Assume this setup is running perfectly (ok, I have 4,000 users using it).
 
 Essentially I'm thinking of enabling the user to login via POP3 as
 '[EMAIL PROTECTED]' with their normal password. (I've written the
 checkpasswd so it's easy to authenticate ok).
 
 What methodology could be used so that if they login with a specific
 email address as a POP3 user then they only "see" email which is destined
 for that user. but if they logged in without a user@ part then they would get
 everything.

 You'll need a custom POP3 server for that.  When the POP3 server
 initializes and scans the Maildir for messages, it should ignore messages
 that do not have a Delivered-To: address for the login user.

 Maildir-based POP3 servers are childishly simple, and you should be able to
 write one up, or modify an existing one, in no time at all.

 Ok, I figured out how best to code this up.

 Essentially, one needs to patch get_list() in qmail-pop3d.c

 get_list calls maildir_scan() (in maildir.c) to return a list of filenames,
 which get_list() then parses through to build a list of files/emails
 which are in the Maildir.

 This routine needs to also add the Delivered-To: checks that are in
 serialsmtp.c from the serialmail package.
 Simply we could call checkpasswd qmail-pop3d Maildir  and checkpasswd could
 exec  @ARGV, but add user@host to the args (so qmail-pop3d could read it).

 The check would need to find the Delivered-To: (first one) line
 and do a search in the string for /user@host/  (the login pop3 id).
 (checkpasswd could munge it whatever way you wanted to cover for user%host
 if you had to).

 Anyone feel up to the task?  I'm afraid my C coding skills leave much to
 be desired - never got time to learn :(



Re: mkpasswd.pl and checkpasswd

1999-06-04 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:

 Could anyone help me?

 I'm using the checkpoppasswd supplied on Qmail.org:
 /* Alternative checkpassword for QPopup by Jedi/Sector One [EMAIL PROTECTED] */
 /* Format of the configuration file is :
  * pop_login:crypted_password:real_login:path */

  In the file
 /var/qmail/users/poppasswd there is a line like: 

 testid:DmIMm9e5Hc8ic:popuser:/var/qmail/popboxes/domain-com/joe

 So, here the passwd is crypted. My question is How to setup the crypted
 passwd? What seed to use?

 The Jedi's checkpoppasswd script uses the crypt() function, with the
 parametter: crypt(passwd,stored)
 -passwd is the passwd the the program take from the network
 -stored is the crypted passwd in the poppasswd file.

 So, I don't know what passwd to set in the poppasswd file.

 I'm sure someone has a good idea about that :-))

It is irrelivant what seed you use to crypt your passwords with. The
checkpasswd program will read in thecrypted password from the poppasswd file
and use the first two chars as the seed.

If you question is how to generate crypted passwords (for creation of
poppasswd entries) then have a look at my mkpasswd.pl util at:

http://www.tibus.net/pgregg/projects/

Paul.
-- 
Email pgregg at tibus.net |   CLUB24   | Email pgregg at nyx.net| 
Technical Director|  INTERNET  | System Administrator   |
The Internet Business Ltd |Free  Access| Nyx Public Access Internet |
http://www.tibus.net  |  www.club24.co.uk  | http://www.nyx.net |



Concept: 'infinate' POP3 accounts per pop3 user.

1999-06-03 Thread Paul Gregg

Hi all.

Consider the following setup:

Each user of an ISP has a full "virtualhost" username.
Qmail is configured so that [EMAIL PROTECTED] is delivered
into their individual Maildir/Pop3 box.  Each user logs in with their
username 'theirname.domain.com'.

Assume this setup is running perfectly (ok, I have 4,000 users using it).

Essentially I'm thinking of enabling the user to login via POP3 as
'[EMAIL PROTECTED]' with their normal password. (I've written the
checkpasswd so it's easy to authenticate ok).

What methodology could be used so that if they login with a specific
email address as a POP3 user then they only "see" email which is destined
for that user. but if they logged in without a user@ part then they would get
everything.

My inital thoughts are to auth, then create a sub-Maildir and mv the relivant
emails into it, set HOME appropriately and launch qmail-pop3d.

However, this has implications against "Leave mail on server", so if this
happens we need to consider mv-ing emails back to the parent Maildir/cur
and tearing down the sub-Maildir.

I could do the above described setup ok, but perhaps there may be an issue(s)
I haven't considered.

Anyone have any thoughts on this?

This has obvious application in providing "company wide" or private boxes
within a single ISP account setup without having to do anything fancy for
each client.

Paul.
-- 
Email pgregg at tibus.net |   CLUB24   | Email pgregg at nyx.net| 
Technical Director|  INTERNET  | System Administrator   |
The Internet Business Ltd |Free  Access| Nyx Public Access Internet |
http://www.tibus.net  |  www.club24.co.uk  | http://www.nyx.net |



Utility to assist in crypting passwords for poppasswd file

1999-03-26 Thread Paul Gregg

In article [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  How can I manually edit such a file and type in an encrypted password in it ?

This has been a common question asked of me.  In response I've written a
small utility to assist you in crypting the passwords for use in the
poppasswd file.

http://www.tibus.net/pgregg/projects/

and click on the mkpasswd.pl link (it is in the same block as the HOWTO).

d/l the file and save it as, say, mkpasswd in a directory that is in your
PATH.  Make sure it is executable, chmod a+rx mkpasswd.  Then to use it do:

mkpasswd [plainpass] [seed]

If you leave out [seed] then it is randomly generated (the seed is the first
two letters of the crypted passwd).  If you simply type mkpasswd on it's own
it'll ask you to type in the password and again to confirm and optionally
you can then put in the seed - this is more like what you would be used to
if changing your password.

Paul.

-- 
Email pgregg at tibus.net |   CLUB24   | Email pgregg at nyx.net| 
Technical Director|  INTERNET  | System Administrator   |
The Internet Business Ltd |Free  Access| Nyx Public Access Internet |
http://www.tibus.net  |  www.club24.co.uk  | http://www.nyx.net |



Re: checkpoppasswd permissions problems

1999-02-28 Thread Paul Gregg

Sorry - I just saw this by searching the newsgroup for my name

In article [EMAIL PROTECTED] you wrote:
 This is really directed more toward Paul Gregg [EMAIL PROTECTED], but I
 thought the whole list might get some benefit from my mistakes.

 I'm using your checkpoppasswd program derived from the checkpasswd of
 Jedi/Sector One. I've modified it by putting more intuitive messages into
 the syslog messages and got it working, authenticating users at one point,
 but now it's failing with the log message "Couldn't setgid (888)." I'm
 running qmail-pop3d.init with the uid and gid of the qmaild user (81 and 80
 respectively. It was originally root, but I thought that might be a security
 hazard and changed it to the same uid/gid of the other qmail servers. Is
 there a valid reason for having qmail-pop3d run as root? Is it because
 qmail-pop3d has to be able to delete files owned by others? I put qmaild into
 the popuser group (888) but it still failed at the same point.

 Anyone, please advise.

Looks like there is a bit of a mix up here...

You would normally run qmail-popup as root, which would then run checkpoppasswd
as root.
chechpoppasswd checks your password against the poppasswd file and ascertains
the userid and gid of the user which has just logged in.  checkpoppasswd
then sets the uid/gid of itself to that user.  In my single uid system the
uid/gid is always 888/888 (but the numbers are really up to you).
checkpopasswd then sets USER, HOME and SHELL and runs qmail-pop3d under the
uid of the logged in user.

Because the single UID system should always run as uid 888 then you can
happily run qmail-popup via tcpserver with -u888 -g888 if you wish.

I don't because there's no need to.

Paul.



Re: System w/o /etc/passwd

1999-02-26 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 On Fri, 19 Feb 1999, Paul Gregg wrote:

 In article [EMAIL PROTECTED] you wrote:
  On Wed, 20 Jan 1999, Robert Adams wrote:
 
  user on the system. Anyone know of a way to get around this? Say, to tell
  qmail to drop all mail to something like /mail/u/s/username?
 
 
 I don't believe qmail can deliver to hashed spools like this by default.
 
 I've just written a delivery script to deliver to hashed spools because I
 needed it (gonna be *many* users). 
 
 I nearly got it working with virtualdomains and users/assign with 26*26
 entries, but it ment that I needed a virtualhosts entry for every

 virtuall domain and each user was going to have one so it was not
 practical and thus I wrote my own script as ~alias/.qmail-default.

 I think it can if you use the qmail-users mechanism

[snip]

 so i would expect running the file though a little perl script which
 replaces homedir with the hased spool directory will work (assuming the
 user has permissions to their hashed spool directory.)

 or have I missed the point of the question?


I think so ;-)

My point was that I wanted a default system so I didn't have to add anything
the qmail - If I don't want to add a virtualhosts entry per user then I'm
absolutely not going to want to add a users/assign entry (with associated
qmail-newu)

I had worked out that I could have 26*26 entries in users/assign to handle
hashed spools for all users:

+club24-co-uk-aa:popuser:400:400:/u/club24-co-uk/a/a:-:aa:
+club24-co-uk-ab:popuser:400:400:/u/club24-co-uk/a/b:-:ab:
+club24-co-uk-ac:popuser:400:400:/u/club24-co-uk/a/c:-:ac:
+club24-co-uk-ad:popuser:400:400:/u/club24-co-uk/a/d:-:ad:
+club24-co-uk-ae:popuser:400:400:/u/club24-co-uk/a/e:-:ae:

then I'd create a .qmail-username-default in /u/club24-co-uk/a/a delivering
to ./username/Maildir

But I had to add every virtual host individually - this I didn't want.

Now my perl script takes the email, calculates the HASH Maildir,
if it exists its delivered, if not it checks a MySQL database to see if we
want to accept email for this domain ([EMAIL PROTECTED]) is
accepted - if so, we create the Hashed Maildir and deliver the email.

The next time the Hashed dir will be there thus no MySQL lookup is needed.

Essentially I want to be adding a min of 1,000 user accounts per month 
fully automatically without having to remotely connect to the mailserver
and setup their mail account.

It works perfectly :-)  Cept I can only hand 400 deliveries per minute
due to perl overhead. :-(

I'm currently splitting the MySQL auth stuff away from the program to minimise
the code in the maildirdeliver program which should mean greater throughput.

Paul.

PS. In case you're interested and cos I know you're in the UK - I'm launching
a Free ISP service ala Freeserve.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: System w/o /etc/passwd

1999-02-19 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 On Wed, 20 Jan 1999, Robert Adams wrote:

 user on the system. Anyone know of a way to get around this? Say, to tell
 qmail to drop all mail to something like /mail/u/s/username?


I don't believe qmail can deliver to hashed spools like this by default.

I've just written a delivery script to deliver to hashed spools because I
needed it (gonna be *many* users). 

I nearly got it working with virtualdomains and users/assign with 26*26
entries, but it ment that I needed a virtualhosts entry for every
virtuall domain and each user was going to have one so it was not
practical and thus I wrote my own script as ~alias/.qmail-default.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Possible Anti-spam solution (was Re: Example of the anti-fax effect)

1999-01-18 Thread Paul Gregg

DJB wrote:
 I'm interested in credible plans for eliminating spam: e.g., using the
 legal system to bankrupt spammers, and widely advertising the results;
 or using digital cash to incorporate secure prepayments into Internet
 mail. I'm not interested in security through obscurity.

How about this.

I can't take credit for the ideas - I'm just joining two potential solutions.

1 - We already have the RBL.

2 - We setup a "dummy" address to which when our mail system receives
a spam it records some pattern from that email and matches this pattern
against further emails from that host - any matches are rejected/discarded
or placed somewhere else.
Idea from this originally belongs to Elie Rosenbloom (nyx.net)

So lets design a system where we, as contributing MTAs, register a few
dummy addresses with a central (or distributed) RBL type setup.

We all make up these arbitrary addresses and seed the spammers databases
with them (by posting to usenet or putting them on webpages) and register
these addresses with the "RBL".

If any emails come into these seeded addresses then we register some info
about that email with the RBL.

All incoming emails are checked against this RBL-type database to see if
we should accept or deny this email.

It is likely that we'll need some double level check to happen - probably
a stage 1 check like the real rbl which checks to see if the incoming ip
address may be a problem one. If so then we check the emails headers
against the database to see if this is indeed a spam.

The spammers would never be able to figure out the seeded addresses and the
only real way around this system would be to use different source IPs for
sending emails (not practical) if sending direct to MX.  If they use an open
relay then it'll quickly kill off connections from that machine - but we would
need to build in a TTL since the last spam registered from that host (e.g.
12 or 24 hours).

So, Why wouldn't this work?

Paul Gregg
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: Possible Anti-spam solution (was Re: Example of the anti-fax effect)

1999-01-18 Thread Paul Gregg

Mark Delany wrote:
If any emails come into these seeded addresses then we register some info
about that email with the RBL.

 Which info would you record? The forged envelope sender or the unwitting 
 third-party relay?

1) IP address of the remote host and 2) From / Subject / To ?

The thing spammers are least likely to much with is the subject. But if you
recorded all 3 you could do a reasonably quick "intelli" match on other
emails from that host.

sending emails (not practical) if sending direct to MX.  If they use an open
relay then it'll quickly kill off connections from that machine - but we would
need to build in a TTL since the last spam registered from that host (e.g.
12 or 24 hours).

So, Why wouldn't this work?

 Because most open relays are not well administered, if at all. All you'd 
 succeed in doing is RBLing most open relays.

 But, we already know who they are (or did with dorkslayers et al) and can 
 block them without the need for an elaborate scheme.

No, I don't think you've grasped the concept.  If I received an email to
a seeded address then Qmail-? would immediately update the "RBL" with 12
above.

Then when the spammer gets around to spamming mira.net customers your "RBL"
check will kill it mid flight.

It's a co-operative thing where only the first few emails will get through
and 99% of subsequent emails (from this spammer) will be blocked at
the co-operating MTA.

 Probably spamtools is the place for this discussion as the politics of 
 dealing with open relays is the controvery not the technology and it has 
 nothing specific to do with qmail.

Yes it isn't Qmail specific at all, I was just responding to Dan's suggestion
for something that would work.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-04 Thread Paul Gregg

[EMAIL PROTECTED] (Russell Nelson) wrote:
 Paul Gregg writes:
   In article [EMAIL PROTECTED] you wrote:
Since I started this thread I can tell you without question what it's about
and [EMAIL PROTECTED] isn't any part of it.  I want to reject mail being 
sent to certain valid usernames, such as my database. I'd also like to bounce
 ^^
some mail to nonvalid usernames without accepting and bouncing afterward since

they only double bounce anyway.   
   
   To do this, then it requires qmail-smtpd to know everything that qmail-send
   does.

 Nonsense.  qmail-send needs to know what recipients it will accept.
 qmail-smtpd needs to know what recipients it will reject.  The two are 
 disjoint but not covering sets.

Usually I would believe much of what you say Russell, but in this case to
do this qmail-smtpd needs to know what it will accept, which is basically
what I was saying.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 On Sun, Jan 03, 1999 at 11:53:32PM +, Paul Gregg wrote:
 # John R. Levine wrote:
 # What you want is:
 # /var/qmail/control/badmailheaderto
 # which really doesn't buy you anything.
 # 
 #  What I would like, and I believe what he's asking for, is
 #  /var/qmail/control/badmailto which would list specific addresses in
 #  otherwise acceptable domains to which all mail should bounce
 #  instantly. They'd match against the "MAIL TO:whoever" command, not
 #  anything in the body.
 # 
 # What you and others have failed to realise in this thread is that although
 # you may be receiving spams with the header "To: [EMAIL PROTECTED]" you
 # *will not* be receiving the email into your system with a
 # RCPT TO: [EMAIL PROTECTED]

 no, it is you who have failed to see that when he said Mail to: he meant rcpt
 to:

Err, no.  Read it again.  I assumed he ment RCPT TO: when he said MAIL TO:.
All my points are valid and correct.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: Quota on Maildir?

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 
 I have a Qmail 1.03 system running for POP3 users.
 These users are created as popusers (with linuxconf) on a RedHat 5.1
 system.
 
 I'd like a bit more handy quota inforcement system than the ordinary
 quota on Linux.
 
 I have been looking into mailquotacheck.sh by Paul Gregg. 
 
 What are the alternatives?

You'd need to describe your own setup a little more clearly.

*If* you permit each user to be in control of their own .qmail- delivery
control files then the only quota option you have at your disposal is the
system quota.  If not, then you can use my script.  I wrote it in sh so it
could be used by all systems (not perl dependant), though I really should
knock out a perl version.

I don't know of any other available quota systems for qmail.

Good luck.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:

 Your points may be valid and correct, but you only echoed what was originally
 stated anyway.  The "To: [EMAIL PROTECTED]" IS part of the body, not the RCPT
 TO:   The [EMAIL PROTECTED] stuff started when someone else said they'd like
 to bounce that too, but I just answered that.

I echoed what others had said, yes. But I had to pull it all together because
people were not grasping what was actually going on.

 Since I started this thread I can tell you without question what it's about
 and [EMAIL PROTECTED] isn't any part of it.  I want to reject mail being 
 sent to certain valid usernames, such as my database. I'd also like to bounce
 some mail to nonvalid usernames without accepting and bouncing afterward since
 they only double bounce anyway.   

To do this, then it requires qmail-smtpd to know everything that qmail-send
does.  It requires a major rethink and rewriting of the qmail system.
We'll have to see what dbj comes up with for Qmail-II - we know that many of
us would like to see such a feature.

 The problem with accepting and trashing the messages is that if mail is sent
 to the database (ferinstance) I'd have to filter out what is junk mail and
 what's valid - like cron results.

If you are in control of the local delivery then you already can control
who sends mail to your database.  Why can't you use procmail?

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 Since I started this thread I can tell you without question what it's about
 and [EMAIL PROTECTED] isn't any part of it.  I want to reject mail being 
 sent to certain valid usernames, such as my database. I'd also like to bounce
 some mail to nonvalid usernames without accepting and bouncing afterward since
 they only double bounce anyway.   

To do this, then it requires qmail-smtpd to know everything that qmail-send
does.  It requires a major rethink and rewriting of the qmail system.

 Interesting theory, but hard to believe.  All I want is a place to put
 a list of addresses that won't be accepted as RCPT TO arguments even
 if the domain is otherwise acceptable.  Note that there's no new
 linkage here to anything other than perhaps a file in which the names
 are listed.

There was two issues above. 1) reject mail being sent to valid usernames
and 2) bounce mail sent to non-valid usernames without accepting the message.

As you note, 1) Is "easy" to patch in.  2) Is non-trivial.

If you are in control of the local delivery then you already can control
who sends mail to your database.  Why can't you use procmail?

 As has been noted many times, rejecting mail at the SMTP level saves
 processing and makes it more likely that the sender will notice that it
 was rejected.

True, but since when has processing be a major issue in a qmail box?
And if the sender is a valid user then qmail will make sure he gets an
error message.

 I'll dig up the patch that does this and try it out.  Given that the
 badmailfrom code already exists, it shouldn't be very big.

Yes, but this is only going to resolve "1" above.  I noted to the thread poster
that he can use procmail to ensure that only his system can email his
database; and Mark pointed out that he can leave the domain out of 
rcpthosts which will prevent qmail-smtpd from accepting it from
remote sites. If the domain is his normal one, then it shouldn't be hard to
use Mark's method and make up a dummy domain for which a .qmail-default
can relay the email through to his database.

Why does anyone need a control file for "badmailto" ?  Think about it.  You
don't need one.  Why would you want to list valid users email addresses in
a "badmailto" file? (listing non-valid addresses isn't going to do much,
except saving qmail from having to generate a no such user bounce).

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 On Mon, Jan 04, 1999 at 12:39:33AM +, Paul Gregg wrote:
 # In article [EMAIL PROTECTED] you wrote:
 #  Since I started this thread I can tell you without question what it's about
 #  and [EMAIL PROTECTED] isn't any part of it.  I want to reject mail being 
 #  sent to certain valid usernames, such as my database. I'd also like to bounce
 #  some mail to nonvalid usernames without accepting and bouncing afterward since
   
 #  they only double bounce anyway.   
 # 
 # To do this, then it requires qmail-smtpd to know everything that qmail-send
 # does.  It requires a major rethink and rewriting of the qmail system.
 # We'll have to see what dbj comes up with for Qmail-II - we know that many of
 # us would like to see such a feature.

 no, it wouldnt
 invalid usernames would be dfined in a file, and would then be not accepted
 admin defined user named

As noted in another post in this thread. See it for an explanation of
what this applies to.

 # If you are in control of the local delivery then you already can control
 # who sends mail to your database.  Why can't you use procmail?
 not every machine has procmail, or wants to run procmail

Lessee... You willing to hack up badmailfrom to create a badmailto patch
for Qmail 1.0[13], but can't or won't run procmail.  Someone please point
out the logic to me, I really can't see it.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

Russ Allbery ([EMAIL PROTECTED]) wrote:

 Somewhere down the road, I think someone mentioned that one of the
 problems was cron mail.  cron mail is going to go just to the username, no
 domain qualification.

But cron only emails any output sent to stdout.  So ensure none happens and
tack on |/var/qmail/bin/qmail-inject [EMAIL PROTECTED]
to the end of the cron line.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: qmail II request

1999-01-03 Thread Paul Gregg

In article [EMAIL PROTECTED] you wrote:
 On Mon, Jan 04, 1999 at 01:10:01AM +, Paul Gregg wrote:
 # In article [EMAIL PROTECTED] you wrote:
 #  On Mon, Jan 04, 1999 at 12:39:33AM +, Paul Gregg wrote:
 #  # If you are in control of the local delivery then you already can control
 #  # who sends mail to your database.  Why can't you use procmail?
 #  not every machine has procmail, or wants to run procmail
 # 
 # Lessee... You willing to hack up badmailfrom to create a badmailto patch
 # for Qmail 1.0[13], but can't or won't run procmail.  Someone please point
 # out the logic to me, I really can't see it.

 no, no one wanted to do anything to qmail 1.0[123]
 it is a feature request for qmail 2

Point taken. However although the thread is about (or was ment to) qmail-II
several people were talking about using existing patches and doing stuff
now.

Let's move it back on track.

*If* Dan is to do anything about pre-accept rejection of SMTP messages then
it should most definately NOT be using a control file ala badrcptto or
suchlike.

The smtpd will have to know wether a rcpt to: address will be locally
deliverable or not and reject immediately. How Dan does it is really up
to him, he's infinately better at program design than I.

I'd see it working somthing like:

qmail-smtpd-accept - qmail-smtpd-checkaddrs - qmail-smtpd - 

qmail-smtpd-accept would accept the SMTP conversation up until the DATA
statement (so it knows that all rcpt to: statements are received),
then pass all data into checkaddrs which would be a custom prog much
like checkpoppasswd (i.e. you build in your own badmailfrom, badrctpto, etc
checking). If checkaddrs doesn't like any address is can print some error
message and exit, else normally it'll execvp qmail-smtpd an carry on.

 not all machines come with procmail installed, like the later versions of
 Linux, and not all sites WANT to install procmail, or need to for that
 matter.

There aren't many machines come with qmail installed either ;-)

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.



Re: Quota On Maildir when delivering

1998-12-26 Thread Paul Gregg

In article 00c001be2ebe$288f5aa0$[EMAIL PROTECTED] you wrote:
 Hello,

 Anyone know if it's possible to have qmail check for the size of the maildir
 when delivering mail.. so we could put say a 20meg quota on a users mail?
 Since we have qmail setup so that each pop3 box doesn't have it's own
 UID/GID... (Each user doesn't have a system account) we can't use the
 standard unix quotas...


Look for my mailquotacheck package at www.qmail.org - It'll do this and more.

Paul.
-- 
Email pgregg at tibus.net | Email pgregg at nyx.net| Eight out of every
Technical Director| System Administrator   | five people are math
The Internet Business Ltd | Nyx Public Access Internet | illiterates.
http://www.tibus.net  | http://www.nyx.net | - Anon.