Re: [vchkpw] Re: qmail system alias

2003-08-08 Thread Peter Palmreuther
Hi Kenneth,

On Fri, 8 Aug 2003 17:48:15 +0800 Kenneth Ling wrote:

>> why '[EMAIL PROTECTED]' /NEVER/ can be a /SYSTEM ALIAS/ when
>> 'domain1.com' is set up as 'virtual domain' (maybe you already see
>> something contrary here: "VIRTUALDOMAIN" vs. "SYSTEM [alias]"?!?!)

> yes, I know that...
> my purpose on this system alias.. maybe I can create one system alias
> address for all the vitual domain ..

I try to repeat it in simple words: you *can't* /SYSTEM ALIAS/ a
/VIRTUAL DOMAIN/. Got it? If you want an alias for an address in a
virtual domain you have to put the alias dot-qmail file to where the
domain resist.
If you want one and the same username part being an alias in multiple
domains you have to create multiple files unless the domains are already
aliased to each other (vaddaliasdomain vs. vadddomain).

/SYSTEM/ != /VIRTUAL DOMAIN/.
-- 
Ciao,
 Pit



Re: [vchkpw] 5.3.24 and Delivered-To header

2003-08-08 Thread Tom Collins
On Thursday, August 7, 2003, at 06:01  PM, Charles Sprickman wrote:
It looks like the Delivered-To problem has returned:

Delivered-To: [EMAIL PROTECTED]

I wasn't seeing this under 5.3.21...
I assume this is with a catchall...  Here's a patch to address that 
problem.  I'm also considering going through all of the code that 
writes a Delivered-To header, and changing it to use this routine.  
vdelivermail uses multiple methods of building that header, and I'm not 
sure if all cases work properly.

--- vpopmail-5.3.24/vdelivermail.c  Sun Aug  3 08:02:14 2003
+++ vpopmail-5.3.25/vdelivermail.c  Fri Aug  8 13:24:31 2003
@@ -567,27 +566,44 @@
 /* must be an email address */
 } else {
   char *dtline;
-  char *tstr;
+  char *atpos;
+  int dtlen;
 
-qmail_inject_open(address);
-write_fd = fdm;
-inject = 1;
+  qmail_inject_open(address);
+  write_fd = fdm;
+  inject = 1;
 
-/* use the DTLINE variable, but skip past the dash in 
- * [EMAIL PROTECTED] 
- */
+  /* use the DTLINE variable, but skip past the dash in 
+   * [EMAIL PROTECTED] 
+   */
 
-if ( (dtline = getenv("DTLINE")) != NULL ) {
-while (*dtline!=0 && *dtline!=':' ) ++dtline;
-while (*dtline!=0 && *dtline!='-' ) ++dtline;
-if ( *dtline != 0 ) ++dtline;
-for(tstr=dtline;*tstr!=0;++tstr) if (*tstr=='\n') *tstr=0;
-} else {
-if (*address=='&') ++address;
-dtline = address;
-}
-snprintf(DeliveredTo, sizeof(DeliveredTo), 
-"%sDelivered-To: %s\n", getenv("RPLINE"), dtline);
+  if ( (dtline = getenv("DTLINE")) != NULL ) {
+dtlen = strlen(dtline);
+/* make sure dtline is at least as long as "Delivered-To: " */
+if (dtlen < 15) {
+  dtline = NULL;
+} else {
+  dtline += 14;  /* skip "Delivered-To: " */
+  dtlen -= 14;
+  atpos = strchr (dtline, '@');
+  /* ex: dtline = "[EMAIL PROTECTED]"
+   * dtlen = 25, atpos = dtline+14
+   * add 25 - 14 - 1 = 10 bytes to dtline,
+   * now points to "[EMAIL PROTECTED]".
+   */
+  if (atpos != NULL) {
+dtline += (dtlen - (atpos - dtline) - 1);
+  }
+}
+  }
+  if (dtline == NULL) {
+if (*address=='&') ++address;  /* will this case ever happen? */
+snprintf(DeliveredTo, sizeof(DeliveredTo), 
+  "%sDelivered-To: %s\n", getenv("RPLINE"), address);
+  } else {
+snprintf(DeliveredTo, sizeof(DeliveredTo), 
+  "%sDelivered-To: %s", getenv("RPLINE"), dtline);
+  }
 }
 
 #ifdef MAKE_SEEKABLE


Note that this patch also addresses a problem the old method had with 
domain names containing "-".

I'll be placing the patch on SourceForge, and adding it to the next 
vpopmail release.  Please provide feedback -- it's done well with 
limited testing on my development box.

It works by skipping the 14-character "Delivered-To: " part of the 
header as qmail sets it.  It converts the trailing newline to a

--
Tom Collins
[EMAIL PROTECTED]
http://sniffter.com/ - info on the Sniffter hand-held Network Tester


Re: [vchkpw] 5.3.24 and Delivered-To header

2003-08-08 Thread Jeff Hedlund
Charles Sprickman wrote:
Hi all,

It looks like the Delivered-To problem has returned:

Delivered-To: [EMAIL PROTECTED]

I wasn't seeing this under 5.3.21...
What's the problem that has returned?

Isn't that the correct delivery to line (at least for the way vpopmail 
has handled it, [EMAIL PROTECTED])?

Perhaps I missed a thread on the previous problem...

Jeff




RE: [vchkpw] Re: Need advise on secondary mail server for backup purpose.

2003-08-08 Thread Kenneth Ling
create a file call "queuelifetime" at your control folder...
and a value of second...



-Original Message-
From: Kuan Yik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 9:46 AM
To: [EMAIL PROTECTED]; Cream[DONut]
Subject: Re: [vchkpw] Re: Need advise on secondary mail server for
backup purpose.


thanks for your guys information. But, with standard settings it should keep
trying for 5 days, then give up and which file I should configure if I want
to customize it?

- Original Message -
From: "Cream[DONut]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 06, 2003 6:10 PM
Subject: Re: [vchkpw] Re: Need advise on secondary mail server for backup
purpose.


> At 18:05 06-08-2003 +0800, you wrote:
>
> >my mailserver1 has been configured properly and it is up and running
without
> >any problem. Just do not have the idea of setting up and backup mail
server.
>
> It isnt really a vpopmail issue, it is a Qmail issue.
>
> You put it in rcpthosts on mailserver2, that means it will recive mail for
> that domain, since it isnt in the local domains, or virtualdomains, it
cant
> deliver it locally, and will try to deliver it remotely.
> - with standard settings it should keep trying for 5 days, then give up
> - you dont need vpopmail installed, just a plain Qmail server
>
> (somebody please correct me if im wrong)
>
>
>
>






[vchkpw] Bug in 5.3.20

2003-08-08 Thread vpopmail
After pulling my hair out attempting to figure out why password learning
did not work, I looked at vchkpw.c to see what the problem was. It appears
someone left a #ifdef FOOB write before password learning effectively
disabling that feature. I simply removed the ifdef and recompiled and it
worked. Just thought I should let someone know.

--- vchkpw.c-orig   Tue Aug  5 15:55:53 2003
+++ vchkpw.cTue Aug  5 16:04:03 2003
@@ -403,7 +403,6 @@
 #endif


-#ifdef FOOB
 #ifdef ENABLE_LEARN_PASSWORDS
   /* check for a valid vpopmail passwd field */
   if ( vpw->pw_passwd==NULL||vpw->pw_passwd[0]==0) {
@@ -420,7 +419,6 @@
   TheName, IpAddr, LogLine);
 vchkpw_exit(15);
   }
-#endif
 #endif




RE: [vchkpw] Re: qmail system alias

2003-08-08 Thread Kenneth Ling

> Why is it bouncing?
> Beside this: if you set up 'domain1.com' being handled as 'virtual
> domain' and told vpopmail to take care of it it's quite normal and
> intended that '/var/qmail/alias/.qmail-...' will not work for this
> domain. That's what the domains directory is for.
> Once again: you set the domain up with 'vadddomain', you therefore
> told qmail how to handle this domain. Why should qmail look in the
> 'fall back' location for delivery instructions?
> Get a clue how qmail-send and qmail-local works, read how
> 'virtualdomains' and '/var/qmail/users/cdb' (binary version of
> 'assign') is used by qmail. And than recognize why an alias for
> '[EMAIL PROTECTED]' needs to be defined in
> '~vpopmail/domains/domain1.com/' and why '[EMAIL PROTECTED]' /NEVER/
> can be a /SYSTEM ALIAS/ when 'domain1.com' is set up as 'virtual
> domain' (maybe you already see something contrary here:
> "VIRTUALDOMAIN" vs. "SYSTEM [alias]"?!?!)

yes, I know that...
my purpose on this system alias.. maybe I can create one system alias
address for all the vitual domain ..