Re: MailMan/qmail - missing headers

2001-03-06 Thread Jonathan McDowell

On Wed, Mar 07, 2001 at 05:11:52AM +1300, Graham Guttocks wrote:
 I've just installed the MailMan MLM on my qmail server with
 fastforward support for /etc/aliases.  Everything seems to work fine
 except that the messages that MailMan sends out are missing some
 headers such as "Date:" and "Message-ID:".  The result is that the
 destination MTA has to fill them in.
 
 Even if MailMan doesn't provide these headers, shouldn't qmail add
 them in?  Has anyone else had this problem with MailMan?

qmail doesn't touch them as Mailman sends the messages via SMTP to
localhost rather than using qmail-inject. I've seen this problem myself
and at some point intend to hack Mailman to use qmail-inject rather than
SMTP; only my lack of any knowledge of Python has stopped me so far.

J.

-- 
   Make friends.|   Black Cat Networks Ltd
| http://www.blackcatnetworks.co.uk/
|  UK Web, domain and email hosting



Re: Changing double bounce sender from #@[] to anything else

2000-12-14 Thread Jonathan McDowell

On Thu, Dec 14, 2000 at 08:21:29AM -0600, Charles Cazabon wrote:
 Laurence Brockman [EMAIL PROTECTED] wrote:
  Is there a way to do this easily? I want to change the Mail from address of
  double bounces from #@[] to something like [EMAIL PROTECTED]
 
 You'll have to edit the qmail source to do this.  However, you probably
 shouldn't -- double bounces have to have a null envelope sender, so that
 if they are going to bounce, they get thrown away -- if you change it to

FWIW if you turn on the "sender_verify" option for Exim it thinks it
can't route mail to #@[], so won't accept mail from that sender
envelope. Or at least it does in 3.12, I don't know if later versions
treat it differently.

J.

-- 
 /\
 | minimalist tagline |
 | http://www.blackcatnetworks.co.uk/ |
 \/



Re: qmail and easy ~/.qmail-listname with majordormo?

2000-11-30 Thread Jonathan McDowell

On Thu, Nov 30, 2000 at 04:01:54AM -0800, s. champ wrote:

 i'm still trying to decide what mailing-list manager i'm going to use,
 but i've actually been thinking about going with majordomo.

You probably want to read:

http://www.eyrie.org/~eagle/faqs/mjqmail.html

then, if you haven't already. (the Using Majordomo with qmail FAQ).

J.

-- 
 Don't stop at one bug. 
  Ask me about server collocation - [EMAIL PROTECTED]



Re: How can i run multiple virtual qmail servers

2000-10-24 Thread Jonathan McDowell

On Tue, Oct 24, 2000 at 08:27:34PM +0630, [EMAIL PROTECTED] wrote:

 Can anybody tell me how can i run multiple virtual qmail servers on a
 single physical server.
 
 I m having 10 domains in my locals file and i want to run 10 different
 servers. One for each domain.

What are you trying to achieve that can't be done with one copy of
qmail?

 Is it possible to configure it ?
 
Don't see why not. Either with chroot enviroments (ideally) or qmail
compiled up 10 times with different base paths. Assuming you have 10 IP
address to bind qmail-smtpd of course.

J.

-- 
A computer program does what you tell it to do, not what you want it to 
do. 



Re: RFC: web interface to manage user dot-qmail files

2000-08-05 Thread Jonathan McDowell


On Sat, Aug 05, 2000 at 04:08:08PM -0500, Chris Hardie wrote:

 Hi folks.  I'm interested in creating a web interface to manage user
 dot-qmail files.  I'm ready to start coding :) but thought I'd would
 solicit the sagacious and smooth advice of this list about some of the
 architecture/design issues.
 
 My proposal is here: 
   http://www.summersault.com/chris/techno/qmail/dqm/proposal.html
 
 If you can do no other, help me answer these questions:
 
   -Has anyone else already done this? 

I did something similar for us (Black Cat), essentially to allow control
of forwarding to either another email address or a POP3 mailbox.
Authentication is via HTTP auth (a decision since regretted and in the
process of being corrected). The cgi is run as the correct user via a
suid wrapper. Written in Perl and a quick 'n dirty hack.

J.

-- 
 /\
 | I can only see one nipple. |
 | http://www.blackcatnetworks.co.uk/ |
 \/



Re: Forwarding local account messages to POP mailbox.

2000-07-29 Thread Jonathan McDowell


On Sat, Jul 29, 2000 at 05:58:54PM +0100, Paul Broadwith wrote:
 
 I have Hylafax set up on my server. I sent faxes from my username of paulb. 
 Whenever a fax is sent, Hylafax notifies me by email to my local machine 
 account, i.e. a message is sent to:
 
   [EMAIL PROTECTED]
 
 These messages sit in the local queue. I need to have them forwarded to:
 
   [EMAIL PROTECTED]
 
 Where I can pick them up via POP3.
 
 Any ideas?

Um, create a .qmail on machine in ~paulb containing
"[EMAIL PROTECTED]"? Or a .qmail-paulb in ~alias if ~paulb doesn't
exist?

J.

-- 
 A conscience can sometimes be a pest.
  Ask me about server colocation - [EMAIL PROTECTED]



Re: .qmail questions

2000-05-06 Thread Jonathan McDowell


On Fri, May 05, 2000 at 05:20:25PM -0700, Chris Hanlon wrote:
 Is there anyway to restrict which users/groups can execute commands
 via the | option in there .qmail file?  I realise that the problem
 could be solved by not giving users access to the .qmail file but this
 is not always an option.

I changed qmail to use a modified smrsh from sendmail instead of /bin/sh
- this allows you to say that users can only execute programs that
you've enabled. It works on a system wide level rather than a user/group
level though.

J.

-- 
He's weird? It's ok, I'm fluent in weird.
This .sig was brought to you by the letter G and the numbers 5  20
Product of the Republic of HuggieTag



Re: how to keep junk rejected by rblsmtpd

2000-05-02 Thread Jonathan McDowell


On Tue, May 02, 2000 at 07:19:29PM +0800, Martin Dougiamas wrote:

 So, I would love to have a solution that:
  
- collects the whole message
- sends a bounce to sender (as rblsmtpd is already doing)
- adds an X-junkmail header to the rejected messages
- forwards this modified mail to the original recipients
 
 so that I can SEE what is being rejected for a while.

I don't think what you want to do is possible with rblsmtpd, but you can
certainly do the last 2 things with my X-Spam-Warning patch, linked off

http://www.earth.li/~noodles/programming.html

You could run this for a while and check how many false positives you
receive and then decide what lists to bounce on.

I don't see how you can generate a proper bounce message in the SMTP
conversation *and* receive the mail.

J.

-- 
   It's deja-vu all over again. |   Black Cat Networks Ltd
| http://www.blackcatnetworks.co.uk/
|  UK Web, domain and email hosting



X-Spam-Warning: header patch

2000-04-29 Thread Jonathan McDowell

I finally sorted out and fixed my X-Spam-Warning header patch. It adds
warning headers for ORBS, RSS, RBL and DUL without the use of any
external programs. It's against a Debianized 1.02 source tree, but is
fairly trivial so I imagine it'll easily apply to 1.03.

Linked off http://www.earth.li/~noodles/programming.html if anyone's
interested.

J.

-- 
 /\
 |  Ships log... erm... one.  |
 | http://www.blackcatnetworks.co.uk/ |
 \/



Re: backup mail server

2000-04-18 Thread Jonathan McDowell


On Tue, Apr 18, 2000 at 08:55:46AM -0600, Andy Bradford wrote:
 Thus said Gabriel Ambuehl on Tue, 18 Apr 2000 14:58:00 +0300:
 
  Do you mean this seriously? I can't see a problem with a secondary
  which is using exactly the same config (we normally clone our
  systems as the first one except for the lack of the entries in local
  or virtual... As long as your primary doesn't go any longer than
  just a few minutes, you surely don't need a secondary, but if the
  hardware fails, it's possible that it will be down such long
  (depends highly on the admins, available spare system etc.) that
  some mails bounce...
 Yes seriously.  Most MTA's will queue email for at least 3 days, so
 unless your hardware failure lasts that long then you should be fine.

Secondary MX can come in handy when you lose routing to parts of the
world, but your secondary MX doesn't and can still talk to you. At one
point last year JaNET in the UK lost transatlantic bandwidth (we love
you Teleglobe, no really) but my main email address at the time
continued to receive mail as the secondary MX was outside JaNET but
within the UK.

On the other hand I'd be incredibly careful about who I trusted enough
to secondary MX a domain for me.

J.

-- 
] http://www.earth.li/~noodles/ [] "It only counts as a lie-in if you  [
] PGP/GPG Key @ keys.pgp.net or [] don't get dressed before tea time." [
] finger [EMAIL PROTECTED] []  -- Steve Willison  [
] PGP: 4DC4E7FD / GPG: 5B430367 [] [



Re: RFC: Qmail Anti-Spam HOWTO

2000-04-11 Thread Jonathan McDowell


On Tue, Apr 11, 2000 at 12:35:52AM +0100, Jonathan McDowell wrote:
 
 Except it doesn't. Closer examination reveals it's failing on the test
 to make sure we ip_scaned the entire string, but I can't see why.
snip
 +  if (!remotehost[ip_scan(remotehost, ip)]) {

Except that should be remoteip, not remotehost.

Doh.

Sorry if I wasted anyones time.

J.

-- 
] http://www.earth.li/~noodles/ []  What have you got in your pocket?  [
] PGP/GPG Key @ keys.pgp.net or [] [
] finger [EMAIL PROTECTED] [] [
] PGP: 4DC4E7FD / GPG: 5B430367 [] [



Re: RFC: Qmail Anti-Spam HOWTO

2000-04-10 Thread Jonathan McDowell


On Tue, Apr 04, 2000 at 12:24:55PM +0100, Will Harris wrote:
  However it doesn't explain how to do do what I want. I want to check
  all incoming messages to see if they're on DUL, ORBS, RSS, RBL or
  whatever and if so add a header to the message, say an
  "X-Spam-Warning: DUL" or the like. I know this is a trivial one line
  config option for Exim, but I haven't seen anything for qmail to do
  this.
 
 I've written a system-wide mail filtering program I implemented that
 checks RBL, RSS, ORBS, and DUL.
snip details
 It also uses a small 4 line patch to qmail's received.c file to insert
 an X-Remote-IP header.

Ok, I've taken a look at what you've done and the flame antispam patch
and come up with the attached, which I think should do what I want.

Except it doesn't. Closer examination reveals it's failing on the test
to make sure we ip_scaned the entire string, but I can't see why.

Anyone any hints for debugging qmail patches?

J.

-- 
Is it real, or is it Mimozine?


diff -ruN qmail-1.02/Makefile qmail-1.02-new/Makefile
--- qmail-1.02/Makefile Fri May  1 05:23:28 1998
+++ qmail-1.02-new/Makefile Sat Apr  8 17:45:31 2000
@@ -1310,10 +1310,12 @@
 
 qmail-qmqpd: \
 load qmail-qmqpd.o received.o now.o date822fmt.o qmail.o auto_qmail.o \
-env.a substdio.a sig.a error.a wait.a fd.a str.a datetime.a fs.a
+env.a substdio.a sig.a error.a wait.a fd.a str.a datetime.a fs.a \
+stralloc.a alloc.a dns.o ip.o
./load qmail-qmqpd received.o now.o date822fmt.o qmail.o \
-   auto_qmail.o env.a substdio.a sig.a error.a wait.a fd.a \
-   str.a datetime.a fs.a 
+   auto_qmail.o dns.o ip.o ipalloc.o env.a substdio.a sig.a \
+   error.a wait.a fd.a \
+   str.a datetime.a fs.a stralloc.a alloc.a `cat dns.lib`
 
 qmail-qmqpd.0: \
 qmail-qmqpd.8
@@ -1330,9 +1332,9 @@
 getln.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a \
 str.a fs.a auto_qmail.o
./load qmail-qmtpd rcpthosts.o control.o constmap.o \
-   received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
+   received.o date822fmt.o now.o qmail.o ipalloc.o cdb.a fd.a wait.a \
datetime.a open.a getln.a sig.a case.a env.a stralloc.a \
-   alloc.a substdio.a error.a str.a fs.a auto_qmail.o 
+   alloc.a substdio.a error.a str.a fs.a auto_qmail.o  dns.o ip.o `cat dns.lib`
 
 qmail-qmtpd.0: \
 qmail-qmtpd.8
@@ -1496,7 +1498,7 @@
timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \
received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
-   alloc.a substdio.a error.a str.a fs.a auto_qmail.o  `cat \
+   alloc.a substdio.a error.a str.a fs.a auto_qmail.o dns.o `cat dns.lib` `cat \
socket.lib`
 
 qmail-smtpd.0: \
diff -ruN qmail-1.02/dns.c qmail-1.02-new/dns.c
--- qmail-1.02/dns.cFri May  1 05:23:28 1998
+++ qmail-1.02-new/dns.cSat Apr  8 13:52:38 2000
@@ -219,9 +219,10 @@
 
 #define FMT_IAA 40
 
-static int iaafmt(s,ip)
+static int iaafmt(s,ip,dom)
 char *s;
 struct ip_address *ip;
+const char *dom;
 {
  unsigned int i;
  unsigned int len;
@@ -233,7 +234,7 @@
  i = fmt_ulong(s,(unsigned long) ip-d[1]); len += i; if (s) s += i;
  i = fmt_str(s,"."); len += i; if (s) s += i;
  i = fmt_ulong(s,(unsigned long) ip-d[0]); len += i; if (s) s += i;
- i = fmt_str(s,".in-addr.arpa."); len += i; if (s) s += i;
+ i = fmt_str(s,dom); len += i; if (s) s += i;
  return len;
 }
 
@@ -243,8 +244,8 @@
 {
  int r;
 
- if (!stralloc_ready(sa,iaafmt((char *) 0,ip))) return DNS_MEM;
- sa-len = iaafmt(sa-s,ip);
+ if (!stralloc_ready(sa,iaafmt((char *) 0,ip,".in-addr.arpa."))) return DNS_MEM;
+ sa-len = iaafmt(sa-s,ip,".in-addr.arpa.");
  switch(resolve(sa,T_PTR))
   {
case DNS_MEM: return DNS_MEM;
@@ -260,6 +261,34 @@
  return 0;
 }
   }
+ return DNS_HARD;
+}
+
+int dns_maps(ip,suffix)
+struct ip_address *ip;
+char *suffix;
+{
+ int r;
+ stralloc *sa;
+
+ /*
+  * Ok, look for a CNAME or A record.
+  */
+ if (!stralloc_ready(sa, iaafmt(NULL, ip, suffix)))
+  return DNS_MEM;
+ sa-len = iaafmt(sa-s, ip, suffix);
+ switch(resolve(sa, T_A)) {
+  case DNS_MEM: return DNS_MEM;
+  case DNS_SOFT: return DNS_SOFT;
+  case DNS_HARD: return DNS_HARD;
+ }
+ while ((r = findip(T_A)) !=2) {
+  if (r == DNS_SOFT)
+return DNS_SOFT;
+  if (r == 1)
+return 0;
+ }
+
  return DNS_HARD;
 }
 
diff -ruN qmail-1.02/received.c qmail-1.02-new/received.c
--- qmail-1.02/received.c   Fri May  1 05:23:28 1998
+++ qmail-1.02-new/received.c   Sat Apr  8 13:55:29 2000
@@ -3,6 +3,8 @@
 #include "now.h"
 #include "datetime.h"
 #include "date822fmt.h"
+#include "dns.h"
+#include "ip.h"
 #include "received.h"
 
 static int issafe(ch) char ch;
@@ -47,6 +49,20 @@
 char *helo;
 {
   struct datetime dt;
+  struct ip_address ip;
+
+  if (!remotehost[ip_scan(remotehost, ip)]) {
+switch(dns_maps(ip,".rbl.maps.vix.com.")) {
+  case 0:
+qmail_puts(qqt,"X-Spam-Warning: ");
+safeput(qqt, remotehost);
+

Re: RFC: Qmail Anti-Spam HOWTO

2000-04-03 Thread Jonathan McDowell


On Mon, Apr 03, 2000 at 04:07:43PM -0500, Chris Hardie wrote:
 
 In response to the "Poor Documentation of Anti-Spam Options" thread
 (that I started) and ones like it on the mailing list, I've written
 what I hope is the most comprehensive document available on anti-spam
 methodologies from a qmail perspective.
 
   http://www.summersault.com/chris/techno/qmail/qmail-antispam.html
 
 I think it would be great to have a definitive resource on the topic
 that could be available from the main Qmail page, and I think this is
 a pretty good start, so I'd like your feedback and suggestions for
 improvement.  (There is a comment section on the page itself, but if
 you can send your comments to me/the list until it gets refined a
 little, that would be great.)  Biased perspectives, spelling errors,
 bad syntax, poor form, missing info; I want it all!  :)

Looks good from the brief skim I've just taken through it - bookmarked.
;)

However it doesn't explain how to do do what I want. I want to check all
incoming messages to see if they're on DUL, ORBS, RSS, RBL or whatever
and if so add a header to the message, say an "X-Spam-Warning: DUL" or
the like. I know this is a trivial one line config option for Exim, but
I haven't seen anything for qmail to do this.

I know I could do something with procmail, but I want this to work even
for mail that's being forwarded or stored in a Maildir or whatever,
without the user having to do anything special.

Anybody any ideas?
 
J.

-- 
] http://www.earth.li/~noodles/ [] ///\oo/\\\ There are no more bugs.  [
] PGP/GPG Key @ keys.pgp.net or []///\oo/\\\ ///\oo/\\\[
] finger [EMAIL PROTECTED] [] [
] PGP: 4DC4E7FD / GPG: 5B430367 [] [



Re: Example Please

2000-03-10 Thread Jonathan McDowell


On Fri, Mar 10, 2000 at 10:16:27AM +, Christopher Tarricone wrote:
 How would I setup and alias to someones pager
 ([EMAIL PROTECTED]) without creating a local account
 to forward the mail from. Or can I not do that. I am new to qmail.. In
 sendmail I just added the line to /etc/alliases and was done with
 it...

You want to create a .qmail-foo file in ~alias that contains

[EMAIL PROTECTED]

as the only line. This will forward all mail to foo@yourdomain to
[EMAIL PROTECTED]

J.

-- 
Programmer, |  Conscience is the fear of getting  | Tel/SMS (Orange):
student and |   caught.   |  +44-7974-678646
BHMF.   | | Made by HuggieTag 



Re: Virtual Domain Problems

1999-12-20 Thread Jonathan McDowell


On Tue, Dec 21, 1999 at 03:15:26AM +1100, J Torres wrote:
 
 I have attempted to setup a virtual domain for a customer of ours...
 below is a list of files and their contents.  After the changes were
 made to the control files qmail-smtpd was hupped using svc -h
^^^
 /var/qmail/supervise/qmail-smtpd. 

snip
  
 response when mail is sent to [EMAIL PROTECTED]:
  
 Hi. This is the qmail-send program at ns1.guamcell.net.
  ^^
 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. Although I'm listed as a best-preference MX or A for that host,
 it isn't in my control/locals file, so I don't treat it as local. (#5.4.6)

Have you tried restarting qmail-send?
  
J.

-- 
If I throw a stick, will you leave?



smrsh/preventing users running programs in qmail dotfiles.

1999-12-11 Thread Jonathan McDowell

Hi.

I've only recently started using qmail. I've been looking for a way to
stop users running programs in their .qmail files, or preferably to just
allow them to run certain programs, like you can do with smrsh from
sendmail. Is this possible or should I just hack the qmail source to use
smrsh instead of /bin/sh?

TIA,
J.

-- 
] http://www.earth.li/~noodles/ []  A computer program does what you   [
] PGP Key @ keys.pgp.net or [] tell it to do, not what you want it [
] finger [EMAIL PROTECTED] []   to do.[