Re: Editing .qmail Files Creates qmail-spawn_unable_to_open_messageError.

2001-03-06 Thread Peter Samuel

On Tue, 6 Mar 2001 [EMAIL PROTECTED] wrote:

 What I want to do is add the X-Envelope-To: to every email sent to my
 virtual domain. Then I can have pullmail just look at the X-Envelope-To:
 field and fix receiving mail sent to
 mailing lists.
 
 This is what I've done to my .qmail files:
 
 In .qmail-default
 
 |(echo "X-Envelope-To: $DEFAULT@$HOST"; cat) | qmail-inject -f "$SENDER"
 -- user-finaldelivery

What's wrong with

| echo "X-Envelope-To: $DEFAULT@$HOST"; cat) | forward user-finaldelivery

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




RE: Can Qmail send out 2 million mails in 12 hour window?

2001-02-27 Thread Peter Samuel

On Tue, 27 Feb 2001, Brandon Yu wrote:

 The messages themselves have been pre-generated and exist as a file and is
 qmail-injected to place them in the queue. The message is the same across
 the board with the exception of some personalization, such as the name.
 Since there are so many messages, we use a perl script to place them in the
 queue at a certain rate, i.e. 50 msgs/second, or whatever rate we choose. By
 injecting them at this rate, we can see whether qmail can keep up with our
 intended rate. With this in mind, does this lessen the burden of disk I/O? 

Don't use qmail-inject unless you have to. Use qmail-remote directly.
If qmail-remote reports a transient failure, then inject them into the
queue for later delivery. If qmail-remote reports a permanent failure
then the message cannot be delivered so it can be ignored.

See the qmail-remote man page for driving instructions.

Using qmail-inject will increase your disk I/O and impose qmails
concurrency limits. If you use qmail-remote directly you can bybass
these limits and impose your own :)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Subtle qmail bug? (was Re: Handling an MX record of 0.0.0.0 or127.0.0.1)

2001-01-23 Thread Peter Samuel

On Tue, 23 Jan 2001, Dave Sill wrote:
 
 Here's a possible fix. In control/virtualdomains:
 
   [0.0.0.0]:alias-devnull
 
 And in ~alias/.qmail-devnull-default
 
   #
 
 Which should throw away all mail to MX's resolving to 0.0.0.0.

Are you sure that will work? The envelope details won't mention
0.0.0.0, so how will qmail-send know to use that entry in
virtualdomains. (I haven't tested it yet, but I'm about to).

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Subtle qmail bug? (was Re: Handling an MX record of 0.0.0.0 or127.0.0.1)

2001-01-23 Thread Peter Samuel

On Tue, 23 Jan 2001, Dave Sill wrote:

 Here's a possible fix. In control/virtualdomains:
 
   [0.0.0.0]:alias-devnull
 
 And in ~alias/.qmail-devnull-default
 
   #
 
 Which should throw away all mail to MX's resolving to 0.0.0.0.

My tests show that that won't work:

echo "[0.0.0.0]:alias-devnull"  /tmp/vd
cat /tmp/vd /var/qmail/control/virtualdomains  /tmp/nvd
cp /tmp/nvd /var/qmail/control/virtualdomains
chmod 644 /var/qmail/control/virtualdomains
echo #  ~alias/.qmail-devnull
chmod 644 ~alias/.qmail-devnull
killall -HUP qmail-send
/var/qmail/bin/qmail-remote \[0.0.0.0\] [EMAIL PROTECTED] [EMAIL PROTECTED]  EOF
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: testing

hello
EOF

qmail-remote returns with

rK0.0.0.0 accepted message.
Remote host said: 250 Message accepted for delivery

and the qmail log shows

980273407.745867 new msg 1112229
980273407.746179 info msg 1112229: bytes 366 from [EMAIL PROTECTED]
qp 8502 uid 8
980273407.751043 starting delivery 62: msg 1112229 to remote
[EMAIL PROTECTED]
980273407.751057 status: local 0/10 remote 1/20
980273467.837834 delivery 62: success:
209.217.125.238_accepted_message./Remote_host_said:_250_ok_980273466_qp_26250/
980273467.837854 status: local 0/10 remote 0/20
980273467.837860 end msg 1112229

Because 0.0.0.0 is not mentioned in the envelope RCPT TO header, the
virtualdomain rule does not apply.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: qmail-users confusion

2001-01-23 Thread Peter Samuel

On Tue, 23 Jan 2001, Dave Sill wrote:

 Does users/cdb supplement regular users or is it an alternative to
 them? In other words, if I have a users/assign and users/cdb with a
 set of entries that doesn't include all valid local users, will mail
 to one of the non-cdb users bounce?

My experience is that if a match can't be found in users/cdb, then
qmail-getpw is called.

Does your assign/cdb file have a catchall entry?

+:alias:...

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Abnormal Hard Disk Activity

2000-12-22 Thread Peter Samuel

On Fri, 22 Dec 2000, Daniel Conlon wrote:

 Dear All,
 
 I have had qmail installed on a machine with  100 users for 6 months and all 
aspects of the installation are working correctly. However, it has recently been 
brought to my attention that the hard disk activity on the machine is 
excessive/abnormal - the disk is flat out.
 
 By systematically stopping processes I have established that it is qmail which is 
causing this. qmail is not under any load to speak of. 
 
 Is this normal for qmail? If not, what could be causing this?

Is it qmail-send or qmail-smtpd that is causing it?

What do the logs say? (tm)

What's the output of /var/qmail/bin/qmail-qstat run serveral times to
see if the queue is growing rapidly?

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




RE: Abnormal Hard Disk Activity

2000-12-22 Thread Peter Samuel

On Fri, 22 Dec 2000, Daniel Conlon wrote:

   I have had qmail installed on a machine with  100 users for 6 
  months and all aspects of the installation are working correctly. 
  However, it has recently been brought to my attention that the 
  hard disk activity on the machine is excessive/abnormal - the 
  disk is flat out.
   
   By systematically stopping processes I have established that it 
  is qmail which is causing this. qmail is not under any load to speak of. 
   
   Is this normal for qmail? If not, what could be causing this?
  
  Is it qmail-send or qmail-smtpd that is causing it?
 

Please reply to the list too. That way you'll get more eyes looking at
your problem.

Also please wrap your lines to  80 characters. It makes it easier to
read.

 I think it is qmail-smtpd. I say this only because 'supervise qmail-smtpd' is being 
quite heavy on CPU usage (18%). How would I find out for sure?

Looks like supervise is failing to start tcpserver correctly and
looping. What does /service/qmail-smtpd/run (or wherever you put it)
look like? Are you logging with multilog? If so what's the output of
the current file in the directory as specified by
/service/qmail-smtpd/log/run?

You aren't trying to suerpvise qmail-smtpd directly are you? If so
then that will fail. You need some process in front of qmail-smtpd to
handle the network connections - such as tcpserver.

 
  What do the logs say? (tm)
 Which logs? and where would I find them?
  
  What's the output of /var/qmail/bin/qmail-qstat run several times to
  see if the queue is growing rapidly?
 
 I ran this ten times in succession and got the same output each time as follows:
 
 messages in queue: 9
 messages in queue but not yet preprocessed: 0

Nothing new is being added to the queue - or qmail-send is processing
messages EXACTLY as fast as qmail-queue is putting them in the queue
(unlikely).

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




RE: Abnormal Hard Disk Activity

2000-12-22 Thread Peter Samuel

On Fri, 22 Dec 2000, Daniel Conlon wrote:
  
  Please reply to the list too. That way you'll get more eyes looking at
  your problem.
 
 Sorry, thought I did.

This time yes, last time, no :)

 
  Also please wrap your lines to  80 characters. It makes it easier to
  read.
 
 I have this set to 76 characters in Outlook. Is it not working?

Nope.

 
  
   I think it is qmail-smtpd. I say this only because 'supervise 
  qmail-smtpd' is being quite heavy on CPU usage (18%). How would I 
  find out for sure?
  
  Looks like supervise is failing to start tcpserver correctly and
  looping. What does /service/qmail-smtpd/run (or wherever you put it)
  look like? 
 
 #!/bin/sh
 QMAILDUID=`id -u qmaild`
 NOFILESGID=`id -g qmaild`
 exec /usr/local/bin/softlimit -m 200 \
 /usr/local/bin/tcpserver -v -p -x /etc/tcp.smtp.cdb \
 -u $QMAILUID -g $NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 21 

You have misspelled QMAILDUID. You forgot the D between L and U.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




RE: Abnormal Hard Disk Activity

2000-12-22 Thread Peter Samuel

On Fri, 22 Dec 2000, Daniel Conlon wrote:

  You have misspelled QMAILDUID. You forgot the D between L and U.
 
 So I did. I have corrected this and restarted qmail but 'supervise qmail-smtpd' is 
still consuming lots of CPU and hard disk is still flat out.
 
 Thanks once again for your assistance.

And the multilog output is? . If you don't give us information, we
can't do much to help you :)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Disable envnoathost?

2000-12-19 Thread Peter Samuel

On Mon, 18 Dec 2000, Charles Cazabon wrote:

 Kris Kelley [EMAIL PROTECTED] wrote:
  
   To save some work, you could use Bruce Guenter's QMAILQUEUE patch, and
   insert your filter inbetween qmail-inject and qmail-queue instead...
  
  Actually, there are no local users on these boxes, per se, so the filter
  would have to be between qmail-smtpd and qmail-queue.  Otherwise, this makes
  sense.  I'll keep it in mind.
 
 If I'm not mistaken, qmail-smtpd calls qmail-inject, which calls qmail-queue.

This time you are mistaken :) qmail-smtpd calls qmail-queue. See the
INTERNALS file that is shipped with the source.

 I belive Bruce's patch changes _all_ qmail programs which call qmail-queue
 to look at the contents of QMAILQUEUE (or similar) environment variable, and
 if set, to call that instead of qmail-queue directly.  Therefore it would
 work in this case.  Just have tcpserver set QMAILQUEUE to 
 "/path/to/my/filter", and filter calls qmail-queue.

Correct.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Creating new aliases

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, Joao Costa wrote:

 Hi,
 
 I successfully installed qmail on Solaris 5.8 by following Dave Sill's
 web-page. Now, I'd like to create an alias to specific users. I created
 a file (assign) on /var/qmail/users/. What are the following
 instructions?

Examine

man -M /var/qmail/man qmail-users

It gives detailed instructions of the format of the assign file. Two
important things to remember

1) the file MUST end with a single dot on a line by itself
2) you MUST run /var/qmail/bin/qmail-newu for your changes to take effect

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: ?

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, richard morris wrote:

 
 Hi,
 
 I'm seem to be having a local delivery problem, yet external mail? The
 server accepts mail but
 does not deliver?

What do the logs say (tm)?

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Qmail support in Australia ?

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, Russell Nelson wrote:

 Mark Delany writes:
   If you don't need it to be onsite support, then does it matter where
   the support comes from?
 
 Time zones.  I have a customer in India.  If I stay up late enough,
 the very end of my waking hours overlaps with their business day.
 Plus, if you're needed on site, being on the same continent is a
 help.  It's a twenty-hour trip to India for me.

It's 24 hours from Sydney to Ottawa :) And then there is the 15 or 16 hours
timezone difference.

 
 Plus there's jet lag.  I did some qmail training the first day I got
 there, after two missed flights and a four hour layover in Dubai.
 About three or four times I woke myself up with the sound of my own
 voice.  Very strange to wake up talking, and to realize that you have
 NO IDEA what you should say next.  :)

You have to be asleep to do that? I do that when I'm wide awake! :)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: alias and qmail-users

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, pedro wrote:

 Hi all,
 what is the difference between .../qmail/alias and .../qmail/users ?
 
 Thanks in advance.

qmail delivers mail as follows:

is the domain portion of the address a local or virtualdomain

no - deliver remotely

yes - deliver locally

does the user portion of the address have an entry in
/var/qmail/users/cdb (as built from
/var/qmail/users/assign)

yes - deliver mail according to the .qmail file
   referenced by the cdb entry

no - does the user portion of the address match a
  user according to getpwnam()

  yes - deliver the mail to that user

  no - is there a corresponding .qmail-user file
in /var/qmail/alias

yes - deliver the mail according to the
delivery instructions in that file

no - bounce the message.

This is a little simplified as it doesn't describe user-ext style
addresses, but it gives you a good idea of the flow. Have a look at
the qmail pictures which should be in /var/qmail/doc. They give a
better description of each type of delivery. Also see the qmail-users
man page.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: qmail install

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, Timothy Falardeau wrote:

 does anyone know where I can find an install procedure
 for just a qmail install without the daemontools and
 not the docs the tar comes withI do everything it
 says and I still can't get it to deliver locally...I
 can telnet to port 25 and run through but no delivery...
 

What do the logs say? (tm)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Aliases

2000-12-19 Thread Peter Samuel

On Tue, 19 Dec 2000, Alex Le Fevre wrote:

 Please pardon what is likely a really dumb
 question...I'm a true newbie.
 
 In installing qmail, I'm told to set up
 ~alias/.postmaster, etc., etc. Only problem is, I
 don't quite understand the alias concept as it relates
 to mail. I understand the idea of an alias for a
 directory name...but mail? Is there some standard
 directory I'm pointing to with this alias, or some
 other standard concept behind it?

I just answered this one (in a slightly different context). See
message 59749.

Also see the qmail pictures in /var/qmail/doc.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Qmail support in Australia ?

2000-12-18 Thread Peter Samuel

On Mon, 18 Dec 2000, listmon wrote:

 try [EMAIL PROTECTED] [EMAIL PROTECTED]
 
 peter samuels is the person to speak to.

Missed us by 4 months. Both Gordon Rowell (gormand) and myself have
moved to Canada to work for e-smith. Let us put word out on the
grapevine at home in Oz to see if we can find anyone available.

 
 Else for hands off mail server, look to e-smith  ( uses qmail as mail
 server )
 we have a number of clients running 4.0 now
 www.e-smith.com

So do we :) Thanks for the plug.

 
 Regards
 Stewart Evans
 Macclinic
 Adelaide
 
 
 - Original Message -
 From: Dennis [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, December 16, 2000 10:20 AM
 Subject: Qmail support in Australia ?
 
 
  Hi all...
 
  I'm in the process of proposing a shift off our current (almost working
 :))
  email system to qmail and have stumbled upon a small but significant
  problem.
 
  Our IT manager is a non-techi and as such is always looking for the, MS
  solution... I'm the only *nix guy in the department and have successfully
  convinced him to move DNS/WEB/Cache/DHCP over to *nix, phew !!! (email is
  next)
 
  The IT manager likes throwing "What happens if you get hit by a bus" at
  me... well, I get hit by a bus and not a single soul in our IT department
  can do any Qmail admin.
 
  I'd be happy to train them up but I need to also know that commercial
  support is available in Australia... This is the clincher !!!
 
 
  Cheers
  Dennis
 
 
 

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Duplicates in log created by queue_extra

2000-12-15 Thread Peter Samuel

On Fri, 15 Dec 2000, Nathan Harmon wrote:

 When someone sends email to a dot-qmail alias I have specified in
 ~alias/, the message shows up twice in the msg-log created by
 queue_extra.
 
 Question is, is there a filter to get rid of this. Or have I misconfigured.
 
 BACKGROUND:  The qmail source was modified as instructed by
 the qmail-howto (among other things). ~alias/msg-log is actually
 a symbolic link which points to /var/allmail/INBOX. /var/allmail
 is on a seperate fixed disk.

Show us the exact line(s) you changed in the source.

Show us the contents of the relevant ~alias/.qmail- file.

Show us the exact details of the symlink mentioned above (are you sure
that's what you did, because you make no mention of ~alias/.qmail-log,
or similar, AND a .qmail file can't just be a symlink to a mailbox).

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Duplicates in log created by queue_extra

2000-12-15 Thread Peter Samuel

On Fri, 15 Dec 2000, Nathan Harmon wrote:

 Sorry, should have been more specific.
 
 root@mail:~  cat /usr/src/qmail-1.03/extra.h
 #ifndef EXTRA_H
 #define EXTRA_H
 
 #define QUEUE_EXTRA "Tlog\0"
 #define QUEUE_EXTRALEN 5
 
 #endif
 root@mail:~  ls -l ~alias/msg-log
 lrwxrwxrwx   1 root qmail  18 Dec 14 14:46 /var/qmail/alias/msg-log - 
/var/allmail/INBOX
 root@mail:~  cat ~alias/.qmail-log
 ./msg-log
 root@mail:~  ls -l /var/allmail/INBOX
 -rw-rw   1 allmail  nofiles  2325 Dec 15 13:49 /var/allmail/INBOX
 
 
 
 For example, if I send a message to [EMAIL PROTECTED], the message will appear
 twice in /var/allmail/INBOX. I'm assuming this is because it is recording the
 message to [EMAIL PROTECTED], as well as the message to [EMAIL PROTECTED]

No. What you have above looks kosher. The message should be delivered to
spock and log. There is no message re-injection happening so the
extra.c code is only ever called once.

Can you show us the relevant log entries (don't massage them at all,
please).

 
 Now, I've pondered changing the QUEUE_EXTRA to something that would
 copy the mail directly to ~alias/msg-log. But I'm not a programmer (or even a
 very good one at that), so I tend to ask permission before messing with sources
 *snicker*.

There should be no need to do that.

 
 I'm also going to be running ezmlm mailing lists on here. Will I have the same
 problem with those?

Hopefully not if you've made the changes correctly.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Copy Outbound messages

2000-12-14 Thread Peter Samuel

On Thu, 14 Dec 2000, Charrua wrote:

 Hi , thank you for you prompt answer to my message.
 
 Excuse my lack of experience but it isn't clear to me the way the message
 copy works, my doubts are as follows:

Go back and read the man pages, examine http://www.qmail.org and
http://Web.InfoAve.Net/~dsill/lwq.html. There is a wealth of
information there just waiting for you to read it.

 
 1. Where are these messages stored?
 2. Can you give me an approximate idea of how the filter you suggest works.
 Would it be with a script?

By making the appropriate patch (as outlined in the FAQ), every
message is ALSO delivered to a local user called log. On the
assumption that you don't have a local user called log, the message
will be controlled by the contents of

~alias/.qmail-log

(Just like it says in the FAQ).

So, in ~alias/.qmail-log you would put:

| myfilter
./trapped

And myfilter would examine the message and determine if it was from,
or for the user in question and then exit 0. Then the message would be
saved in the file ~alias/trapped for you to examine at your leisure. If
the message wasn't from or for the user it would exit 99 and the
message would not be saved anywhere.

It's up to you to write myfilter, Have a look at the dot-qmail and
qmail-command man pages.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Copy Outbound messages

2000-12-13 Thread Peter Samuel

On Wed, 13 Dec 2000, Charrua wrote:

 Hi all,
 
 I have been searching the whole message list and I have not found any clear
 answer to my doubt.
 My query is as follows:
 
 I need to copy every message that goes out or that comes in to a determined
 user to another local or remote mailbox.
 I have learnt how to do it with the inbound messages but I do not know how
 to do it with the outbound messages, that is to say with the messages that
 the user sends.
 
 If anybody has any idea or any helpfull suggestion I'll be
 gratefull.  Thank you...

Have a look at the FAQ

http://cr.yp.to/qmail/faq/admin.html#copies

Then craft a suitable filter to place in ~alias/.qmail-log

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: smtproutes

2000-12-08 Thread Peter Samuel

On Fri, 8 Dec 2000, Wolfgang Zeikat wrote:

 is it possible to have more than one smtproute for the same destination
 for the case that the first relay cannot be reached? if so, how?

No. smtproutes is read in a "last best match wins" fashion. So if you
have the entries:

domain1.com:hosta.somewhere
domain1.com:otherhost.elsewhere

The first line will NEVER be used.

If you really want the fallback behaviour, then use MX records -
that's what they're for. Of course if you don't have control over the
DNS entries, then you can't control the MX records.

You could use a load balancing dns server such as Dan's pickdns from
his djbdns package.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: patch to be kind to broken MUAs that do not include host nameona sender line

2000-12-08 Thread Peter Samuel

On Fri, 8 Dec 2000, David L. Nicol wrote:
 
 Well I'll be dipped in shit.

I'll let you handle that procedure from your end :)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: patch to be kind to broken MUAs that do not include host nameona sender line

2000-12-08 Thread Peter Samuel

On Fri, 8 Dec 2000, David L. Nicol wrote:

 Peter Samuel wrote:
 
 Setting the preference to true completely does away with
 the sender field, so it is no longer an issue.
 
 This preference is not listed in
 
 http://developer.netscape.com/docs/manuals/communicator/preferences/
 
 or anywhere else I can find on the netscape pages.
 
 
 I think I might be able to define a "custom sender header" using
 the customheaders directives, but it may be too much work.

I was just quoting montgomery f. tidwell [EMAIL PROTECTED]

I've not tested it myself. It will probably depend on the version of
NS you're using. Montgomery, where did you find this information?


-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: patch to be kind to broken MUAs that do not include host nameon a sender line

2000-12-07 Thread Peter Samuel

On Thu, 7 Dec 2000, David L. Nicol wrote:

 
 a pathologially selective listserv that needs to be replaced
 brought to my attention the fact that my MUA has been inserting
 a 
  Sender: david
 line in the headers of my messages, out of accordance with rfc 850
 which apparently specifies that the host-name is supposed to go there.

This was discussed a week ago:

Date: Thu, 30 Nov 2000 19:25:32 -0800
From: montgomery f. tidwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [SOLUTION] Re: [HELP] Domain in Sender: is missing

Howdy,

ok, i found the answer.

it is indeed Netscape that is being bad, not qmail.

the solution is to add the following line to the
preferences.js file:

user_pref("mail.suppress_sender_header", true);

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: How to get Mail delivery in form cgi´s work

2000-12-07 Thread Peter Samuel

On Fri, 8 Dec 2000, Hans-Juergen Schwarz wrote:

 Hello all,
 when a form processing-cgi requieres a /path/to/mailprog I usually
 put the line /var/qmail/bin/qmail-inject in it. But is some cases it
 doesn´t work especially when the default path is /usr/bin/sendmail
 -t. It seems not to work with qmail. Is there a default way to get
 these work? I´m not really into perl and stuff.

Use qmail's sendmail wrapper

/var/qmail/bin/sendmail -t

It behaves just like

/usr/bin/sendmail -t

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: how many connections?

2000-12-06 Thread Peter Samuel

On Wed, 6 Dec 2000, Martin Volesky wrote:

 ... Qmail lacks the ability of multiple delivery per connection that
 other MTA agents (sendmail *cough*) have.

Not strictly true. When qmail-remote is called from qmail-send (via
qmail-rspawn) it is called in such a manner so that it makes one SMTP
connection per message recipient.

However, qmail-remote can be told to deliver the same message to
mulitple recipients in a single SMTP session. See the qmail-remote man
page.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Question about default message delivery.

2000-12-06 Thread Peter Samuel

On Wed, 6 Dec 2000, Kris Kelley wrote:

 How can I feed qmail-start, qmail-lspawn, and qmail-local more than one
 default delivery instruction.  My hope is to use a program, "blackbox" for
 example, that will extract information from each incoming message before it
 is saved.  A similar .qmail file would look like this:
 
|blackbox
./Maildir/
 
 After looking at the sample start-up scripts in /var/qmail/boot, I'm
 thinking my start-up line would look similar to this, assuming blackbox
 takes no arguments:
 
qmail-start '|blackbox ./Maildir/'
 
 Is this correct?  If not, how can I string together multiple default
 delivery instructions?

Close but not quite. Think of the arguments passed to qmail-start
(which hands them off to qmail-local) as the system default .qmail
file. Each delivery intruction must appear on a line of its own.

Therefore, you should run qmail-start as

... qmail-start '|blackbox
./Maildir' ...

Note the _real_ newline between each of the delivery instructions. You
can fill in the ... areas with whatever stuff is relevant for your site.

Also have a look at /var/qmail/boot/*+* for other examples.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: How to remove headers via .qmail-default file?

2000-12-04 Thread Peter Samuel

On Mon, 4 Dec 2000, Greg Larkin wrote:

 Hi,
 
 I am writing a Perl script that will remove the Disposition-Notification-To
 header from incoming email messages so the annoying return receipt alerts
 will be removed from email clients here.
 
 I have a ~alias/.qmail-default set up like this:
 
 |/var/qmail/bin/strip_return_receipt
 |/var/qmail/bin/fastforward -d /etc/aliases.cdb

qmail handles each line in a .qmail file as a complete delivery
instruction. EG if you .qmail file looks like this

| cmd1
| cmd2
addr1
./mbox1

qmail will process it as follows

pipe the original message through cmd1
pipe the original message through cmd2
forward the original message to user addr1
save the original message in mbox format in the file ./mbox1

Note the use of the word original. IE every delivery instruction gets
a copy of the ORIGINAL message to play with. if you want to massage
the message and then do something based on the modified message,
you'll need to do the following

| massge_command | delivery_instruction

So, your .qmail file would need to look like this:

| /var/qmail/bin/strip_return_receipt | /var/qmail/bin/fastforward -d /etc/aliases.cdb

You'll need to make sure that strip_return_receipt provides the
modified message on STDOUT so that fastforward can see the modified
message as its input.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: badmailfrom

2000-12-04 Thread Peter Samuel

On Mon, 4 Dec 2000, Ari Arantes Filho wrote:

 Hi,
 
 I'm receiving a virus from [EMAIL PROTECTED],

No you're not! You're receiving mail from a null address. Examine the
Return-Path:

Return-Path: 

There is no address here. qmail-smtpd only looks at the envelope
sender address (as supplied by the "mail from:" part of the
transaction). It compares the address provided here with badmailfrom.
You can't use badmailfrom to stop null addresses (and in general you
shouldn't stop them anyway because a legitimate bounce is sent with a
null sender).

Instead, you might want to prohibit mail from

200.189.209.130

instead. Of course this will stop all mail from that IP address and
you might want that other mail.


 I've already inserted this
 email in badmailfrom, the qmail was restarted and I'm still receiving this
 virus.
 
 In the header below you can see that the user doesn't exist, there is a
 3D caracter in the beginning of the email address, so the address is
 unknowm, but even inserted in badmailfrom I've receive order mails from this
 guy.
 
 Here goes the header:
 
 Return-Path: 
 Received: (qmail 14547 invoked by uid 0); 4 Dec 2000 21:26:48 -
 Received: from unknown (HELO mail01.osite.com.br) (200.189.209.130)
   by mail.doctordata.com.br with SMTP; 4 Dec 2000 21:26:48 -
 Received: from clipping (a09029.dial-pn.impsat.com.br [200.189.200.29])
 by mail01.osite.com.br (8.9.1b+Sun/8.9.3) with SMTP id SAA14499
 for [EMAIL PROTECTED]; Mon, 4 Dec 2000 18:49:02 -0200 (EDT)
 Date: Mon, 4 Dec 2000 18:49:02 -0200 (EDT)
 Message-Id: [EMAIL PROTECTED]
 From: Hahaha [EMAIL PROTECTED]
 Subject: Branca de Neve pornô!
 MIME-Version: 1.0
 
 
 

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: [HELP] Domain in Sender: is missing

2000-12-01 Thread Peter Samuel

On Thu, 30 Nov 2000, montgomery f. tidwell wrote:

 Howdy,
 
 is it possible to have qmail just remove the offending "Sender:"
 field from all outgoing emails??

Yes. No. Maybe.

It all depends on how the message is getting to qmail. As you're using
netscape, you are sending mail from netscape to the MTA via SMTP. You
could arrange for a wrapper program around qmail-queue to strip the
header. Or you could wrap qmail-remote to do the same thing.

The better question to ask is

Is it causing you grief, and if so, how?

It isn't a qmail problem, so you might be better off using a different
MUA, or you could grab Mozilla, patch it to not use Sender: and be
happy. If it's a downstream issue, can you get the downstream side to
use a different MUA?

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: [SOLUTION] Re: [HELP] Domain in Sender: is missing

2000-12-01 Thread Peter Samuel

On Thu, 30 Nov 2000, montgomery f. tidwell wrote:

 Howdy,
 
 ok, i found the answer.
 
 it is indeed Netscape that is being bad, not qmail.
 
 the solution is to add the following line to the
 preferences.js file:
 
 user_pref("mail.suppress_sender_header", true);

Excellent. Thanks for that.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Multilog

2000-11-30 Thread Peter Samuel

On Thu, 30 Nov 2000, Ari Arantes Filho wrote:

 Hi,
 
 I'm using multilog, so it write the current log in the current file. I
 like to see to current file with tail -f current, but when it switch the
 log, the tail process stops, so I need to Control-C and tail -f current
 again. I've already tried tail -f --retry current and nothing... How can I
 solve this?

Get the GNU textutils package version 2.0a or later. Use

tail -f --follow=name --retry /var/log/qmail/current

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: [HELP] Domain in Sender: is missing

2000-11-29 Thread Peter Samuel

On Wed, 29 Nov 2000, montgomery f. tidwell wrote:

 Howdy,
 
 i just noticed that mail sent out by my qmail server does
 not put my domain in to the Sender: field. it is going
 out as "Sender: mtidwell" and not "Sender:
 [EMAIL PROTECTED]"
 like it should.
 
 what have i done wrong??

Chosen to use Netscape as your MUA.

This is a known problem with Netscape and has nothing to do with
qmail. Normally it isn't a problem as well behaved MUAs will not use the
Sender: field to generate a reply address, but unfortunately some broken
systems do (I don't know off hand which ones they are). If the Sender:
field is not fully qualified, this leads to the local MTA trying to
deliver the message to:

[EMAIL PROTECTED]

instead of

[EMAIL PROTECTED]

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: The whole mail puts into the local queue?

2000-11-28 Thread Peter Samuel

On Wed, 29 Nov 2000, eric yu wrote:

 Dear all,
 
 Does anyone experienced that part or whole of the mail has been put piece by piece 
in the qmail queue's local directory (/var/qmail/queue/local/23/57890) rather than 
just the receiver's mail address??
 
 Any problems that may leads to this symptom???
 

Eric, based on the problem you were having yesterday with qmail-smtpd,
and now this one, it sounds like you have a seriously corrupted qmail
install. I'd suggest recompiling from scratch.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: The whole mail puts into the local queue?

2000-11-28 Thread Peter Samuel

On Tue, 28 Nov 2000, Kris Kelley wrote:

  Does anyone experienced that part or whole of the mail has been put piece
 by
  piece in the qmail queue's local directory
 (/var/qmail/queue/local/23/57890)
  rather than just the receiver's mail address??
 
 This is how qmail normally operates.  All messages are first placed in the
 queue before being sent out, in case the machine crashes before the SMTP
 transaction is complete.

No it isn't. qmail-queue puts only the local recipient addresses in
/var/qmail/queue/local/*/*. The message itself is placed in
/var/qmail/queue/mess/*/*.

Eric's problem is that the message is being placed in
/var/qmail/queue/local/*/* rather than just the local recipient
addresses.

I think his qmail install is severely corrupted.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: The whole mail puts into the local queue?

2000-11-28 Thread Peter Samuel

On Tue, 28 Nov 2000, Kris Kelley wrote:

 Peter Samual wrote:
 ...
  No it isn't. qmail-queue puts only the local recipient addresses in
  /var/qmail/queue/local/*/*. The message itself is placed in
  /var/qmail/queue/mess/*/*.
 
 Whoops, read too quickly.  Apologies.
 
  I think his qmail install is severely corrupted.
 
 Sounds like it.  Makes me wonder what kind of corruption can cause that.

Some weird patches incorrectly applied is my guess.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: HELP!!

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, eric yu wrote:

 Dear list,
 
 Does anyone know wht the "D" stands for under /var/qmail/queue/local??
 My problem is that let say a local recipient is [EMAIL PROTECTED] So inside the 
queue, it should have an info/1/1, local/1/1, and the mess/1/1.
 However the local/1/1 state the following strange pattern:
 
 [EMAIL PROTECTED]@machine_name.com

qmail-queue creates the local and remote recipient envelope addresses in

/var/qmail/queue/local/0..23/n
/var/qmail/queue/remote/0..23/n

The format of these files is:

Tto@someuser\0Tto@someotheruser\0Tyet@anotheruser\0\0

when qmail-send successfully delivers one of these messages, it marks
the relevant recipent as delivered by replacing the 'T' with a 'D'.
So, if the messages had been successfully sent to both
to@someuser and yet@anotheruser, but not to to@someotheruser, the file
would look like:

Dto@someuser\0Tto@someotheruser\0Dyet@anotheruser\0\0

So, in your case, as the file is in the local part of the queue I can only
assume that both domain.com and machine_name.com are both local delivery
domains and that the first recipient has been delivered successfully,
but the second recipient has been deferred or delivery has not been
attempted yet.

There are many reasons for the deferral. Obvious reasons include group
and/or other write permissions on the user's home directory and/or
.qmail file. Whatever the reason, they'll be mentioned in the qmail
logs.

What do the logs say (TM)?

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: CRON mailings

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, Paul Fontenot wrote:

 I have several scripts that run and mail the output to root for analyses.
 These scripts were using a line such as:
 
 cron_job | mail -s "Log file output" root
 
 I think I must have missed something in the docs, since making the change
 to tcpserver, qmail and Maildir from postfix I know get none of these
 mailings and when run from the command line I receive these errors:
 
 send-mail: fatal: open /etc/postfix/main.cf: No such file or directory

mail is obviously trying to call a postfix executable (or it might be
a postfix executable itself. Change the cron jobs to:

cron_job | /var/qmail/bin/mailsubj "Log file output" root

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: CRON mailings

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, Paul Fontenot wrote:

 I have several scripts that run and mail the output to root for analyses.
 These scripts were using a line such as:

It might also be a good idea to have a functioning return address.
Here's what I saw when I replied to your first message:

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

[EMAIL PROTECTED]:
Sorry, no mailbox here by that name. (#5.1.1)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: CRON mailings

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, Paul Fontenot wrote:

 You are the man. Made those changes and everything is working like a
 champ.

One of many. Glad to hear it works now.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: user not receiving email.

2000-11-27 Thread Peter Samuel

On Tue, 28 Nov 2000, eric yu wrote:

   Dear Peter,
   
   Thanks for the response.
   It doesnt show any log, because when I telnet localhost 25:
   
   mail from:[EMAIL PROTECTED]
   ok
   rcpt to:[EMAIL PROTECTED]
   550 sorry, no such user
  
  That is NOT a qmail-smtpd error message. Do you still have sendmail running?
 
 no, I'm sure I dont have sendmail running.
 
  If not, what SMTP daemon are you running?
 
 I should have qmail-smtpd running;
 
 ps auwx|grep qmail-smtpd
 root 28146  0.0  0.0  1088  324 ?SNov06   0:00 supervise qmail-smtpd
 root  7504  0.0  0.0  1364  524 pts/1S00:53   0:00 grep qmail-smtpd

That doesn't prove it is the process listening on port 25. There is NO
occurrence of the string "550" or "no such user" in the qmail source.
qmail-smtpd doesn't know (or care) about users.

How are you starting qmail-smtpd (show us the script).

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: HELP!!

2000-11-27 Thread Peter Samuel

On Tue, 28 Nov 2000, eric yu wrote:

  What is your default delivery mechanism (ie what are the arguments
  after qmail-start in your startup script?
  
  Does this user have a .qmail file, and if so what does it look like.
 
 no, actually when I do /var/qmail/bin/qmail-qread:
 
 27 Nov 2000 14:10:48 GMT  #82186  1404  sender
   done  local   [EMAIL PROTECTED]
 local   [EMAIL PROTECTED]
 
 The original mail should be *ONLY* send to user, so Unknown_user is not suppose to 
be in my user list.

This looks suspiciously like your weird smtpd program is trying to
also deliver to [EMAIL PROTECTED] If you can fix the smtpd
program (ie make it qmail-smtpd) then all should be well.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: user not receiving email.

2000-11-27 Thread Peter Samuel

On Tue, 28 Nov 2000, eric yu wrote:

  ps auxww | grep smtpd
  
  That will show which smtpd daemon is running.
 
 
 ps auwx|grep qmail-smtpd
 root 28146  0.0  0.0  1088  324 ?SNov06   0:00 supervise qmail-smtpd
 qmaild   14488  0.0  0.0  1572  440 ?S01:40   0:00 
/var/qmail/bin/qmail-smtpd

But the smtpd session you showed before was NOT qmail-smtpd. Do it
again and show us the whole session:

telnet 1.2.3.4 25
helo bozo
help
mail from: [EMAIL PROTECTED]
rcpt to: [EMAIL PROTECTED]
quit

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: user not receiving email.

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, Peter Samuel wrote:
 
 But the smtpd session you showed before was NOT qmail-smtpd. Do it
 again and show us the whole session:
 
 telnet 1.2.3.4 25
 helo bozo
 help
 mail from: [EMAIL PROTECTED]
 rcpt to: [EMAIL PROTECTED]
 quit

On the assumption that the machine in question is ws2.us.outblaze.com,
I've just done the test myself:

telnet ws2.us.outblaze.com 25
Trying 209.249.164.203...
Connected to ws2.us.outblaze.com.
Escape character is '^]'.
220 ws2.us.outblaze.com ESMTP
help
214 qmail home page: http://pobox.com/~djb/qmail.html
mail from: [EMAIL PROTECTED]
250 ok
rcpt to: [EMAIL PROTECTED]
550 sorry, no such user here
quit
221 ws2.us.outblaze.com
Connection closed by foreign host.

It says it's qmail-smtpd, and it behaves like qmail-smtpd, but it
ain't. Try recompiling qmail-smtpd and see if that changes things.

What patches, if any, are you using?

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: mailq

2000-11-27 Thread Peter Samuel

On Mon, 27 Nov 2000, Paul Fontenot wrote:

 What is the equivalent of the mailq command? Is it qmail-queue? And if so
 can I just drop it in place of mailq in my scripts?

/var/qmail/bin/qmail-qread

You need root privileges (or qmailq really) to run it.

It's output format is VERY different from mailq.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Forwarding of a whole domain

2000-11-17 Thread Peter Samuel

On Fri, 17 Nov 2000, Ruprecht Helms wrote:

 Hi,
 
 how can I configure qmail to forward mails for all users of
 a domain?

Remove the domain from /var/qmail/control/locals

Add the domain to /var/qmail/control/virtualdomains as follows:

domain.place:alias-domain_place

Create /var/qmail/alias/.qmail-domain_place-default with the following
contents:

| forward $[EMAIL PROTECTED]

Send qmail-send a SIGHUP so that it re-reads locals and virutaldomains

Organise for the MX record for domain.place to point to your box.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: forwarding an entire domain

2000-10-25 Thread Peter Samuel

On Wed, 25 Oct 2000, Barley wrote:

 Hi all,
 I am managing a mail server for a company that has two domain names serving
 the same site. They want people to be able to send them mail at either
 domain but have all mail forwarded to the first domain, one account per
 user. Is there a way to configure qmail so that if it recieves mail for
 [EMAIL PROTECTED] it automatically forwards to [EMAIL PROTECTED]? I know I
 could create an entry for each user and specify forwarding instructions
 individually, but I was hoping there was a more catch-all elegant solve that
 would automatically forward mail for new users I added to domain.com. Like
 if the system gets mail for [EMAIL PROTECTED], it automatically looks for
 [EMAIL PROTECTED] Thanks for any ideas.

Add to /var/qmail/control/rcpthosts

domain2.com

Remove domain2.com from /var/qmail/control/locals

Add to /var/qmail/control/virtualdomains

domain2.com:alias-domain1

Create /var/qmail/alias/.qmail-domain1-default

| forward $[EMAIL PROTECTED]

Send a SIGHUP to qmail-send

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: tcpserver not setting environment variable RELAYCLIENT

2000-10-18 Thread Peter Samuel

On 18 Oct 2000 [EMAIL PROTECTED] wrote:
 
 When I run:
 # tcprulescheck /etc/tcp.smtp2.cdb 127.0.0.1
 I get:
 rule :
 allow connection   
 
 Same result for any of the specific IPs also.
 
 According to what I have read, tcprulescheck should have spit out something
 indicating the use of rule 127. and an indication it is setting an environment
 variable. 
 What am I doing wrong? Sorry if this should go to another list.

You are not setting the IP address as an environment variable. Try
this instead:

TCPREMOTEIP=127.0.0.1 tcprulescheck /etc/tcp.smtp2.cdb
rule 127.:
set environment variable RELAYCLIENT=
allow connection

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: I'm trying to do something weird.... coders help needed.

2000-10-17 Thread Peter Samuel

On Tue, 17 Oct 2000, Javier Szyszlican wrote:

 HI list.
 
 I want to make the controls files (first virtualdomains) load directly from
 a mysql database.

Why?

The files read by qmail-send are read into memory and
are not read again until qmail-send is either restarted or receives a
SIGHUP. A simpler approach might be to generate virtualdomains from
your database and then send qmail-send a SIGHUP.

Other control files are read by programs such as qmail-smtpd, qmail-inject
and qmail-remote. These programs read the control files once, perform
their actions and then exit. Again a simpler approach would be to
generate these files from your database. The only problem I can see
with this method is any race conditions where files are incomplete,
but this can be avaoided by writing to a temporary file and then doing
a rename().

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: emergency phone numbers (was: Volunteers for a multilog patch?)

2000-10-16 Thread Peter Samuel

On 15 Oct 2000, Chris K. Young wrote:

 Quoted from Peter Samuel:
  - 911 is the emergency number in North America, while it is 000 in
Oz, 999 in NZ and UK etc.
 
 999 in New Zealand? Not unless you use pulse dialling! :-) (Hint: most
 phones in New Zealand do tone dialling. And rotary phones in New Zealand
 are labelled backwards to what I've seen in other places.)

That's what confused me! I've not been in NZ since 1980 and I remember
that their emergency number was the hardest to dial on a rotary phone
(like Australia's 000), I'd forgotten that their rotary phones were
backwards, hence 111 is the hardest number to dial. (Or close to it).

 
 A New Zealand station (channel 2, I think) used to screen ``Rescue 911''
 (that American programme) on TV, and some kids actually dialled 911 in
 an emergency. :-( So since then, channel 2 had another series, ``Rescue
 111''.

Similar problems in Oz.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: A bug or am I being daft?

2000-10-13 Thread Peter Samuel

On Fri, 13 Oct 2000, Ben Cody Houston wrote:

 Basically, I'm trying to deliver mail to:
 
 [EMAIL PROTECTED]
 
 so, I have an ~alias/.qmail-Bob:Hanson file... but it won't work. It will work 
 if it's ~alias/.qmail-bob:hanson - should either one work?
 
 -ben

You're begin daft :)

qmail-local will convert extensions to lowercase. From the dot-qmail
man page:

WARNING: For security, qmail-local replaces  any  dots  in ext  with
colons  before checking .qmail-ext.  For conve­ nience, qmail-local
converts any uppercase letters in ext to lowercase.

Therefore, qmail-local is looking for .qmail-bob:hanson rather than
.qmail-Bob:Hanson or even .qmail-BoB:hAnSoN etc.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: qmail-local.c bug?

2000-10-11 Thread Peter Samuel

On Wed, 11 Oct 2000, Erik Sjoelund wrote:

 It looks strange in qmail-local.c as of qmail 1.03
 
 line 648 in qmail-local.c  is written
  while ((k  i)  (cmds.s[k - 1] == ' ') || (cmds.s[k - 1] ==
 '\t'))
cmds.s[--k] = 0;
 
 
 Because  has higher precedence than ||,
 I suppose that was meant to be written was
 
 while ((k  i)  ((cmds.s[k - 1] == ' ') || (cmds.s[k - 1] ==
 '\t')))
cmds.s[--k] = 0;
 
 this could lead to strange behaviour for a  .qmail starting
 with just tabs followed by a newline. As  strange behaviour I
 mean referencing the array with index -1
 
 Sorry if I'm mistaken, please correct me if I'm wrong

Given that the dot-qmail man pages says:

...

.qmail may contain extra spaces and tabs at the end  of  a
line.  Blank lines are allowed, but not for the first line
of .qmail.

...

it's not really a bug.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: installing qmail

2000-10-10 Thread Peter Samuel

On Tue, 10 Oct 2000, Neil Grant wrote:

 
 I am trying to setup qmail but I get stuck:
 
 #make setup check
 ./compile sig_alarm.c
 In file included from /usr/include/signal.h:300,
  from sig_alarm.c:1:
 /usr/include/bits/sigcontext.h:28: asm/sigcontext.h: No such file or
 directory
 make: *** [sig_alarm.o] Error 1

Looks like you don't have the kernel header files installed on your
Linux system. On my RedHat 6.2 box

rpm -qf /usr/src/linux-2.2.14/include/asm-i386/sigcontext.h
kernel-headers-2.2.14-5.0

/usr/include/asm - ../src/linux/include/asm
/usr/src/linux - linux-2.2.14
/usr/src/linux-2.2.14/include/asm - asm-i386

Whenever you're reporting compile issues, please include the operating
system and release details. Often it's not easy to pick which
operating system you're having trouble with just from the missing
filename alone.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Volunteers for a multilog patch?

2000-10-10 Thread Peter Samuel

Last week there was much discussion (some of it even on topic :) about
making multilog rotate files on receipt of a signal.

Here's my very simple patch to make multilog rotate its current file
on receipt of SIGHUP. I have tested it under RedHat Linux 6.2 ONLY.
However, as I have used Dan's coding style (all 2 lines of it) it
should work under any systems on which multilog currently works.

My tests were fairly minimal - I hammered multilog as fast as I could
and sent it a SIGHUP. I then checked to see if it lost any data
between rotations - it didn't.

It obviously needs field testing, but I think it will allow us to
rotate based on time. All we need is a cron job to send the SIGHUP at
the appropriate time.

If you use this, please let me know how it goes. If I get positive
feedback (or no feedback at all) I'll release it in the same manner as
my tai64nunix package - ie a stripped down daemontools with only enough
to build the new multilog. This should comply with Dan's licensing
rules.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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


--- multilog.c.orig Mon Mar  6 00:21:09 2000
+++ multilog.c  Tue Oct 10 12:29:42 2000
@@ -243,6 +243,11 @@
   }
 }
 
+void rotate(void)
+{
+  fullcurrent(c);
+}
+
 int c_write(int pos,char *buf,int len)
 {
   struct cyclog *d;
@@ -561,6 +566,7 @@
   coe(fdstartdir);
 
   sig_catch(sig_term,exitasap);
+  sig_catch(sig_hangup,rotate);
 
   ++argv;
   f_init(argv);



Re: Email - Fax package?

2000-10-06 Thread Peter Samuel

On Fri, 6 Oct 2000, Brett Randall wrote:

 Hi one and all
 
 I have been asked to supply an additional function to qmail...to receive an
 e-mail to [EMAIL PROTECTED] (eg [EMAIL PROTECTED]),
 and put it into the queue for a fax program (which dials using an attached
 fax modem). Now, my guess would be to have a local concurrency of 1, and
 pipe each message (via .qmail-default) through a fax spooler...but has
 anyone actually done this, and what do you guys reckon is the best package
 to send faxes with? Alternately, is there a utility I can stick on qmail to
 do this? I know there is for sendmail somewhere...and if need be I will
 *try* and adapt it if all else fails, but any ideas? Thanks!

setup a virtual domain for fax.hillsong.com

/var/qmail/control/virtualdomains:
fax.hillsong.com:faxuser

~faxuser/.qmail-default
| decoder $DEFAULT

the decoder program should be able to extract relevant parts of the
message and send them to the fax spooler. $DEFAULT will contain the
user component of the email address which should be the phone number.
You can also overload the address to include fax header details, eg

[EMAIL PROTECTED]

decoder should have support for checking the sender's credentials so
that only authorised users can send faxes (otherwise I'll be abusing
the system to fax my Mum and Dad in Australia, and I'm sure you don't
want to pay for that :).

decoder should also remove any unwanted headers (do you really want
all those Received: headers in the fax?) and it should also know how
to handle mime decoding and ignore attachments that your fax system
doesn't understand, eg mpeg movies, MS Word documents etc).

I'm not aware of any system that does this yet. I have played around
with such a system (doesn't do the mime extraction or user credential
checking) that interfaces to mgetty+sendfax.

I've attached my code (which is sort of ugly) and will require changes
because it was coded for a specific installation where the fax modem
was on a different machine to the mailhost.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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


#!/pkgs/bin/perl -w

###
#
# Simple SMTP to FAX gateway
#
# Uses mgetty+sendfax and qmail.
#
# This program takes advantage of qmail's address overloading features.
# Mail will be addressed to one of the following:
#
#   user-fax-number@domain
#   user-fax-number-attention@domain
#
# In the user's home directory will be two dot-qmail files
#
#   ~/.qmail-fax
#   ~/.qmail-fax-default
#
# The first file will catch any incoming mail without a fax number. It
# should be a link to ~/.qmail-fax-default.
#
# The second file should contain the following details
#
#   # Any sender restrictions can be placed here
#   | /path/to/smtp2fax
#
###

require 5;
use strict;
use Mail::Header;

my $faxspool =
"rsh grizzly.ind.tansu.com.au PATH=$ENV{'PATH'} /pkgs/mgetty-1.1.17/bin/faxspool 
-q -h -";

# You might need to prefix numbers with a PABX dialout code. This only
# applies to fax numbers that contain digits. If the fax number
# contains non-digit characters, the number will be assumed to be an
# entry in ~/.faxnrs.

my $phone_prefix = "0";

# Today's date
my $today = today();

###

initialise();
my ($fax_number, $attention) = extract_fax_number();
my $header = extract_headers();

###

open(FAX, "| $faxspool -f $ENV{'SENDER'} $fax_number -");
select FAX; $| = 1;

print FAX  "EOF";
From: $ENV{'SENDER'} via smtp2fax
Attention: $attention
Date: $today

###

EOF

print FAX "From: ", $header-get("From:")
if (defined $header-get("From:"));

print FAX "Date: ", $header-get("Date:")
if (defined $header-get("Date:"));

print FAX "Subject: ", $header-get("Subject:")
if (defined $header-get("Subject:"));

print FAX "ReSent-From: ", $header-get("ReSent-From:")
if (defined $header-get("ReSent-From:"));

print FAX "ReSent-Date: ", $header-get("ReSent-Date:")
if (defined $header-get("ReSent-Date:"));

print FAX "ReSent-Subject: ", $header-get("ReSent-Subject:")
if (defined $he

Re: log only failures

2000-10-06 Thread Peter Samuel

On Fri, 6 Oct 2000, Barry Smoke wrote:

 I can't find how to log only failures
 I am using Bruce's qmail rpm, and daemontools, svscan, 
 I only want connection failures, and delivery failures in the log...
 How do I do this?

You can do it by applying appropriate filtering rules to multilog.
However, it's not going to be useful. Failure and deferral messages only
have the delivery tag:

@400039dde6360d85b15c delivery 298676: failure:

172.16.130.10_does_not_like_recipient./Remote_host_said:_550_unknown_user_[EMAIL PROTECTED]/Giving_up_on_172.16.130.10./
@400039dde56e3436fb44 delivery 298646: deferral:
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/

They don't contain any details about sender or recipient.

A better approach wuld be to log everything and then use qmailanalog
to extract the failure and deferral details. The matchup program from
qmailanalog matches message details and can show complete deferral and
failure details.

d z 970843006.580543500 970843407.818370500 970843440.506717500 11211
 [EMAIL PROTECTED] 9688 404
209.96.210.73_failed_on_DATA_command./Remote_host_said:_451_qqt_failure_(#4.3.0)/

You'll need some way of converting the tai64 timestamps to unix epoch
timestamps. Russ Allbery has such a program, as do I - see www.qmail.org
for details.

 
 Thanks,
 Barry Smoke
 Network Administrator
 Bryant Public Schools
 Bryant, AR
 

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: log only failures

2000-10-06 Thread Peter Samuel

On Fri, 6 Oct 2000, dG wrote:

 
  A better approach wuld be to log everything and then use qmailanalog
  to extract the failure and deferral details. The matchup program from
  qmailanalog matches message details and can show complete deferral and
  failure details.
  
 
 Has anyone written a decent How-To for using qmailanalog?  

The source distro comes with man pages (it's one of Dan's older
works). There's also the MATCHUP file that comes with the source
distro. Using it is not that difficult.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Volunteers for a multilog patch?

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Dave Sill wrote:
 
 It's like comparing America
 to Australia.  Why do America have to make everything back-to-front
 for us?
 
 Such as?

I'll bite that one. Here's my short list off the top of my head. In no
particular order, it's also my opinionated view, it's not accurate,
I'm not complaining (and please don't point out that I am now living
in Canada and working for a Canadian company because I know that
already :) And I don't think North Americans go out of there way just
to annoy Australians (however we Australians have been known to go out
of our way to bait North Americans - it's fun and often altogether too
easy :)

- we each drive on different sides of the road
- we describe dates differently mm/dd/yy vs dd/mm/yy
- we tell time differently, eg quarter past 9 vs quarter after
  nine
- we're metric, the USA isn't (and Canada still hasn't quite made
  up its mind yet, even after almost 30 years. And if you think
  otherwsie, why do they sell coffee/meat by the pound here?)
- and while we're on the subject of imperial measurements, a ton
  in Oz is 2400 pounds, but it's 2000 pounds in North America.
  Gallons are smaller in North America too (approx 3.5 litres compared
  with approx 4.5 litres).
- North American light switches are up for on, but in Oz they are
  down for on.
- Australian power points (or power outlets if you don't know what
  I'm talking about) all have switches on the outlet itself, not at
  the wall.
- we have different telephony infrastructure. For example in North
  America a T1 is approx 1.5Mb/s while in Australia an E1 is 2Mb/s
- 911 is the emergency number in North America, while it is 000 in
  Oz, 999 in NZ and UK etc.
- typically, North Americans have a North American centric view of
  the world, while people in Oz tend to be, on the whole, more aware
  of the rest of the world. (I know, a sweeping generalisation and North
  Americans have improved greatly since I first encountered them on
  mass in 1978).
- lots of other things

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: vacation questions

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Ben Beuchler wrote:

 I have written my own vacation program to fit in with some unusual
 configs we have here.  My question is this:  What other considerations
 in designing a good vacation program have I not thought of?  I know
 there are all sorts of ways a poorly implemented vacation program can
 cause all sorts of nasty loops.

 So far the only feature I have in place to prevent that is that it keeps
 a flat text file containing the addresses to which it has already sent
 it's vacation message.  Subsequent messages from the same sender are
 safely stored in the Maildir but not replied to.

 Any thoughts/recommendations?  Should I be looking for any special
 headers or similar thoughts?

As the author of the qmail-vacation program, let me give you a run
down of features that have been requested by me and others (and most
of them are not implemented yet).

- do you want to reply if the recipient was not mentioned in To:
  or Cc: headers?

- virtual domain handling

people want to be able to reply to messages for different
virtual domains/users

- better control of updating .qmail (my feeling is to remove this
  from qmail-vacation completely as it is dangerous). You may also
  run into duplicate delivery/reply issues. The dot-qmail man
  pages summaries this quite well in the last paragraph:

To set up independent instructions, where a  temporary  or
permanent  failure  in one instruction does not affect the others,
move each instruction into a  separate .qmail-ext file,  and  set
up a central .qmail file that forwards to all of the .qmail-exts.
Note that qmail-local can  handle any number of forward lines
simultaneously.

- do not reply to bounce or double bounce messages - eg check
  whether $SENDER is null or #@[]

- do you want to worry about messages that have been 'bounced' or
  'forwarded'. By bounce I mean that the original From: and To:
  headers remain intact, but additional Reset-From: and Resent-To:
  headers (etc) have been added.

- do you reply to $SENDER, From: or Reply-To: and which has
  precendence?

- do you want a default hard coded message just in case the text
  file is not there.

- do you want to tailor replies for specific users:

if from mum
then
print "Hi Mum, you can reach me in Canada on +1 613 368 4398"
else
print "I'm away from my mail"

- do you want a reply only mode (useful for users who no longer live
  at your site

- how do you handle very large databases of reply details. You use
  a text file, if you receive a lot of mail, processing that text
  file might be a performance hit. Would a dbm/cdb file be better?

These are some of the ideas I've been tossing around for the next
version of qmail-vacation, which I think I'll call qmail-reply because
I'd like it to do more than just be a vacation system.

--
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: vacation questions

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Charles Cazabon wrote:

 Ben Beuchler [EMAIL PROTECTED] wrote:
  I have written my own vacation program to fit in with some unusual
  configs we have here.  My question is this:  What other considerations
  in designing a good vacation program have I not thought of?  I know
  there are all sorts of ways a poorly implemented vacation program can
  cause all sorts of nasty loops.  
 
 Be very, very careful to not reply to anything which might be mailing list
 mail.  There's no truly universal way to detect it, but some heuristics
 have value.  For instance, if any of the following are true, it's likely
 mailing list mail:
 
 -Contains a "Precedence: bulk" header
 -Contains a "Mailing-List:" header
 -Return-path: appears to be a qmail/ezmlm-style VERP

Good point. qmail-vacation does the first 2 checks already.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Volunteers for a multilog patch?

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Dave Sill wrote:

 Justin Bell [EMAIL PROTECTED] wrote:
 
 can someone please tell me what Quarter of nine means, is it a quarter til,
 quarter past?
 
 It means 8:45.
 
 Oh, and US citizens are about as arrogant as the French
 
 As if *that's* possible. :-)

Ah, something we can all agree on. We all hate the French :)

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: connection refused on port 25

2000-10-05 Thread Peter Samuel

Warning. This message contains nothing humourous or off topic at all!

On Thu, 5 Oct 2000, Barley wrote:

 qmail is refusing my connection on port 25. qmail-smtpd seems to be up and
 running fine. I catted the most recent file in the log directory (not sure
 how you're supposed to use multilog) and it had a ton of lines saying:
 
 tcpserver: fatal: no IP address for 510

Something is screwed with the way you're starting qmail-smtpd from
tcpserver. tcpserver is thinking that the IP address is 510. My guess
is that 510 is the user id or group id of qmaild and you have forgotten
to put a -u or -g in front of 510.

Post your tcpserver startup script if you can't figure out where you
went wrong from my diagnosis.

 
 over and over and over. Does this have anything to do with my failure to
 connect on port 25? How can I track down why qmail is refusing connections?
 
 Thanks a lot for your help so far. The qmail community is obviously
 well-informed and knowledgable, which after working with MTA's for a while I
 can see is tough stuff to master. I look forward to poking around my
 (working ;) qmail setup and learning more.

But we're not funny!

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: connection refused on port 25

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Barley wrote:

 
  Hi,
  is there a space between -x and /etc/tcp.smtp.cdb ?
  if so, remove it. that's the only thing that looks suspicous...
 
 There sure was a space. I changed it and did a full reboot so I didn't miss
 restarting anything. No dice. Connections to port 25 still refused. :(

You define QMAILUID, but then you use QMAILDUID. Fix the typo and it
should work.


   My startup script: (/var/qmail/supervise/qmail-smtpd/run)
   #!/bin/bash
*  QMAILUID=`id -u qmaild`
   NOFILESGID=`id -g qmaild`
   exec /usr/local/bin/softlimit -m 200
 /usr/local/bin/tcpserver -v -p -x
*  /etc/tcp.smtp.cdb -u $QMAILDUID -g $NOFILESGID 0 smtp
   /var/qmail/bin/qmail-smptpd 21

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Help with my girlfriend?

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Adam McKenna wrote:

 On Thu, Oct 05, 2000 at 03:19:33PM -0700, Ihnen, David wrote:
  You know, alot of problems with the opposite sex might be easily figured if
  we had the log file...
  
  The computer doesn't say, "well, if you don't know, I'M not going to tell
  you!"
 
 strace /dev/gf0

A brave man giving himself options for servicing more than one gf. My
system has /dev/wife with no options for others. In fact, the driver
will actively hunt down other instances, kill -9 and remove all
associated files :)

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Help with my girlfriend?

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Adam McKenna wrote:

 On Fri, Oct 06, 2000 at 09:35:06AM +1000, Brett Randall wrote:
   strace /dev/gf0
  
  No, I think you've got it wrong. I think its strace /dev/gf6 at the
  moment...
 
   for i in /dev/gf*; do
   touch $i
   strip $i
   unzip
   fsck
   fsck
   fsck
   fsck
   yes
   yes
   yes
   yes
   zip
   done

/bin/false

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: To send 500,000 messages

2000-10-05 Thread Peter Samuel

On Thu, 5 Oct 2000, Henrique Pantarotto wrote:

 Hello qmail friends!
 
 I have a project that I have to send regularly 500,000 mails (it is 
 not a SPAM) to a list of users (every week or so).
 
 I have a couple of questions:
 
 1) I have searched this mailing-list and I understood that Qmail can 
 handle this demand very nicely, right?  Are those patches for "high 
 load servers" really necessary or is the default qmail distribution 
 (with concurrencyremote set to 100 or something) enough?

Depends on how big the messages are and how slow the receiving sites
are. Short messages to fast sites work best.

 
 2) Whats the best way to send the 500,000 mails?  Send a single 
 message with 500,000 destination addresses or to send 500,000 
 messages, one for each email address?

As far as the queue is concerned, one message to many recipients is
better because you only create a few files. qmail tends to be disk
bound rather than cpu or network bound (another generalisation, that's
two today). From a management point of view, it might be easier to
keep track of 500 messages to 1000 recipients each rather than one
messages to 500,000 recipients. (Insert your own sensible numbers in
here).

 
 3) If I really need to send 500,000 different messages (for custom 
 text inside the message) to the users, will this stress Qmail or will 
 it handle it okay?

The biggest bottle neck will be in getting the messages into and
out of the queue. On the assumption that a good deal of them will be
successfully delivered first time, you can completely bypass the queue
and call qmail-remote directly (see the man page, the interface is really
simple) and if the message fails, then you stick it in the queue using
qmail-inject.

You can arrange to call qmail-remote to deliver many messages (to the
same domain) at once, rather than one at a time. However, if you need
to customise each message, then you'll need to call qmail-remote
500,000 times.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: compiling under SUN Solaris 2.6

2000-09-29 Thread Peter Samuel

On Fri, 29 Sep 2000, Guillermo Villasana Cardoza wrote:

 Hello everyone.
 
 I am having problem compiling qmail in Solaris 2.6

Do you have /usr/ccs/bin in your PATH?

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: dotqmail scripting

2000-09-22 Thread Peter Samuel

On Thu, 21 Sep 2000, Eric Cox wrote:
 
 Mail is delivered to [EMAIL PROTECTED] 
 
 ~alias/.qmail-user1 contains:
 
 |script that writes a username into ~alias/.qmail-user2
 user2

It would work but it's a woefully inefficient way to do it. Especially
as qmail comes with a mechanism to do just this - /var/qmail/bin/forward.

~alias/.qmail-user1 contains:

| forward `some_script_that_generates_new_addess(es)`

See the man page.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Black hole for messages

2000-09-22 Thread Peter Samuel

On Fri, 22 Sep 2000 [EMAIL PROTECTED] wrote:

 hi!
 
 I need to set up an alias that accept's messages and discard's them.
 
 I tried setting it to /dev/null but that didn't work (gave
 Unable_to_write_/dev/null:_invalid_argument._(#4.3.0))...
 
 Does any body knows out to do this?

In the relevant .qmail file, simply have a single line (or more) of
comments:

#
# This file contains only comments. As there are no delivery
# instructions to follow, all mail to this address will be discarded.
# 

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: q: vacation message.. qmail-vacation..

2000-09-21 Thread Peter Samuel

On Fri, 2 Jun 2000, Anton PIrnat wrote:

 hi there,
 
 anyone who tried out qmail-vacation script (Peter Samuel) together with vpopmail? As 
far i can see it wont use virtual
 domains as vpopmail is used to do...

qmail-vacation does not support virtual domains. Patches are welcome.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: can't send to addresses w/ in them.

2000-09-21 Thread Peter Samuel

On Thu, 21 Sep 2000, Duane L. wrote:

 
 One of our customers is upset because he can't email his brother at
 his bigfoot address. The address has an ampersand in the username portion
 eg; DNB[EMAIL PROTECTED]  
 
 which qmail (1.03) apparently translates to "dnb^[EMAIL PROTECTED]"  and   

This looks like it is passing through the Obtuse smtpd program. That
will escape strange characters (it's own definition of strange) with
the hex code. As to where the obtuse smtpd is in the chain of mail
from your customer to his brother remains to be seen.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: dotqmail scripting

2000-09-20 Thread Peter Samuel

On 20 Sep 2000, Gary Richardson wrote:

 
 Hey,
 
 I'm still having troubles with the dotqmail scripting. I can not go
 
 |scriptname
 
 as someone suggested since my script simple prints the email address the
 message is supposed to go to. Is there some way to use variables in the .qmail
 files?
 
 I want to do something like:
 
 `scriptname`

Use this instead

| forward `scriptname`

forward is part of the qmail package. See

man -M /var/qmail/man forward

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Send a mail

2000-09-20 Thread Peter Samuel

On Wed, 20 Sep 2000, Jerry Lynde wrote:
 
 Did you run qmail-pw2u and qmail-newu ??
 If not, then even though the users are valid (meaning listed in 
 /etc/passwd) qmail doesn't know about them...
 In the default install, you should find a list of valid users in 
 /var/qmail/users/assign.
 If they're not there, either create the assign file by hand as per 
 http://Web.InfoAve.Net/~dsill/lwq.html section 3.6
 or run /var/qmail/bin/qmail-pw2u and then run /var/qmail/bin/qmail-newu.

That's not true. In a default install there are NO

/var/qmail/users/assign
/var/qmail/users/cdb

files.

qmail-lspawn will examine /var/qmail/users/cdb for any username
overrides. If it does not find a match, it will then call qmail-getpw
to interrogate the passwd database via getpwnam(3). See the qmail
pictures for a more detailed explanation of what happens.

It's a good idea to create /var/qmail/users/assign from qmail-pw2u and
then create /var/qmail/users/cdb but it is NOT mandatory.

The user's problem is almost certainly to do with the fact that he is
either delivering to a mailbox called Maildir (instead of delivering
to a maildir called Maildir/) and the existence of a directory called
Maildir/ is stopping delivery, or the Maildir/ is owned by root instead
of the correct user.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: messages on queue with no To: address

2000-09-20 Thread Peter Samuel

On Wed, 20 Sep 2000, Donovan, Laura wrote:

 Any idea how the To address ([EMAIL PROTECTED]) is not appearing in
 the message header?

Because the To: header is part of the RFC822 headers, while the delivery
involves the RFC821 "mail from:" and "rcpt to:" headers. Consider this
telnet exchange

telnet allspice 25
Trying 192.168.16.20...
Connected to allspice.e-smith.net.
Escape character is '^]'.
220 e-smith.net ESMTP
helo risotto
250 e-smith.net
RFC821  mail from: [EMAIL PROTECTED]
250 ok
RFC821  rcpt to: [EMAIL PROTECTED]
250 ok
data
354 go ahead
RFC822  Subject: no other headers here

bye now
.
250 ok 969477228 qp 26202
quit
221 e-smith.net
Connection closed by foreign host.

The message was delivered to the recipient as specified by the RFC821
rcpt to: header above. The delivery has nothing to do with the headers
that you see when you actually read the message. That's how spammers
can send mail to you, even though it looks like it should have been
sent to [EMAIL PROTECTED]

qmail will deliver the message with a Return-Path: RFC822 header that
contains the information contained in the RFC821 mail from: header.

--
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: pop3 running as...

2000-09-20 Thread Peter Samuel

On Wed, 20 Sep 2000, andy wrote:

 Just one question for y'all. 
 
 As per the "humorous" thread, none of you are obliged to answer, and if I in any way 
come off as and asshole or idiot feel free to harass me. ( Oh shit! that wasn't an 
asshole thing to say was it? )
  
 Is qmail-popup\qmail-pop3d supposed to run as root?

Yes. It needs to be able to change it's uid/gid to the
authenticated user, and only root can use the seteuid/setuid and
geteuid/getuid calls.

-- 
Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: qmail-queue wrapper (like qmail-qfilter)

2000-08-30 Thread Peter Samuel

On Wed, 30 Aug 2000, Ricardo Albano wrote:

 Any had implemented qmail-qfilter sucefully or any qmail-queue wrapper ?
 
 RDA.-
 

I have a generic qmail-queue-wrapper program. It's written in perl and
in its standard form, does nothing but add another Received header to
the message before calling the real qmail-queue. If you can program in
perl you can get it to do whatever you want. I'm using it to do header
rewrites at one site.

It should be installed with no special permissions

-rwx--x--x qmailq qmail /var/qmail/bin/qmail-queue

Program is attached.

You can also have a look at Jason Haar's scan4virus program. It too is
a perl qmail-queue-wrapper. Details at www.qmail.org.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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


#!/pkgs/bin/perl -w
#
# $Id: qmail-queue-wrapper.pl,v 1.1 2000/05/31 07:20:37 psamuel Exp $
#
# qmail-queue wrapper program.
#
# This program should be used when you wish to manipulate a mail
# message BEFORE it is placed in the queue. Possible uses include:
#
#- header rewriting
#- Firstname.Lastname replacements
#- virus scanning
#- anything else you can think of
#
# There are at least 2 ways of using this program:
#
#1) Replace the original qmail-queue with this program:
#
#   mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig
#   cp qmail-queue-wrapper /var/qmail/bin/qmail-queue
#
#Change the value of $qmailqueue below, to reflect the new name of
#the original qmail-queue program. For example
#
#   my $qmailqueue = "/var/qmail/bin/qmail-queue.orig";
#
#2) Recompile qmail with Bruce Guenter's QMAILQUEUE patch. (See
#http://www.qmail.org/qmailqueue-patch). Then any program that
#needs to use this program can be called with the environment
#variable QMAILQUEUE set to /var/qmail/bin/qmail-queue-wrapper
#
# How does it work? The interface to the real qmail-queue is simple:
#
# - the body of the message is read from file descriptor 0
# - the envelope details are read from file descriptor 1.
#
# qmail-queue-wrapper also adheres to the same interface. After doing
# whatever manipulations are necessary, it calls the real qmail-queue
# and provides the message body on file descriptor 0 and the envelope
# details on file descriptor 1.
#
# Exit codes conform to those mentioned in the qmail-queue(8) manual page.
#
###

require 5;
use strict;

my $child;
my $debug = 0;
my $envelope;
my %errors;
my @months;
my $new_received_header;
my $qmailqueue = "/var/qmail/bin/qmail-queue.orig";
my @recipients;
my $sender;

###

initialise();

if ($child = fork())
{
# Parent

my $timeout = 86400;# See qmail-queue.c, line 20

alarm($timeout);

fatal(82) unless close MESSAGE_READER;
fatal(82) unless close ENVELOPE_READER;

process_message();
process_envelope();

# Wait for the child to terminate

waitpid($child, 0);

# Return with the exit status of the child

exit($? % 255);
}
elsif (defined $child)
{
# Child

fatal(82) unless close MESSAGE_WRITER;
fatal(82) unless close ENVELOPE_WRITER;

fatal(82) unless defined open(STDIN, "MESSAGE_READER");
fatal(82) unless defined open(STDOUT, "ENVELOPE_READER");

if ($debug)
{
debug_message("$$: Reading message from STDIN\n\n");

while (STDIN)
{
debug_message("$$: $_");
}

fatal(82) unless close MESSAGE_READER;

debug_message("\n$$: \n\n");
debug_message("$$: Reading envelope from STDOUT\n");

while (ENVELOPE_READER)
{
s/\0/ /g;
debug_message("$$: $_\n");
}

fatal(82) unless close ENVELOPE_READER;

exit(0);
}
else
{
unless (exec $qmailqueue)
{
# We shouldn't be here unless the exec failed

fatal(82);
}
}
}
else
{
# Unable to fork

fatal(82);
}

###

sub initialise
{
prepare_months();
prepare_error_messages();
ignore_signals();
catch_signals();
generate_new_received_header();
setup_pipes();
}

sub prepare_months
{
@months = (
"Jan",  "Feb",  "Mar"

Re: assign multiple users

2000-08-29 Thread Peter Samuel

On Tue, 29 Aug 2000, Clemens Hermann wrote:

 Hello again,
 
 I really would appreciate it if someone could give me a short hint
 conderning my problem because I should continue adding some mail users.
 If there is no solution to the problem the way I want it it would also
 help me to know that it is impossible. In this case I really would
 appreciate it to know some alternatives to solve the problem centralized
 (not with single files in the maildirs).

You can't do it with the assign file. In essence, the assign file is
telling qmail-lspawn exactly which .qmail file to use and which user
to become when processing the message without the need for a getpwnam()
type call. You can have duplicate keys in the assign file BUT qmail-lspawn
will only use the first one. See man qmail-users(5).

What you can do is get the mail delivered to the alias user with an
entry in the assign file

=someuser:alias:400:400:/var/qmail/alias:-:someuser:

and in /var/qmail/alias/.qmail-someuser have entries of the form

user1
user2

 
 Thanks in advance
 
 Clemens
 
  Hi,
  
  I do all my qmail mailadress-configuration via the /users/assign file.
  Is it possible to get all mails to a specified adresse delivered to two
  mailboxes? I know there are possibilities e.g. .qmail files but I really
  would love it to be able to configure it in my assign file. The only
  thing I want to have is one mailadresse being delivered into two
  distinkt mailboxes.
  
  thanks in advance
  
  Clemens
 

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




Re: Timezone

2000-08-29 Thread Peter Samuel

On Tue, 29 Aug 2000, Daniel Augusto Fernandes wrote:
 
 I just want to make qmail work with my localtime. Will this make
 qmail-inject send messages with localtime 'Date:' header?
 

Now that you've told us exactly what you want to do, we can answer your
question to your satisfaction. qmail-inject will insert its own Date:
header in UTC format if, and only if, there is no existing Date:
header in its input. You cannot tell qmail-inject to use any other
timezone, no matter how hard you push $TZ.

If you want to use localtime, then use /var/qmail/bin/datemail. It has
a similar interface to /var/qmail/bin/sendmail, and it will create a
Date: header using the local timezone if, and only if, there is no
existing Date: header in its input.

Received: headers generated by qmail programs will always be in UTC
unless you patch the source.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

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




new home for qmail-vacation

2000-07-20 Thread Peter Samuel

I've received lots of requests asking where qmail-vacation has gone.

Its new home is

http://www.gormand.com.au/peters/tools

Same applies to my version of eliminate-dups.

I've asked Russell to update the www.qmail.org page but he must be busy
at present.

I'm not subscribed to the list at present - about to emigrate to Canada, so 
I have lots of things to do instead of reading mail :(

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor at present:
Gormand Pty Ltd [EMAIL PROTECTED]




Re: vacation program for qmail/vpopmail/qmailadmin

2000-06-22 Thread Peter Samuel

On Thu, 22 Jun 2000, Marco Leeflang wrote:

 i want a vacation program where vpopmail users can change their own
 vacation message
 any suggestion ??

Write up a draft design and I'll see what I can do for the next
version of qmail-vacation (I'm not familiar with vpopmail, so you'll
have to do some of the ground work).

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: qmqpc/+env docs

2000-06-18 Thread Peter Samuel

On Fri, 16 Jun 2000, mwangu wrote:

 Peter,
 
 Thank you for your response. This will come in handy. 
 The reason I was hoping there was a Perl way to do
 this, i.e. qmqpc messages into the qmail queue is for
 testing purposes for another app I am working on.

Just use qmail-inject. That call qmail-queue (which in your case will
really be qmail-qmqpc). Or, if you want to be consistent with other
sites nots using qmail, call /usr/lib/sendmail -t. That should be a
symlink to /var/qmail/bin/sendmail which calls qmail-inject which
calls qmail-queue.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: vacation

2000-06-15 Thread Peter Samuel

On Fri, 16 Jun 2000, Einar Bordewich wrote:

 I have some problems making vacation fetched from
 ftp://ftp.uniq.com.au/pub/tools/qmail/qmail-vacation-1.3.tar.gz
 
 The same problem occurs on two different machines, Intel/Suse Linux 6.3 with
 perl, v5.6.0 built for i686-linux-multi and Sparc/Solaris 7 with perl,
 version 5.005_03 built for sun4-solaris
 
 Here is the error message:
 -
 perl -c vacation.pl
 Type of arg 1 to close must be HANDLE (not HANDLE) at vacation.pl line
 477, near "MSG;"
 vacation.pl had compilation errors.
 make: *** [vacation] Error 255
 -
 
 This is "out of the tarball", and when closeMSG; on line 477 is changed to
 close MSG; it seems to work. This should be changed in the dist, if what
 I've done is correct. If not, please correct me.

That is the correct fix. The new qmail-vacation has been delayed. I've
been swamped with work and I'm moving to Canada in a couple of months.
I do plan on releasing it but I don't know when.

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: qmqpc/+env docs

2000-06-15 Thread Peter Samuel

On Thu, 15 Jun 2000, mwangu wrote:

 Could anyone please point me to some good
 documentation on how to use these to put messages in
 the queue. I already have qmqpd running using
 tcpserver and it appears to work.
 
 If it can be done using perl that would be great.

Perl is not needed.

On the client machines (ie those machines that will be sending mail
via QMQP to the server running qmqpd) do this: (DO NOT DO THIS ON THE
SERVER RUNNING qmail-qmqpd!)

1) find the IP address of the server running qmqpd. It MUST be the IP
   address. Let's assume it is 1.2.3.4

cd /var/qmail/control
cp /dev/null ./locals
echo 1.2.3.4  ./qmqpservers

2) replace qmail-queue with the QMQP client program, qmail-qmqpc

cd /var/qmail/bin
mv qmail-queue qmail-queue.orig
ln qmail-qmqpc qmail-queue

3) wait for any mail queued on the client box to be delivered:

qmail-qstat
messages in queue: 0
messages in queue but not yet preprocessed: 0

   then stop qmail-send

Now, all mail that passes through this client will be sent to the
server whose IP address is 1.2.3.4 via QMQP. 

Repeat for all your other null clients.

You might also want to set up a second box running qmail-qmqpd to
queue mail just in case your first qmqpd servier is unavailable:

On the new server running qmail-qmqpd

1)
cd /var/qmail/control
cp /dev/null ./locals
echo ":mailhost.your.domain"  ./smtproutes

On the null clients

1)
cd /var/qmail/control
cp /dev/null ./locals
echo 1.2.3.5  ./qmqpservers

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Why not inetd?

2000-06-07 Thread Peter Samuel

On Tue, 6 Jun 2000, John Gonzalez/netMDC admin wrote:

 On Tue, 6 Jun 2000, Peter Samuel wrote:
 
 I've never seen this. How? What operating system? What version of
 inetd? You've got me curious now.
 
 Regards
 Peter
 --
 
 man inetd
 
 pop3 stream tcp nowait.120 root /var/qmail/bin/tcp-env tcp-env..

Thanks for partially answering my question :) This works for linux, and
others have reported a similar mechanism for FreeBSD, however it
doesn't work for Solaris, and I'd be pretty sure it won't work for
HP/UX, OSF (or whatever Compaq are calling Digital Unix these days) and
any other commercial Unix.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Why not inetd?

2000-06-06 Thread Peter Samuel

On Mon, 5 Jun 2000, John Gonzalez/netMDC admin wrote:
 
 While i agree with Peter that tcpserver is superior, i dont want people
 getting the wrong idea of inetd.
 
 inetd by default has the above behaviour, but can be overridden in the
 configuration file to accept any number of connections.

I've never seen this. How? What operating system? What version of
inetd? You've got me curious now.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Why not inetd?

2000-06-05 Thread Peter Samuel

On Mon, 5 Jun 2000, Magnus Naeslund wrote:

 I run a relatively low traffic mailserver.
 It runs qmail smptd and pop3 from inetd.
 I hear all the time that inetd sucks, but i never hear any reasons why.
 So my question is: why does inetd sucks?

Two that immediately come to mind:

No inbuilt support for access control - it requires a helper program
such as tcpd from the tcp_wrappers program. tcpserver has this built
in.

It has a rate limiting "feature" whereby it will stop servicing a port
for 10 MINUTES if it thinks the rate of incoming connections is too
high (I have flat lined a remote inetd with qmail-remote from a 14k4
modem). tcpserver doesn't care about rate, it just cares about
simultaneous connections.

Inetd will serve UDP connections which is something tcpserver will not.

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Qmail Analog

2000-06-02 Thread Peter Samuel

On Fri, 2 Jun 2000, shaoming wrote:

 
 Hi !
 
 I'm trying to generate the stats but to no avail. I use the following
 command, is it correct?
 
 awk '{$1="";$2="";$3="";$4="";$5="";print}' /var/log/maillog |
 /usr/local/qmailanalog/bin/matchup | /usr/local/qmailanalog/bin/zoverall
 
 But it still give me the following ...
 
 Completed messages: 0
 Total delivery attempts: 0

Can you send us a few lines of your logfile /var/log/maillog. Then we
can tell you what you should be doing.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: setuid execution not allowed

2000-06-01 Thread Peter Samuel

On Fri, 2 Jun 2000, Jasper Jans wrote:

 Hi,
 
 I just installed qmail but I cant get it to run properly.
 The system is a Sun Solaris E250 running Sol 7.
 /var/adm/messages gives me this:
 May 30 04:19:41 uxtrav03 unix: NOTICE: qmail-queue, uid 100: setuid
 execution not allowed, dev=84
 May 30 04:53:11 uxtrav03 unix: NOTICE: qmail-queue, uid 333: setuid
 execution not allowed, dev=84
 May 30 05:05:00 uxtrav03 unix: NOTICE: qmail-queue, uid 0: setuid
 execution not allowed, dev=84

Looks like the file system is mounted with the nosuid option. What
does /etc/vfstab say for the /var filesystem (or whatever is the root of
the filesystem holding /var/qmail). If it has domething like

-o nosuid

then that tells the kernel not to honour the setuid bits on files. SO
even if the permissions are correct, qmail-queue will NEVER be
executed with an effective user id of qmailq.

You can also do the following

mount | grep /var

You'll need to remount the file system without the nosuid option.

BE CAREFUL. This may have other security implications on YOUR system.
I can't say what they are because I don't know what else is in your
system.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Modifying qmail-remote

2000-05-31 Thread Peter Samuel

On Wed, 31 May 2000, Jean-Baptiste Jacquemard wrote:

 Hello,
 I have moved qmail-remote to qmail-remote.real
 I made a shell script named qmail-remote, with the same permissions
 which contains:
 
 #!/bin/sh
 exec /var/qmail/bin/qmail-remote.real "$*"
 
 But when I try to send a message, I got this from Mailer Daemon:
 [EMAIL PROTECTED]:
 Unable to run qmail-remote.
 
 Any idea?

Did you read the qmail-queue man page? qmail-queue behaves differently
to "traditional" programs in that it reads from BOTH file descriptor 0
AND file descriptor 1. You need to make use of the pipe() call to call
qmail-queue. A simple exec won't work.

Have a look at Jason Haar's scan4virus package, his perl program does
the correct thing.

I too have a simple perl qmail-queue wrapper. Let me tidy it up and
I'll post it to the list. It currently does nothing, but can be used
to do whatever wrapping you feel is appropriate (provided you can
write the code to do it).

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: qmail features

2000-05-31 Thread Peter Samuel

On Tue, 30 May 2000, Dung Nguyen wrote:

 Dear all
 I am a newer with this mailing list.I've got
 qmail-1.03 and I want to migrate to qmail, so I have
 some questions about qmail features
 _ Does qmail support IMAP4 ,LDAP , MIME ? and do I

IMAPx - no. However this is a mail user agent issue and qmail is a
mail transport agent. There are patches to the UW imapd that allow it
to support qmail's Maildir/ format. There is also Courier IMAP which
is a separate imap deamon that supports Maildir/ format. Look for
pointers to these on http://www.qmail.org

LDAP - no. Andre Oppermann has some ldap patches for qmail. See
http://www.nrg4u.com

MIME - Not a qmail issue. qmail doesn't care what is in the body of
the message. It will support the 8BITMIME SMTP protocol extensions.

 need some more patches ?
 _ Does qmail have ability avoiding Junk mail (spam) ?

No mailing system does! Some can help you minimise spam but NOTHING
(apart from social change and re-education) will eliminate it. That
said, qmail has a number of mechanisms to help you deal with spam. You
can prevent specific senders and sender domains from talking to
qmail-smtpd. You can prevent unauthorised mail relaying. If you use
Dan's ucspi-tcp package to control the execution of qmail-smtpd
(recommended)_ then you can use the rblsmtpd program in that package
to block mail from sites listed with RBL, ORBS, DUL etc.

 _ Does qmail allow administrator to control the limit
 of the messsages for different users ?

Incoming, outgoing, mailbox storage? What limits do you have in mind?
Basically, no. There are quota patches for qmail.  The user quotas
problem is not really the job of the MTA.  There is a mechanism to
limit the size of incoming mail messages but it does not work on a user
level.

 Thank you very much

Also have a look at Dave Sill's excellent Life With Qmail page

http://web.infoave.net/~dsill/lwg.html

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Modifying qmail-remote

2000-05-31 Thread Peter Samuel

On Wed, 31 May 2000, Peter Samuel wrote:
 
 I too have a simple Pierl qmail-queue wrapper. Let me tidy it up and
 I'll post it to the list. It currently does nothing, but can be used
 to do whatever wrapping you feel is appropriate (provided you can
 write the code to do it).

I have attached qmail-queue-wrapper.pl. It is a generic qmail-queue
wrapper. It currently does nothing to a message except add an extra
header of the form

Received: (qmail-queue-wrapper 24590 invoked from network);
31 May 2000 07:16:44 -

It then simply hands the message over to the real qmail-queue.

If you know perl, you can modify it to do whatever you want - just
don't come crying to me if it doesn't work after you've modified it.

To install:

install perl if you haven't got it on your system
choose a non production system to test this on
choose a quiet time
save the perl file in /var/qmail/bin/qmail-queue-wrapper.pl
stop qmail-smtpd
stop qmail-qmqpd
stop qmail

cd /var/qmail/bin
vi qmail-queue-wrapper.pl

change the first line

#!/pkgs/bin/perl -w

to reflect where your perl binary really lives

chown root qmail-queue-wrapper.pl
chgrp qmail qmail-queue-wrapper.pl
chmod 755 /tmp/qmail-queue-wrapper.pl
# The wrapper program should NOT be setuid!!!
mv qmail-queue qmail-queue.orig; mv qmail-queue-wrapper.pl qmail-queue

start qmail
start qmail-qmqpd
start qmail-smtpd

There is a small chance that mail injected into the queue via
qmail-inject (and it's friends sendmail and datemail) will attempt to
call qmail-queue between the "mv" commands above. That's
why you should choose a quiet time.

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"


#!/pkgs/bin/perl -w
#
# $Id: qmail-queue-wrapper.pl,v 1.1 2000/05/31 07:20:37 psamuel Exp $
#
# qmail-queue wrapper program.
#
# This program should be used when you wish to manipulate a mail
# message BEFORE it is placed in the queue. Possible uses include:
#
#- header rewriting
#- Firstname.Lastname replacements
#- virus scanning
#- anything else you can think of
#
# There are at least 2 ways of using this program:
#
#1) Replace the original qmail-queue with this program:
#
#   mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig
#   cp qmail-queue-wrapper /var/qmail/bin/qmail-queue
#
#Change the value of $qmailqueue below, to reflect the new name of
#the original qmail-queue program. For example
#
#   my $qmailqueue = "/var/qmail/bin/qmail-queue.orig";
#
#2) Recompile qmail with Bruce Guenter's QMAILQUEUE patch. (See
#http://www.qmail.org/qmailqueue-patch). Then any program that
#needs to use this program can be called with the environment
#variable QMAILQUEUE set to /var/qmail/bin/qmail-queue-wrapper
#
# How does it work? The interface to the real qmail-queue is simple:
#
# - the body of the message is read from file descriptor 0
# - the envelope details are read from file descriptor 1.
#
# qmail-queue-wrapper also adheres to the same interface. After doing
# whatever manipulations are necessary, it calls the real qmail-queue
# and provides the message body on file descriptor 0 and the envelope
# details on file descriptor 1.
#
# Exit codes conform to those mentioned in the qmail-queue(8) manual page.
#
###

require 5;
use strict;

my $child;
my $debug = 0;
my $envelope;
my %errors;
my @months;
my $new_received_header;
my $qmailqueue = "/var/qmail/bin/qmail-queue.orig";
my @recipients;
my $sender;

###

initialise();

if ($child = fork())
{
# Parent

my $timeout = 86400;# See qmail-queue.c, line 20

alarm($timeout);

fatal(82) unless close MESSAGE_READER;
fatal(82) unless close ENVELOPE_READER;

process_message();
process_envelope();

# Wait for the child to terminate

waitpid($child, 0);

# Return with the exit status of the child

exit($? % 255);
}
elsif (defined $child)
{
# Child

fatal(82) unless close MESSAGE_WRITER;
fatal(82) unless close ENVELOPE_WRITER;

fatal(82) unless defined open(STDIN, "MESSAGE_READER");
fatal(82) unless defined open(STDOUT, "ENVELOPE_READER");

if ($debug)
{
debug_message("$$: Reading message from STDIN\n\n");

while (STDIN)
{
   

Re: Modifying qmail-remote

2000-05-31 Thread Peter Samuel

On Wed, 31 May 2000, Jean-Baptiste Jacquemard wrote:

 Yes, it works now.
 Thank you for your help, and thanks to Peter Samuel too.

It will also teach me to READ things more carefully. I thought you were
talking about qmail-queue. In fact I thought you were the person
taling about adding taglines to all messages.

Repeats to himself

"I must read things carefully"
"I must read things carefully"
"I must read things carefully"
...

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: Help adding taglines to relayed messages.

2000-05-30 Thread Peter Samuel

On Tue, 30 May 2000, Dave Potter wrote:

 Hello,
 
 I've been searching through this list's archives and haven't been able to
 find where anyone has yet attempted to do the exact same thing I'm trying
 to.
 
 What I have set up is a standalone smtp server running qmail, and its sole
 purpose is to relay mail to other machines that handle the local delivery.  
 Rather than modify configurations on each of the local servers, I'm trying
 to figure out the best way to have qmail on the relay machine call a
 custom program which will append to the body of a message a tagline that
 looks similar to Yahoo/Hotmail's taglines.
 
 Has anyone specifically done this yet?  Looking at the source files, the
 best place I could come up with for inserting my own mods to the body of
 each message is in qmail-queue.  If anyone has suggestions concerning
 putting a mod inside qmail-queue or if it should go into another file, any
 feedback would be great.  Thanks!

Write your own qmail-queue wrapper program. This should behave to the
calling program as if it was the real qmail-queue (see the qmail-queue
man page for details of the interface). After reading the message
body, append your taglines, then call the real qmail-queue.orig progam.

This is how Jason Haar's scan4virus works.

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: fastforward wierdness

2000-05-29 Thread Peter Samuel

On Fri, 12 May 2000, Peter Samuel wrote:

 I'm seeing some strange behaviour with fastforward-0.51 and qmail-1.03
 on Solaris-2.5.1. No patches applied to any DJB software.
 
[ stuff deleted ]

Basically, if fastforward was setup to call a program EG

teladm-postmaster@:
| forward\ `teladm\ $SENDER`\ \ exit\ 99,
;

It would NOT honour the 99 exit status. It would exit with 111 and
cause a deferral. This results in multiple deliveries until the
queueulifetime value is reached.

Looking at the fastforward code shows:

217  wait_pid(wstat,child);
218  if (wait_crashed(wstat))
219 strerr_die4sys(111,FATAL,"child crashed in ",arg,": ");
220 
221  switch(wait_exitcode(wstat)) {
222 case 64: case 65: case 70: case 76: case 77: case 78: case 112:
223 case 100: _exit(100);
224 case 0: break;
225 default: _exit(111);
226  }

Dan, any reason why you don't have an extra case to handle a child
whose exit status is 99?

Does anyone else consider this a bug?

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




fastforward wierdness

2000-05-11 Thread Peter Samuel
7912: bytes 831 from
[EMAIL PROTECTED] qp 17219 uid 29991
958104932.688617 starting delivery 18684: msg 227912 to local
[EMAIL PROTECTED]
958104932.688719 status: local 1/10 remote 0/20
*   958104932.776873 delivery 18684: success: did_0+0+3/
958104932.780224 status: local 0/10 remote 0/20
958104932.780599 end msg 227912

As a workaround, I can change my fastforward entries to exit with 0,
but that doesn't solve the problem.

So, why is this happening?

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: accustamp|tailocal|matchup

2000-05-04 Thread Peter Samuel

On Thu, 4 May 2000, Kins Orekhov wrote:

  
  Why not just store the logs in there accustamp or multilog form and
  convert them to localtime ONLY when you need to look at them.
 
 Because we look at them too often :)

And can't you look at them by passing them through tai64nlocal each
time? Can you spell "shell script wrapper"? :)

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: qmail needs more time to finish. Sleeping 1 second...

2000-05-04 Thread Peter Samuel

On Thu, 4 May 2000, Flemming Funch wrote:

 In all my qmail installations it often takes forever to shutdown or restart 
 qmail. I'm getting the message:
 
 "qmail needs more time to finish.  Sleeping 1 second..."

Looks like you are using Harald Hanche-Olsen's startup script. It
waits for qmail-send to die and gives messages like that quoted above
when qmail-send doesn't die quickly. qmail-send won't die until all of its
children have died. So, if you are still delivering some messages via
qmail-remote and/or qmail-local, qmail-send will wait until these
processes have finished. If they are delivering BIG messages, that can
take quite some time.

As others have suggested. If you really want to kill all the qmail
processes, send qmail-send a SIGTERM and then send all running
qmail-remote and qmail-local processes a SIGTERM.

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: accustamp|tailocal|matchup

2000-05-04 Thread Peter Samuel

On Thu, 4 May 2000, David Dyer-Bennet wrote:

 Peter Samuel [EMAIL PROTECTED] writes on 5 May 2000 at 11:56:47 +1000
   On Thu, 4 May 2000, Kins Orekhov wrote:
   
 
 Why not just store the logs in there accustamp or multilog form and
 convert them to localtime ONLY when you need to look at them.

Because we look at them too often :)
   
   And can't you look at them by passing them through tai64nlocal each
   time? Can you spell "shell script wrapper"? :)
 
 Except I don't usually look at those log files  by starting up a new
 instance of some program; I usually look at them by calling them into
 a buffer in an already-running instance of an editor.

And you editor can't read in the results of a program?

Regards
Peter
------
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




Re: accustamp|tailocal|matchup

2000-05-03 Thread Peter Samuel

On Tue, 2 May 2000, Kins Orekhov wrote:

 
 Hello people!
 
 We've been running qmail more then 6 months and have a lot of logs.
 Now I want them analyze with qmailanalog, but matchup doesn't like
 timestamps in logs because we do accustamp on logs and the tailocal it.
 
 So, what we have is:
 
 1999-11-24 17:43:07.542160 status: local 0/10 remote 0/20
 
 but matchup needs:
 
 957284032.988038 status: local 0/10 remote 0/20
 
 Is it correct? I think so cuz zoverall (or other bins from
 qmailanalog) doesn't work with first logs.
 
 So, the question is how would one use qmailanalog in that situation?

I have a patch for deamontools-0.70 that creates a new executable
called tai64nunix. It takes TAI64 timestamps and converts them to unix
epaoch time, suitable for qmailanalog. Russ Allebury has a similar
patch.

Patch follows

*** FILES.orig  Mon Mar  6 16:21:09 2000
--- FILES   Fri Mar 24 19:46:34 2000
***
*** 15,20 
--- 15,21 
  multilog.c
  tai64n.c
  tai64nlocal.c
+ tai64nunix.c
  softlimit.c
  setuidgid.c
  envuidgid.c
*** Makefile.orig   Mon Mar  6 16:21:09 2000
--- MakefileFri Mar 24 19:26:57 2000
***
*** 336,342 
  
  prog: \
  svscan supervise svc svok svstat fghack multilog tai64n tai64nlocal \
! softlimit setuidgid envuidgid envdir setlock rts matchtest
  
  prot.o: \
  compile prot.c hasshsgr.h prot.h
--- 336,342 
  
  prog: \
  svscan supervise svc svok svstat fghack multilog tai64n tai64nlocal \
! tai64nunix softlimit setuidgid envuidgid envdir setlock rts matchtest
  
  prot.o: \
  compile prot.c hasshsgr.h prot.h
***
*** 534,539 
--- 534,547 
  tai64nlocal.o: \
  compile tai64nlocal.c buffer.h exit.h fmt.h
./compile tai64nlocal.c
+ 
+ tai64nunix: \
+ load tai64nunix.o unix.a byte.a
+   ./load tai64nunix unix.a byte.a 
+ 
+ tai64nunix.o: \
+ compile tai64nunix.c buffer.h exit.h fmt.h
+   ./compile tai64nunix.c
  
  tai_now.o: \
  compile tai_now.c tai.h uint64.h
*** TARGETS.origMon Mar  6 16:21:09 2000
--- TARGETS Fri Mar 24 19:49:20 2000
***
*** 109,114 
--- 109,116 
  tai64n
  tai64nlocal.o
  tai64nlocal
+ tai64nunix.o
+ tai64nunix
  softlimit.o
  softlimit
  setuidgid.o
*** hier.c.orig Mon Mar  6 16:21:09 2000
--- hier.c  Fri Mar 24 19:55:44 2000
***
*** 15,20 
--- 15,21 
c(auto_home,"bin","multilog",-1,-1,0755);
c(auto_home,"bin","tai64n",-1,-1,0755);
c(auto_home,"bin","tai64nlocal",-1,-1,0755);
+   c(auto_home,"bin","tai64nunix",-1,-1,0755);
c(auto_home,"bin","softlimit",-1,-1,0755);
c(auto_home,"bin","setuidgid",-1,-1,0700);
c(auto_home,"bin","envuidgid",-1,-1,0755);

Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
Technical Consultantor 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"




  1   2   >