Hi All

2008-04-27 Thread Mario Remy Almeida
I have recently setup a new qmail-ldap server

my problem is when i sent an email to gmail, Gmail markes it as spam

what could be the problem?

Thanks and Regards,
Remy

cpu usage

2008-09-10 Thread Mario Remy Almeida
Hi All,

I need some help on cpu usage.

my qmail-smtp daemon uses 100% of cpu usage 

can someone help me to figure out my configurations.

CPU = Intel(R) Pentium(R) 4 CPU 3.20GHz
RAM = 244072 kB

Regards,
Remy



Re: cpu usage

2008-09-10 Thread Mario Remy Almeida
Hi Russ,

Thanks for that advice,

I have enabled LOGLEVEL=16 in the tcprules


Will let you know what do i get,

Regards,
Mario

On Wed, 2008-09-10 at 19:48 -0400, russ wrote:

> Mario Remy Almeida wrote:
> > Hi All,
> >
> > I need some help on cpu usage.
> >
> > my qmail-smtp daemon uses 100% of cpu usage 
> >
> > can someone help me to figure out my configurations.
> >
> > CPU = Intel(R) Pentium(R) 4 CPU 3.20GHz
> > RAM = 244072 kB
> >
> > Regards,
> > Remy
> >
> >   
> I've seen this once when someone set up their own auto response that was 
> responding to his account, in a loop. Turn on logging and see what is 
> going on. You may have a very simple issue on your hands.
> 
> Russ


Re: cpu usage

2008-09-11 Thread Mario Remy Almeida
erver: pid
29209 from 10.200.4.165
Sep 11 09:24:55 isaaviation smtpd: 1221125095.888231 tcpserver: ok 29209
0:10.200.2.185:25 :10.200.4.165::57408


#


Regards, 
Mario

On Wed, 2008-09-10 at 19:48 -0400, russ wrote:
> Mario Remy Almeida wrote:
> > Hi All,
> >
> > I need some help on cpu usage.
> >
> > my qmail-smtp daemon uses 100% of cpu usage 
> >
> > can someone help me to figure out my configurations.
> >
> > CPU = Intel(R) Pentium(R) 4 CPU 3.20GHz
> > RAM = 244072 kB
> >
> > Regards,
> > Remy
> >
> >   
> I've seen this once when someone set up their own auto response that was 
> responding to his account, in a loop. Turn on logging and see what is 
> going on. You may have a very simple issue on your hands.
> 
> Russ



Re: cpu usage

2008-09-11 Thread Mario Remy Almeida

Hi Russ,

There is no problem if kernel allows qmail-smtpd for 100% cpu usage but
the load average should not go high. which means there are more request
waiting for the processor.


Please help me with this issue

Below is the output of top and vmstat.


Output of  *** TOP ***


 12:15:53  up 37 days,  5:10,  4 users,  load average: 32.13, 31.24,
30.32
156 processes: 123 sleeping, 33 running, 0 zombie, 0 stopped
CPU states:  cpuusernice  systemirq  softirq  iowaitidle
   total   98.5%1.1%0.2%   0.0% 0.0%0.0%0.0%
   cpu00   98.6%0.7%0.5%   0.0% 0.0%0.0%0.0%
   cpu01   98.4%1.5%0.0%   0.0% 0.0%0.0%0.0%
Mem:   244072k av,  234236k used,9836k free,   0k shrd,   34580k
buff
 74336k actv,   10812k in_d,1744k in_c
Swap: 1052248k av,   30248k used, 1022000k free   42360k
cached

  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
COMMAND
26509 root  25   0   180  180   104 R 3.9  0.0  54:16   1
qmail-smtpd
27131 root  25   0   180  180   104 R 3.9  0.0  35:45   0
qmail-smtpd
27939 root  25   0   180  180   104 R 3.9  0.0  26:53   1
qmail-smtpd
28198 root  25   0   180  176   104 R 3.9  0.0  24:13   0
qmail-smtpd
28307 root  25   0   180  180   104 R 3.9  0.0  23:43   0
qmail-smtpd
29099 root  25   0   188  188   112 R 3.9  0.0  16:32   1
qmail-smtpd
29460 root  25   0   268  268   192 R 3.9  0.1  14:32   1
qmail-smtpd
29540 root  25   0   264  264   192 R 3.9  0.1  13:47   0
qmail-smtpd
30162 root  25   0   268  268   192 R 3.9  0.1   9:36   1
qmail-smtpd
32114 root  25   0   448  448   372 R 3.9  0.1   2:05   1
qmail-smtpd
28777 root  25   0   188  188   112 R 3.7  0.0  19:00   1
qmail-smtpd
30403 root  25   0   268  268   192 R 3.6  0.1   8:43   1
qmail-smtpd
30390 root  25   0   268  268   192 R 3.1  0.1   8:35   0
qmail-smtpd
26009 root  25   0   180  180   104 R 2.9  0.0  91:38   1
qmail-smtpd
26236 root  25   0   176  176   104 R 2.9  0.0  70:51   0
qmail-smtpd
26434 root  25   0   176  176   104 R 2.9  0.0  57:30   0
qmail-smtpd
26629 root  25   0   180  180   104 R 2.9  0.0  47:31   0
qmail-smtpd
26902 root  25   0   180  180   104 R 2.9  0.0  41:03   1
qmail-smtpd
26957 root  25   0   184  180   104 R 2.9  0.0  41:45   1
qmail-smtpd
27411 root  25   0   180  180   104 R 2.9  0.0  33:25   1
qmail-smtpd
28855 root  25   0   188  188   112 R 2.9  0.0  18:45   0
qmail-smtpd
29879 root  25   0   264  264   192 R 2.9  0.1  12:10   1
qmail-smtpd
25937 root  25   0   180  180   104 R 2.9  0.0  92:05   1
qmail-smtpd
30694 root  25   0   444  444   372 R 2.9  0.1   7:38   1
qmail-smtpd
31109 root  25   0   448  448   372 R 2.9  0.1   4:58   0
qmail-smtpd
31251 root  25   0   444  444   372 R 2.9  0.1   4:22   1
qmail-smtpd
31439 root  25   0   448  448   372 R 2.9  0.1   3:43   0
qmail-smtpd
32657 root  25   0   448  448   372 R 2.9  0.1   0:18   0
qmail-smtpd
32661 root  25   0   448  448   372 R 2.9  0.1   0:19   0
qmail-smtpd
28052 root  39  15   176  176   104 R N   0.5  0.0   6:35   0
qmail-smtpd
27108 root  39  19   176  176   104 R N   0.2  0.0  15:57   0
qmail-smtpd
27794 root  39  19   180  180   104 R N   0.2  0.0   7:16   0
qmail-smtpd


Output of vmstat for every 2sec


procs  memory  swap  io system
cpu
 r  b   swpd   free   buff  cache   si   sobibo   incs us sy
id wa
34  0  29152  82484   3380  1885200 056  13652 100
0  0  0
34  0  29152  82052   3404  1912800   146   104  152   110 100
0  0  0
34  0  29152  82052   3412  1913200 074  13652 100
0  0  0
35  0  29152  82052   3460  19152001092  12182 100
0  0  0
33  0  29152  82068   3500  19140001284  11462 100
0  0  0
33  0  29152  82068   3500  1914000 0 0  13036 100
0  0  0
33  0  29152  82068   3508  1914000 066  13761 100
0  0  0
33  0  29152  82068   3508  1914000 0 0  13240 100
0  0  0
33  0  29152  82068   3508  1914000 0 0  10534 100
0  0  0
33  0  29152  82068   3516  1914000 0 6  10936 100
0  0  0
33  0  29152  82068   3516  1914000 0 0  13738 100
0  0  0
33  0  29152  82068   3524  1914000 0 6  10635 100
0  0  0
33  0  29152  82068   3524  1914000 0 0  13338 100
0  0  0
33  0  29152  82068   3532  1914000 0 6  10937 100
0  0  0
33  0  29152  82068   3532  1914000 0 0  10532 100
0  0  0
35  0  29152  82060   3532  1914000 0 0  13749 100
0  0  0
33  0  29152  82068   3548  1913600

Re: cpu usage

2008-09-14 Thread Mario Remy Almeida
Hi Russ,

Thanks for the advice.

I am using maillog file since a year past without any problem the
problem of 100% cpu usage started just a month back.

I never added tarpit count and delay rest other options i was using
them. I have added now will observe it for 2 days and let you know the
status.

Regards,
Mario


On Thu, 2008-09-11 at 10:21 -0400, Russell Simpkins wrote:

> >
> > Hi Russ,
> >
> > There is no problem if kernel allows qmail-smtpd for 100% cpu usage but
> > the load average should not go high. which means there are more request
> > waiting for the processor.
> >
> >
> > Please help me with this issue
> >
> > Below is the output of top and vmstat.
> >
> >
> > Output of  *** TOP ***
> >
> >
> >  12:15:53  up 37 days,  5:10,  4 users,  load average: 32.13, 31.24,
> > 30.32
> > 156 processes: 123 sleeping, 33 running, 0 zombie, 0 stopped
> > CPU states:  cpuusernice  systemirq  softirq  iowaitidle
> >total   98.5%1.1%0.2%   0.0% 0.0%0.0%0.0%
> >cpu00   98.6%0.7%0.5%   0.0% 0.0%0.0%0.0%
> >cpu01   98.4%1.5%0.0%   0.0% 0.0%0.0%0.0%
> > Mem:   244072k av,  234236k used,9836k free,   0k shrd,   34580k
> > buff
> >  74336k actv,   10812k in_d,1744k in_c
> > Swap: 1052248k av,   30248k used, 1022000k free   42360k
> > cached
> >
> >   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
> > COMMAND
> > 26509 root  25   0   180  180   104 R 3.9  0.0  54:16   1
> > qmail-smtpd
> > 27131 root  25   0   180  180   104 R 3.9  0.0  35:45   0
> > qmail-smtpd
> > 27939 root  25   0   180  180   104 R 3.9  0.0  26:53   1
> > qmail-smtpd
> > 28198 root  25   0   180  176   104 R 3.9  0.0  24:13   0
> > qmail-smtpd
> > 28307 root  25   0   180  180   104 R 3.9  0.0  23:43   0
> > qmail-smtpd
> > 29099 root  25   0   188  188   112 R 3.9  0.0  16:32   1
> > qmail-smtpd
> > 29460 root  25   0   268  268   192 R 3.9  0.1  14:32   1
> > qmail-smtpd
> > 29540 root  25   0   264  264   192 R 3.9  0.1  13:47   0
> > qmail-smtpd
> > 30162 root  25   0   268  268   192 R 3.9  0.1   9:36   1
> > qmail-smtpd
> > 32114 root  25   0   448  448   372 R 3.9  0.1   2:05   1
> > qmail-smtpd
> > 28777 root  25   0   188  188   112 R 3.7  0.0  19:00   1
> > qmail-smtpd
> > 30403 root  25   0   268  268   192 R 3.6  0.1   8:43   1
> > qmail-smtpd
> > 30390 root  25   0   268  268   192 R 3.1  0.1   8:35   0
> > qmail-smtpd
> > 26009 root  25   0   180  180   104 R 2.9  0.0  91:38   1
> > qmail-smtpd
> > 26236 root  25   0   176  176   104 R 2.9  0.0  70:51   0
> > qmail-smtpd
> > 26434 root  25   0   176  176   104 R 2.9  0.0  57:30   0
> > qmail-smtpd
> > 26629 root  25   0   180  180   104 R 2.9  0.0  47:31   0
> > qmail-smtpd
> > 26902 root  25   0   180  180   104 R 2.9  0.0  41:03   1
> > qmail-smtpd
> > 26957 root  25   0   184  180   104 R 2.9  0.0  41:45   1
> > qmail-smtpd
> > 27411 root  25   0   180  180   104 R 2.9  0.0  33:25   1
> > qmail-smtpd
> > 28855 root  25   0   188  188   112 R 2.9  0.0  18:45   0
> > qmail-smtpd
> > 29879 root  25   0   264  264   192 R 2.9  0.1  12:10   1
> > qmail-smtpd
> > 25937 root  25   0   180  180   104 R 2.9  0.0  92:05   1
> > qmail-smtpd
> > 30694 root  25   0   444  444   372 R 2.9  0.1   7:38   1
> > qmail-smtpd
> > 31109 root  25   0   448  448   372 R 2.9  0.1   4:58   0
> > qmail-smtpd
> > 31251 root  25   0   444  444   372 R 2.9  0.1   4:22   1
> > qmail-smtpd
> > 31439 root  25   0   448  448   372 R 2.9  0.1   3:43   0
> > qmail-smtpd
> > 32657 root  25   0   448  448   372 R 2.9  0.1   0:18   0
> > qmail-smtpd
> > 32661 root  25   0   448  448   372 R 2.9  0.1   0:19   0
> > qmail-smtpd
> > 28052 root  39  15   176  176   104 R N   0.5  0.0   6:35   0
> > qmail-smtpd
> > 27108 root  39  19   176  176   104 R N   0.2  0.0  15:57   0
> > qmail-smtpd
> > 27794 root  39  19   180  180   104 R N   0.2  0.0   7:16   0
> > qmail-smtpd
> >
> >
> > Output of vmstat for every 2sec
> >
> >
> > procs  memory  swap  io system
> > cpu
> >  r  b   swpd   free   buff  cache   si   sobibo   incs us sy
> > id wa
> > 34  0  29152  82484   3380  1885200 056  13652 100
> > 0  0  0
> 
> 
> 
> Well, you sure do have something there. At least nothing is blocked. Does
> this go away if you restart qmail? How long does it take to get back up to
> 100%. Your logs sure aren't showing off the activity. I would stop qmail,
> make sure everything is shutdown, then restart and watch the logs to see
> how fast it spikes. Also, make sure you verify you don't have a massive
> maillog file.
> 
> 
> Why are you running qmail-smtpd 

DomainKey patch

2008-09-25 Thread Mario Remy Almeida
Hi All,

Does anyone has the domain key patch for qmail-ldap

Thanks and Regards,
Remy


qmail-1.03-libpq-greylist-1.2.4.patch

2008-09-28 Thread Mario Remy Almeida
Hi All,

I have modified the qmail-1.03-libpq-greylist-1.2.3 patch and added
1) SENDER DOMAIN check
2) enable using tcpserver ENV no more GREYLIST_STATFILE
3) logging using syslog


can someone test the patch and let me know for any bugs?

Regards,
Mario
diff -urN qmail-1.03.orig/CHANGES.greylist qmail-1.03/CHANGES.greylist
--- qmail-1.03.orig/CHANGES.greylist1970-01-01 01:00:00.0 +0100
+++ qmail-1.03/CHANGES.greylist 2006-09-07 11:09:26.383018064 +0200
@@ -0,0 +1,36 @@
+2008-09-26 - v1.2.4
+- no more GREYLIST_STATFILE required
+- enable using tcpserver EVN
+- check whether the SENDER DOMAIN is white- or blacklisted
+- logging using syslog
+
+2006-09-07 - v1.2.3
+- corrected usage of postgres-account-defines from greylist.h in greylist.c
+- fixed debug define
+- major README update
+- added define for GREYLIST_STATFILE in greylist.h and changed hardcoded
+  path in qmail-smtpd.c to use defined value
+- added automatic building for greylist-cleanup
+
+2006-03-10 - v1.2.2
+- corrected messed up patch v1.2.1
+
+2006-02-17 - v1.2.1
+- added a feature which allows excluding a single user from greylisting
+
+2005-10-11 - v1.2.0
+- release of the final public version 1.2.0 for sourceforge
+- minor changes to different files (license cleanup's)
+- simple documentation added, see README.greylist and FAQ.greylist
+
+2nd quarter 2005 - v1.0.5
+- GPL license notes updated/corrected
+
+early 2005 - v1.0.4
+- added statistics table to sql structure
+- added statistics to greylist-cleanup
+
+last quarter 2004 - v1.0.3
+- got some exit codes fixed
+- allow for email black- and whitelisting in our database
+
+2nd quarter 2004 - v1.0.2
+- greylist-cleanup added
+
+early 2004 - v1.0.1
+- early initial release, posted to someone at www.qmail.org
+- some debugging code included
diff -urN qmail-1.03.orig/CREDITS.greylist qmail-1.03/CREDITS.greylist
--- qmail-1.03.orig/CREDITS.greylist1970-01-01 01:00:00.0 +0100
+++ qmail-1.03/CREDITS.greylist 2006-09-07 11:09:24.166355048 +0200
@@ -0,0 +1,2 @@
+2006-09-07
+- many thanks to David Elze for debugging and new ideas
diff -urN qmail-1.03.orig/FAQ.greylist qmail-1.03/FAQ.greylist
--- qmail-1.03.orig/FAQ.greylist1970-01-01 01:00:00.0 +0100
+++ qmail-1.03/FAQ.greylist 2006-09-07 11:09:24.167354896 +0200
@@ -0,0 +1,13 @@
+FAQ for qmail-greylist-pgsql
+
+1. What files does qmail-greylist-pgsql change in a vanilla qmail package?
+
+   qmail-greylist-pgsql does only change qmail-smtpd in order to launch (fork)
+   an external application called "greylist". The later will handle all
+   database related stuff.
+
+2. Does qmail-greylist-pgsql integrate with other patches?
+
+   The following sequence of patches was tested and works correctly:
+ - qmail-ldap-1.03-20060201.patch
+ - greylist patch
diff -urN qmail-1.03.orig/FILES qmail-1.03/FILES
--- qmail-1.03.orig/FILES   1998-06-15 12:53:16.0 +0200
+++ qmail-1.03/FILES2006-09-07 11:09:24.168354744 +0200
@@ -426,6 +426,10 @@
 tcp-environ.5
 constmap.h
 constmap.c
+greylist.h
+greylist.c
+postgres-greylist.sql
+CREDITS.greylist
 EXTTODO
 Makefile.cdb
 POPBEFORESMTP
diff -urN qmail-1.03.orig/greylist.c qmail-1.03/greylist.c
--- qmail-1.03.orig/greylist.c  1970-01-01 01:00:00.0 +0100
+++ qmail-1.03/greylist.c   2006-09-07 11:09:24.169354592 +0200
@@ -0,0 +1,260 @@
+/*
+ * qmail-greylist-postgres - qmail add-on patch implementing greylisting
+ * Copyright (C) 2004-2005 Guenther Mair
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
+ *  or see http://ww.gnu.org/licenses/gpl.html.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include "/usr/include/libpq-fe.h"
+#include "greylist.h"
+
+#ifdef DEBUG
+#include 
+#endif
+
+void exit_nicely(error_code, connect, result, query, ip, fromadd, toadd, message)
+int error_code;
+PGconn *connect;
+PGresult *result;
+char *query;
+char *message;
+char *ip;
+char *fromadd;
+char *toadd;
+{
+#ifdef DEBUG
+  openlog("greylist", LOG_PID, LOG_MAIL);
+  syslog(LOG_DEBUG, "IP:%s, Sender:%s, Recipient:%s, Result:%d, %s", ip, fromadd, toadd, error_code, message);
+  syslog(LOG_DEBUG, "last query: %s\n", query);
+  syslog(LOG_DEBUG, "last pq-status: %s", PQerrorMessage(connect));
+#endif
+  PQclear(result);
+  PQfinish(connect);
+  e

patch to force helo or ehlo before any smtp command

2008-09-28 Thread Mario Remy Almeida
Hi All,

I have a patch to force helo or ehlo before any smtp command,

Apply this patch to qmail-1.03 after qmail-ldap-1.03-20060201.patch is
applied

Regards,
Remy
diff -urN qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c
--- qmail-1.03.orig/qmail-smtpd.c	2008-09-26 11:46:23.0 +0400
+++ qmail-1.03/qmail-smtpd.c	2008-09-28 09:56:37.0 +0400
@@ -176,6 +176,7 @@
 void err_relay(void) { out("553 sorry, we don't relay for ["); out(remoteip); out("] (#5.7.1)\r\n"); }
 void err_wantmail(void) { out("503 MAIL first (#5.5.1)\r\n"); logline(4,"'mail from' first"); }
 void err_wantrcpt(void) { out("503 RCPT first (#5.5.1)\r\n"); logline(4,"'rcpt to' first"); }
+void err_wanthelo(void) { out("503 EHLO/HELO first (#5.5.1)\r\n"); logline(4,"'ehlo/helo' first"); }
 
 void err_noop(char *arg) { out("250 ok\r\n"); logline(4,"'noop'"); }
 void err_vrfy(char *arg) { out("252 send some mail, i'll try my best\r\n"); logline2(4,"vrfy for: ",arg); }
@@ -662,6 +663,7 @@
 }
 
 int seenmail = 0;
+int helo = 0;
 stralloc mailfrom = {0};
 stralloc rcptto = {0};
 unsigned int rcptcount;
@@ -835,6 +837,7 @@
 void smtp_helo(char *arg)
 {
   smtp_line("250 ");
+  helo = 1;
   seenmail = 0; dohelo(arg);
   logline2(4, "remote helo: ", arg);
 }
@@ -842,6 +845,7 @@
 void smtp_ehlo(char *arg)
 {
   smtp_line("250-");
+  helo = 1;
   out("250-PIPELINING\r\n");
   if (databytes != 0) {
 smtpsize[fmt_ulong(smtpsize, databytes)] = 0;
@@ -883,6 +887,13 @@
   char *rblname;
   int bounceflag = 0;
 
+  /* check for helo/ehlo syntax*/
+  if(!helo)
+  {
+err_wanthelo();
+if (errdisconnect) err_quit();
+ return;
+  }
   /* address syntax check */
   if (!addrparse(arg))
   {


Black berry

2008-10-09 Thread Mario Remy Almeida
Hi All,

Any suggestions to use Black berry with my qmail-ldap setup

Regards,
Mario


reply timeout and interval for auto reply

2008-10-19 Thread Mario Remy Almeida
Hi All,

I would like to know if anyone has a patch to store the reply timeout
for auto reply in ldap

and also the number of mails sent in the specified timeout interval
default is 1


replytimeout and interval value in ldap

Regards,
Remy



group email ids

2009-01-27 Thread Mario Remy Almeida
Hi All,

Can someone tell me how to configure a group email id in qmail-ldap
for eg:

group-email1
members: a...@example1.com, b...@example1.com, c...@example1.com etc...

when an email is sent to group-em...@example1.com all the members should
receive the email, But the header will only mentions
group-em...@example1.com 

so when one of the recipient click on the reply button the reply email
should be group-em...@example1.com

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


group emails help

2009-01-28 Thread Mario Remy Almeida
Hi All,

I am testing qmail group functionality

ldif file is as below

dn: cn=teammembers,ou=example.com,o=ms,dc=connectserver
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: CourierMailAccount
objectClass: qmailUser
objectClass: qmailGroup
uid: teammemb...@example.com
mail: teammemb...@example.com
cn: iteammembers
qmailUID: 65111
qmailGID: 65111
mailMessageStore: /mailstore/isaaviation.ae/i001/isateam
qmailDotMode: ldapwithprog
mailHost: localhost
disablepop3: 0
disableimap: 0
displayName: ISA Team Members
sn: Team
givenName: Team
rfc822member: [EMAIL PROTECTED]
rfc822member: [EMAIL PROTECTED]
mailAlternateAddress: [EMAIL PROTECTED]


When i send email to teammemb...@example.com i get the below error
message in the log file

1233130280.852629 delivery 40571: deferral:
qmail-group:_fatal:_get_ldap_group_entry:_no_such_object/

Can someone tell me where am i making mistake

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


Re: group email ids

2009-01-28 Thread Mario Remy Almeida
Thanks for the reply.
Actually I had not created this 2 files ldapgrouplogin and
ldapgrouppassword

After creating and entering the user login id and password into those 2
files it started working

//Remy


On Wed, 2009-01-28 at 12:46 +, Hugo Monteiro wrote:
> Mario Remy Almeida wrote:
> > Hi All,
> >
> > Can someone tell me how to configure a group email id in qmail-ldap
> > for eg:
> >
> > group-email1
> > members: a...@example1.com, b...@example1.com, c...@example1.com etc...
> >
> > when an email is sent to group-em...@example1.com all the members should
> > receive the email, But the header will only mentions
> > group-em...@example1.com 
> >
> > so when one of the recipient click on the reply button the reply email
> > should be group-em...@example1.com
> >
> > //Remy
> >
> >
> > --
> > Disclaimer and Confidentiality
> >
> >
> > This material has been checked for  computer viruses and although none has
> > been found, we cannot guarantee  that it is completely free from such 
> > problems
> > and do not accept any  liability for loss or damage which may be caused.
> > Please therefore  check any attachments for viruses before using them on 
> > your
> > own  equipment. If you do find a computer virus please inform us immediately
> > so that we may take appropriate action. This communication is intended  
> > solely
> > for the addressee and is confidential. If you are not the intended 
> > recipient,
> > any disclosure, copying, distribution or any action  taken or omitted to be
> > taken in reliance on it, is prohibited and may be  unlawful. The views
> > expressed in this message are those of the  individual sender, and may not
> > necessarily be that of ISA.
> >
> >   
> 
> Hello Mario,
> 
> You could use something like this:
> 
> dn: uid=group-email,ou=Lists,dc=domain,dc=com
> objectClass: inetOrgPerson
> objectClass: qmailUser
> objectClass: qmailGroup
> objectClass: top
> sn: Group Email
> cn: Group Email
> uid: group-email
> mail: group-em...@domain.com
> homeDirectory: /home/users/lists/group-email
> mailMessageStore: /home/users/lists/group-email/Maildir/
> qmailUID: 64010
> qmailGID: 65534
> mailAlternateAddress: catchall-group-em...@domain.com
> dnmember: uid=user1,ou=Users,dc=domain,dc=com
> dnmember: uid=user2,ou=Users,dc=domain,dc=com
> 
> 
> 
> Regards,
> 
> Hugo Monteiro.
> 


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


mail from verification

2009-04-23 Thread Mario Remy Almeida
Hi All,

Does anyone has a patch to meet the below requirement?

if user authenticates as abc should only be able to send email as
a...@example.com (as per the LDAP_MAIL field) and not as any other user.
something like SENDERCHECK= "LOOSE" or "STRICT" but should match the
entire email and not just the domain.

e.g:
1)
(smtp command) auth login: abc
(smtp command) mail from: = a...@example.com
LDAP_MAIL = a...@example.com

In the above e.g LDAP_MAIL = mail from
should be able to send emails to any

2)
(smtp command) auth login: abc
LDAP_MAIL = a...@example.com
(smtp command) mail from: = a...@other.com

In the above e.g LDAP_MAIL != mail from
should not be able to send emails.

Regards,
Remy





--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


attachment policy

2009-06-23 Thread Mario Remy Almeida
Hi All,

I want to disable sending of attachments as per the users

eg:
x...@my.domain.com
a...@my.domain.com

xyz has permission to send email attachments to any one
abc has permission to send email attachments with in my.domain.com

Any idea how could I achive this?

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


attachment policy

2009-06-23 Thread Mario Remy Almeida
Hi All,

I want to disable sending of attachments as per the users

eg:
x...@my.domain.com
a...@my.domain.com

xyz has permission to send email attachments to any one
abc has permission to send email attachments with in my.domain.com

Any idea how could I achive this?

//Remy



--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


attachment policy patch

2009-06-29 Thread Mario Remy Almeida
Hi All,

Since I was looking out for an attachment policy with qmail could not
find any, thought to do one


Patch function (only if email contains attachment)

x...@local to a...@local allow sending of email 

a...@local to a...@external deny sending of email


Can also be enabled with tcp-evn but not done

would like to have it as per user profile

Can someone help me in doing it as per field in ldap

meaning sending of attachment email either yes or no should be stored in
ldap

also if someone can go through the code and find if any bugs and correct
them will be great

apply the patch for vanila qmail-lda src

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.
--- qmail-1.03.orig/execcheck.c	2008-10-18 23:49:33.0 +0400
+++ git/qmail/execcheck.c	2009-06-29 12:10:11.0 +0400
@@ -52,6 +52,7 @@
 
 static int checkexecutable = 0;
 static int flagexecutable;
+static int flagattachment;
 static stralloc signatures = {0};
 
 void
@@ -81,6 +82,12 @@
 	return flagexecutable;
 }
 
+int
+attachmentcheck_flag(void)
+{
+	return flagattachment;
+}
+
 static int
 signatures_match(stralloc *line, char *sig)
 {
@@ -107,6 +114,17 @@
 	return 0;
 }
 
+static int
+attachments_check(stralloc *line)
+{
+	char *s;
+	s = "Content-Disposition: attachment; filename=";
+
+	if(signatures_match(line, s))
+		return 1;
+	return 0;
+}
+
 static int linespastheader;	/* = 0 if in header (mime or mail)
 			 	 * = 1 line after blank line
  * = 2 somewhere in body
@@ -217,6 +235,7 @@
 	boundary_start = 0;
 	boundary_len = 0;
 	flagexecutable = 0;
+	flagattachment = 0;
 	flagrfc822 = 0;
 	linetype = ' ';
 }
@@ -243,6 +262,9 @@
 		 * in mail or mime header, search for content-type
 		 * and possible boundary
 		 */
+		if(attachments_check(&line))
+			flagattachment = 1;
+
 		if (line.len == 1) {	/* end of header */
 			linespastheader = 1;
 			if (content.len) /* MIME header */
--- qmail-smtpd.c.orig	2009-06-29 12:14:12.0 +0400
+++ qmail-smtpd.c	2009-06-29 12:07:14.0 +0400
@@ -302,6 +302,8 @@
 unsigned int maxrcptcount = 0;
 int greylist = 0;
 int sendercheck = 0;
+int rcptlocalflag = 0;
+int senderlocalflag = 0;
 int rcptcheck = 0;
 int ldapsoftok = 0;
 int flagauth = 0;
@@ -1118,6 +1120,7 @@
 
 switch (ldaplookup(addr.s, &s)) {
   case 1: /* valid */
+	senderlocalflag = 1;
 	logline(4,"sender verify OK");
 break;
   case 0: /* invalid */
@@ -1229,6 +1232,7 @@
 
   /* check if recipient exists in ldap */
   if (rcptcheck) {
+rcptlocalflag = 0;
 if (!goodmailaddr()) {
   logline(4,"recipient verify, recipient not in goodmailaddr");
   if (addrlocals()) {
@@ -1236,6 +1240,7 @@
 	logline(4,"recipient verify, recipient is local");
 switch (ldaplookup(addr.s, &s)) {
   case 1: /* valid */
+	rcptlocalflag = 1;
 	logline(4,"recipient verify OK");
 break;
   case 0: /* invalid */
@@ -1554,6 +1559,18 @@
 #endif
   blast(&hops);
 
+#ifdef SMTPEXECCHECK
+  /* check if the email has attachment*/
+  if (attachmentcheck_flag()) {
+	if (senderlocalflag && !rcptlocalflag) {
+		out("552 You are not allowed to send email with attachment other then to your local address (#5.3.5)\r\n");
+		logline(3,"email with attachment other then to your local address denied");
+		if (errdisconnect) err_quit();
+		return;
+	}
+ }
+#endif
+
 #ifdef DATA_COMPRESS
   if (wantcomp) { if (compression_done() != 0) return; }
 #endif


email backup

2009-07-03 Thread Mario Remy Almeida
Hi All

I want to keep a copy of all incoming and outgoing email of
x...@example.com

Any idea how to achieve this?

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


Re: email backup

2009-07-04 Thread Mario Remy Almeida
So if I put an entry in ~control/bigbrother as

susp...@example.com:bigbrot...@example.com

an email will be forwarded to bigbrot...@example.com as well as to
susp...@example.com


//Remy

On Sat, 2009-07-04 at 00:10 +0400, Gennady G. Marchenko wrote:
> Mario Remy Almeida пишет:
> > Hi All
> >
> > I want to keep a copy of all incoming and outgoing email of
> > x...@example.com
> >
> > Any idea how to achieve this?
> >
> > //Remy
> >
> >
> > --
> > Disclaimer and Confidentiality
> >
> >
> > This material has been checked for  computer viruses and although none has
> > been found, we cannot guarantee  that it is completely free from such 
> > problems
> > and do not accept any  liability for loss or damage which may be caused.
> > Please therefore  check any attachments for viruses before using them on 
> > your
> > own  equipment. If you do find a computer virus please inform us immediately
> > so that we may take appropriate action. This communication is intended  
> > solely
> > for the addressee and is confidential. If you are not the intended 
> > recipient,
> > any disclosure, copying, distribution or any action  taken or omitted to be
> > taken in reliance on it, is prohibited and may be  unlawful. The views
> > expressed in this message are those of the  individual sender, and may not
> > necessarily be that of ISA.
> >   
> Please, read the next link:
> 
> http://www.qmail-ldap.org/wiki/index.php/~control/bigbrother
> 
-- 


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


Append ID to subject

2009-07-05 Thread Mario Remy Almeida
Hi All,

I need to append ID to the subject of a new email arrived to
x...@example.com

eg:-

Original Subject = Email Probme
Append to subject = #[SP-1]

Final Subject   = #[SP-1] Email Probme

Any idea how to achive this?

//Remy


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


new domain

2009-07-06 Thread Mario Remy Almeida
Hi All,

I have a qmail-ldap working for example1.com domain

Want to add another domain as example2.com domain.


email to *...@example2.com should go to *...@example1.com users

How to achieve this without creating any users in the new domain
example2.com?

//Remy
-- 


--
Disclaimer and Confidentiality


This material has been checked for  computer viruses and although none has
been found, we cannot guarantee  that it is completely free from such problems
and do not accept any  liability for loss or damage which may be caused.
Please therefore  check any attachments for viruses before using them on your
own  equipment. If you do find a computer virus please inform us immediately
so that we may take appropriate action. This communication is intended  solely
for the addressee and is confidential. If you are not the intended recipient,
any disclosure, copying, distribution or any action  taken or omitted to be
taken in reliance on it, is prohibited and may be  unlawful. The views
expressed in this message are those of the  individual sender, and may not
necessarily be that of ISA.


Re: Future of Qmail-LDAP

2010-02-09 Thread Mario Remy Almeida

Hi Hugo,

I would be interesting in trying out your patches.


Hugo Monteiro wrote:

On 02/09/2010 04:50 AM, Philipp Kolloczek wrote:

Hello folks.

I have followed all of the messages which came in reply to Hugo's msg.
There are many interesting points of view and as I use qmail-ldap
myself here is another one. ;)

  

For some time now i've been wondering if there are any plans to enhance
Qmail-LDAP in a near future.
 

Hugo, I sign that.
It would be great to see a development of qmail-ldap in the future.
Equal to other I, or let better say we - the ISP I'm imeployed - use
qmail-ldap since years.

As you can imagine it is a heavy patched version to fit our needs.
It includes some patches which can be found in Hugo's site, some self
developed ones, some changed to fit needs and fit in code and so on.
Just to note feature like the big quota patch, a mailhost routing 
feature or

user based settings for spam/virus checking and attachment sizes.

In summary we use it actually in a HA Mail-Cluster based on two
Loadbalancer, a number of Sun T2000 and a NetAPP Storagesystem
for the main part (MTA / qmail-pop / 3rd Party IMAP).

In combination with qmail-queue-patch and Simscan we have include
a spam filtering/checking farm and also two different virus scanning
engines. Virus engine depends on customers choise.

With simscan and SpamAssassin tools like DCC and Razor are easy to
integrate, actually we use DCC. And based on Hugo's qenvscan patch
we actually are in the process of integrating a customer based
senderquota and also some kind of greylisting depending of
the amount of errors a sender IP/user is generation, like hammering
with massiv RCPT failures, relaying probes or ignoring the rctp count
limit.

   



Hello Philipp,

I too have some other patches that i have not yet published because i 
feel they need a little bit more testing. I can tell you though that i 
already have work done in the matter of per user message throttling, 
either based on number of messages or message size.


Another thing that i have implemented is the concept of SMTP (pre 
DATA) and EOM (end of message) protocol state, correlating both within 
a single SMTP session. That allows performing two sets of independent 
tests but maintaining a relation between the two. That will allow the 
use of SMTP policy servers such as Cluebringer (policyd v2).


I could arrange publication of that work if anyone is interested.

I also wonder what are the feelings of both the authors and users 
about turning Qmail-LDAP into a community driven project. In the event 
that the original authors are not available to continue to work on 
Qmail-LDAP, i wonder what are the feelings regarding a possible fork 
of the project.


Best regards,

Hugo Monteiro.



second domain not working

2010-02-11 Thread Mario Remy Almeida

Dear All,

How to I get a second domain working?

I already have 1 working domain with qmail-ldap

Added the 2nd domain to rcpthosts and locals files also added the user 
for the 2nd domain in LDAP database and even able to find the user with 
qmail-ldaplookup


But when I send email to the 2nd domain in the log it says to remote for 
the 2nd domain and says 
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/




Re: second domain not working

2010-02-11 Thread Mario Remy Almeida

Dear Russell,

Below is the report

host -t mx isaaviations.com
isaaviations.com mail is handled by 10 mx1.isaaviations.com.

host -t mx isaaviation.ae
isaaviation.ae mail is handled by 5 mx1.isaaviation.ae.

host mx1.isaaviations.com.
mx1.isaaviations.com has address 213.42.24.16

host mx1.isaaviation.ae.
mx1.isaaviation.ae has address 213.42.24.16

isaaviation.ae. domain works fine problem with isaaviations.com domain.

But my question when the host entry for the 2nd domain 
(isaaviations.com) exists in rcpthosts and locals file why show it do a 
DNS lookup?



Russell Simpkins wrote:

Mario Remy Almeida wrote:

Dear All,

How to I get a second domain working?

I already have 1 working domain with qmail-ldap

Added the 2nd domain to rcpthosts and locals files also added the 
user for the 2nd domain in LDAP database and even able to find the 
user with qmail-ldaplookup


But when I send email to the 2nd domain in the log it says to remote 
for the 2nd domain and says 
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/



Make sure that your dns is set up correctly. You can test using telnet

telnet seconddomain.au 25

Test this from your mail server. I'm pretty sure that qmail only uses 
dns and ignores /etc/hosts settings. So you have to have that new 
domain set up in your dns server. You can always restart qmail after 
you've added to rcpthosts.


Russ


Re: second domain not working

2010-02-11 Thread Mario Remy Almeida

Hi Russell,

I believe telnet should be done for MX record (the lowest record) and 
not for the domain.


Let me explain you the setup.

The email server and the client are in the same network. When both are 
in the same network the MX record is not used. Infact the clients 
directly sends the email to the mail server. Qmail-ldap server on 
receiving the email will check the entry in the rcpthosts and locals 
files if entry exist it will deliver the email locally. But as per the 
wiki http://www.qmail-ldap.org/wiki/index.php/Configuration_FAQ --> " 
qmail-ldap has no concept of 'virtual'domains. All it cares about is the 
email address of the recipient. As soon as it finds that address in an 
LDAP record it puts that message into that maildir. "


All the 3 things I have done, Entry of 2nd domain in rcpthosts and 
locals files and added the user to ldap database.

But still it will say remote in the log. Any suggestions.


Russell Simpkins wrote:
Are you sure you're firewall is open to port 25 traffic? I can't 
telent to either address on port 25.


telnet isaaviations.com 25
Trying 194.170.187.32...
telnet: connect to address 194.170.187.32: Operation timed out
telnet: Unable to connect to remote host


telnet isaaviation.ae 25
Trying 194.170.187.32...
telnet: connect to address 194.170.187.32: Operation timed out
telnet: Unable to connect to remote host


Dear Russell,

Below is the report

host -t mx isaaviations.com
isaaviations.com mail is handled by 10 mx1.isaaviations.com.

host -t mx isaaviation.ae
isaaviation.ae mail is handled by 5 mx1.isaaviation.ae.

host mx1.isaaviations.com.
mx1.isaaviations.com has address 213.42.24.16

host mx1.isaaviation.ae.
mx1.isaaviation.ae has address 213.42.24.16

isaaviation.ae. domain works fine problem with isaaviations.com domain.

But my question when the host entry for the 2nd domain 
(isaaviations.com) exists in rcpthosts and locals file why show it do 
a DNS lookup?



Russell Simpkins wrote:

Mario Remy Almeida wrote:

Dear All,

How to I get a second domain working?

I already have 1 working domain with qmail-ldap

Added the 2nd domain to rcpthosts and locals files also added the 
user for the 2nd domain in LDAP database and even able to find the 
user with qmail-ldaplookup


But when I send email to the 2nd domain in the log it says to 
remote for the 2nd domain and says 
Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/



Make sure that your dns is set up correctly. You can test using telnet

telnet seconddomain.au 25

Test this from your mail server. I'm pretty sure that qmail only 
uses dns and ignores /etc/hosts settings. So you have to have that 
new domain set up in your dns server. You can always restart qmail 
after you've added to rcpthosts.


Russ




bigbrother control help

2010-08-14 Thread Mario Remy Almeida

Hi All,

In bigbrother file I have below two entries

  1. a...@example.com:x...@example.com
  2. a...@example.com:x...@example.com

Email to be forwarded from a...@example.com always goes to the 2 entry 
not to both. Please help how to get this working.


Regards,
Mario


different users on different qmail-ldap

2011-07-12 Thread Mario Remy Almeida

Hi All,

Users
a...@ex.com, b...@ex.com on qmail-ldap server host1
c...@ex.com and d...@ex.com on qmail-ldap server host2

host1 server is the master server to send and receive all the email, 
host2 will route via host1


On host 1 how can I tell email for c...@ex.com and d...@ex.com to be delivered 
on server host2?


I know ldap attribute "mailHost" says something like that, But I am not 
sure. Is this the correct attribute to use?


qmail-ldap mail looping issue with bigbrother

2012-03-13 Thread Mario Remy Almeida

Hi All,

I have an issue of mail looping.

Any email To/From supp...@example.com should be sent to 
us...@example.com and us...@example.com. To achieve this a group email 
is created as supportgr...@example.com.


bigbrother:
supp...@example.com:supportgr...@example.com

How to resolve this issue?

Mar 14 09:43:36 miramar qmail: 1331703816.813848 info msg 597: bytes 
3275 from  qp 31335 uid 0
Mar 14 09:43:36 miramar qmail: 1331703816.813890 starting delivery 
229398: msg 597 to local malme...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.815795 status: local 1/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.815828 starting delivery 
229399: msg 597 to local supportgr...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.815838 status: local 2/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.885058 delivery 229399: 
success: did_0+2+0/qp_31340/
Mar 14 09:43:36 miramar qmail: 1331703816.885102 status: local 1/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.923526 delivery 229398: 
success: did_0+0+1/
Mar 14 09:43:36 miramar qmail: 1331703816.945420 status: local 0/20 
remote 0/10

Mar 14 09:43:36 miramar qmail: 1331703816.975561 end msg 597
Mar 14 09:43:36 miramar qmail: 1331703816.975602 new msg 5000324
Mar 14 09:43:36 miramar qmail: 1331703816.975613 info msg 5000324: bytes 
3407 from  qp 31340 uid 65111
Mar 14 09:43:36 miramar qmail: 1331703816.975623 starting delivery 
229400: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975632 status: local 1/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.975642 starting delivery 
229401: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975651 status: local 2/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.000853 starting delivery 
229402: msg 5000324 to local supportgr...@example.com
Mar 14 09:43:37 miramar qmail: 1331703817.018882 status: local 3/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.018917 delivery 229402: 
failure: 
This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
Mar 14 09:43:37 miramar qmail: 1331703817.018927 status: local 2/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.813451 delivery 229401: 
success: qmail-forward:_ok_1331703817_qp_31345./
Mar 14 09:43:37 miramar qmail: 1331703817.813497 status: local 1/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.827669 delivery 229400: 
success: qmail-forward:_ok_1331703817_qp_31346./
Mar 14 09:43:37 miramar qmail: 1331703817.827766 status: local 0/20 
remote 0/10

Mar 14 09:43:37 miramar qmail: 1331703817.862611 bounce msg 5000324 qp 31347

--

/Mario Remy Almeida (Remy)/
//*
*


Re: qmail-ldap mail looping issue with bigbrother

2012-03-13 Thread Mario Remy Almeida

Hi,

So what is the other way to achieve this?


Subject: Re: qmail-ldap mail looping issue with bigbrother
Date: Wed, 14 Mar 2012 07:24:18 +0100
From: Claudio Jeker 
To: qmail-ldap@qmail-ldap.org


On Wed, Mar 14, 2012 at 09:47:58AM +0400, Mario Remy Almeida wrote:

Hi All,

I have an issue of mail looping.

Any email To/From supp...@example.com should be sent to
us...@example.com and us...@example.com. To achieve this a group
email is created as supportgr...@example.com.

bigbrother:
supp...@example.com:supportgr...@example.com

How to resolve this issue?


Why are you using bigbrother in the first place? It sounds like you just
want to do normal forwards so there is no need for using bigbrother.
bigbrother is there to sniff mails and should only be used to satisfy your
local police or other 3 letter agencys.



Mar 14 09:43:36 miramar qmail: 1331703816.813848 info msg 597:
bytes 3275 from  qp 31335 uid 0
Mar 14 09:43:36 miramar qmail: 1331703816.813890 starting delivery
229398: msg 597 to local malme...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.815795 status: local 1/20
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.815828 starting delivery
229399: msg 597 to local supportgr...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.815838 status: local 2/20
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.885058 delivery 229399:
success: did_0+2+0/qp_31340/
Mar 14 09:43:36 miramar qmail: 1331703816.885102 status: local 1/20
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.923526 delivery 229398:
success: did_0+0+1/
Mar 14 09:43:36 miramar qmail: 1331703816.945420 status: local 0/20
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.975561 end msg 597
Mar 14 09:43:36 miramar qmail: 1331703816.975602 new msg 5000324
Mar 14 09:43:36 miramar qmail: 1331703816.975613 info msg 5000324:
bytes 3407 from  qp 31340 uid 65111
Mar 14 09:43:36 miramar qmail: 1331703816.975623 starting delivery
229400: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975632 status: local 1/20
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.975642 starting delivery
229401: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975651 status: local 2/20
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.000853 starting delivery
229402: msg 5000324 to local supportgr...@example.com
Mar 14 09:43:37 miramar qmail: 1331703817.018882 status: local 3/20
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.018917 delivery 229402:
failure: This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
Mar 14 09:43:37 miramar qmail: 1331703817.018927 status: local 2/20
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.813451 delivery 229401:
success: qmail-forward:_ok_1331703817_qp_31345./
Mar 14 09:43:37 miramar qmail: 1331703817.813497 status: local 1/20
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.827669 delivery 229400:
success: qmail-forward:_ok_1331703817_qp_31346./
Mar 14 09:43:37 miramar qmail: 1331703817.827766 status: local 0/20
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.862611 bounce msg 5000324 qp 31347

--

/Mario Remy Almeida (Remy)/
//*
*




Re: qmail-ldap mail looping issue with bigbrother

2012-03-14 Thread Mario Remy Almeida

Hi Ismail,

LDIF is below.

dn: cn=supportgroup,ou=example.com,o=ms,dc=connectserver
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: qmailUser
objectClass: CourierMailAccount
cn: supportgroup
mail: supportgr...@example.com
uid: supportgr...@example.com
qmailUID: 65111
qmailGID: 65111
mailMessageStore: /mailstore/example.com/s001/supportgroup
qmailDotMode: ldapwithprog
givenName: SupportGroup
displayName: SupportGroup Group
sn: Group
ou: example.com
l: CMB
st: SHJ
accountStatus: active
mailHost: mail.example.com
deliveryMode: nolocal
mailForwardingAddress: us...@example.com
mailForwardingAddress: us...@gmail.com


*Subject:* Re: qmail-ldap mail looping issue with bigbrother
*Date:* Wed, 14 Mar 2012 10:04:10 +0200
*From:* Ismail YENIGUL 
*To:* Mario Remy Almeida 
*Cc:* qmail-ldap@qmail-ldap.org


Hi Mario,

On 14.03.2012 07:47, Mario Remy Almeida wrote:

Hi All,

Any email To/From supp...@example.com should be sent to 
us...@example.com and us...@example.com. To achieve this a group 
email is created as supportgr...@example.com.

How did you create the "group email" supportgr...@example.com?
Can you give please post here ldiff for this record?

Mar 14 09:43:36 miramar qmail: 1331703816.975623 starting delivery 
229400: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975632 status: local 1/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.975642 starting delivery 
229401: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975651 status: local 2/20 
remote 0/10
*Mar 14 09:43:37 miramar qmail: 1331703817.000853 starting delivery 
229402: msg 5000324 to local supportgr...@example.com *
This is not normal. Did you include supportgr...@example.com group to 
supportgr...@example.com it self?


Mar 14 09:43:37 miramar qmail: 1331703817.018882 status: local 3/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.018917 delivery 229402: 
failure: 
This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
Mar 14 09:43:37 miramar qmail: 1331703817.018927 status: local 2/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.813451 delivery 229401: 
success: qmail-forward:_ok_1331703817_qp_31345./
Mar 14 09:43:37 miramar qmail: 1331703817.813497 status: local 1/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.827669 delivery 229400: 
success: qmail-forward:_ok_1331703817_qp_31346./
Mar 14 09:43:37 miramar qmail: 1331703817.827766 status: local 0/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.862611 bounce msg 5000324 
qp 31347




Ismail YENIGUL
Team Leader / Takım Lideri
SurGATE Labs
Phone :+90 216-4709423 | Mobile:+90 533 747 36 65
SurGATE: West Coast Labs Premium Anti-Spam Certificated
Twitter: http://www.twitter.com/surgate
Blog: http://www.surgate.com/blog




Re: qmail-ldap mail looping issue with bigbrother

2012-03-17 Thread Mario Remy Almeida

Hi Ismail,

What you suggested I had tried long time back somewhere in August 2010. 
If 2 entires are put in bigbrother for a single email, only the 2nd 
email receives it. In this case only 
supp...@example.com:us...@example.com will receive the email.


With Best Regards,
Mario

*Subject:* Re: qmail-ldap mail looping issue with bigbrother
*Date:* Fri, 16 Mar 2012 16:36:16 +0200
*From:* Ismail YENIGUL 
*To:* Mario Remy Almeida 
*Cc:* qmail-ldap@qmail-ldap.org


Hi Mario,

I made a test and confirm that the problem you report is exist if you 
use alias as a target.

The solution is add two line for supp...@example.com like following:

# cat bigbrother

supp...@example.com:us...@example.com
supp...@example.com:us...@example.com

Thanks

Ismail YENIGUL
Team Leader / Takım Lideri
SurGATE Labs
Phone :+90 216-4709423 | Mobile:+90 533 747 36 65
SurGATE: West Coast Labs Premium Anti-Spam Certificated
Twitter: http://www.twitter.com/surgate
Blog: http://www.surgate.com/blog

On 14.03.2012 10:04, Ismail YENIGUL wrote:

Hi Mario,

On 14.03.2012 07:47, Mario Remy Almeida wrote:

Hi All,

Any email To/From supp...@example.com should be sent to 
us...@example.com and us...@example.com. To achieve this a group 
email is created as supportgr...@example.com.

How did you create the "group email" supportgr...@example.com?
Can you give please post here ldiff for this record?

Mar 14 09:43:36 miramar qmail: 1331703816.975623 starting delivery 
229400: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975632 status: local 1/20 
remote 0/10
Mar 14 09:43:36 miramar qmail: 1331703816.975642 starting delivery 
229401: msg 5000324 to local us...@example.com
Mar 14 09:43:36 miramar qmail: 1331703816.975651 status: local 2/20 
remote 0/10
*Mar 14 09:43:37 miramar qmail: 1331703817.000853 starting delivery 
229402: msg 5000324 to local supportgr...@example.com *
This is not normal. Did you include supportgr...@example.com group to 
supportgr...@example.com it self?


Mar 14 09:43:37 miramar qmail: 1331703817.018882 status: local 3/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.018917 delivery 229402: 
failure: 
This_message_is_looping:_it_already_has_my_Delivered-To_line._(#5.4.6)/
Mar 14 09:43:37 miramar qmail: 1331703817.018927 status: local 2/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.813451 delivery 229401: 
success: qmail-forward:_ok_1331703817_qp_31345./
Mar 14 09:43:37 miramar qmail: 1331703817.813497 status: local 1/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.827669 delivery 229400: 
success: qmail-forward:_ok_1331703817_qp_31346./
Mar 14 09:43:37 miramar qmail: 1331703817.827766 status: local 0/20 
remote 0/10
Mar 14 09:43:37 miramar qmail: 1331703817.862611 bounce msg 5000324 
qp 31347




Ismail YENIGUL
Team Leader / Takım Lideri
SurGATE Labs
Phone :+90 216-4709423 | Mobile:+90 533 747 36 65
SurGATE: West Coast Labs Premium Anti-Spam Certificated
Twitter: http://www.twitter.com/surgate
Blog: http://www.surgate.com/blog




Re: empf patch for qmail-ldap

2012-03-19 Thread Mario Remy Almeida

Hi Ismail,

Can you send me all the patches you have. I'll be starting with the 
latest qmail patch to test the bigbrother issue which I have.


With Best Regards,
Mario


*Subject:* empf patch for qmail-ldap
*Date:* Tue, 20 Mar 2012 02:17:02 +0200
*From:* Ismail YENIGUL 
*To:* qmail-ldap@qmail-ldap.org

Hello,

I just integrated http://www.inter7.com/?page=empf patch to qmail-ldap
This can be enable with -DEMPF option in Makefile.
Now my qmail-ldap tarball contains the following extra patches in 
addition to qmail-ldap 2012 patch:


* /qmail-ldap-envelope-scan patch
* inter7 empf patch///
* big quota patch

I can share my patch with anyone who needs empf feature.

Thanks.

--
Ismail YENIGUL
Team Leader / Takım Lideri
SurGATE Labs
Phone :+90 216-4709423 | Mobile:+90 533 747 36 65
SurGATE: West Coast Labs Premium Anti-Spam Certificated
Twitter: http://www.twitter.com/surgate
Blog: http://www.surgate.com/blog




gmail-greylist on CentOS 6.3

2012-08-30 Thread Mario Remy Almeida

Hi All,

Has anyone successed in compiling "gmail-greylist" from 
http://sourceforge.net/projects/qgreylist-pgsql/files/qmail-greylist-pgsql/v1.2.3%20release/ 
on CentOS 6.3 x86_64?


It seems default postgres-devel in CentOS 6 and above do not include 
/usr/lib64/libpq.a.


Re: gmail-greylist on CentOS 6.3

2012-09-04 Thread Mario Remy Almeida

Thanks Fran,

Let me give a try.

Subject: Re: gmail-greylist on CentOS 6.3
Date: Mon, 03 Sep 2012 08:39:11 +0200
From: Fran Márquez 
To: qmail-ldap@qmail-ldap.org


Hi Mario,

I didn't use that greylist system, but I tested jgreylist some time
ago. Maybe it is valid for you:

http://qmail.jms1.net/scripts/jgreylist.shtml

Regards,
Fran M.

El 30/08/2012 14:59, Mario Remy Almeida escribió:

Hi All,

Has anyone successed in compiling "gmail-greylist" from
http://sourceforge.net/projects/qgreylist-pgsql/files/qmail-greylist-pgsql/v1.2.3%20release/



on CentOS 6.3 x86_64?


It seems default postgres-devel in CentOS 6 and above do not
include /usr/lib64/libpq.a.




block attachments on per user basis

2012-09-17 Thread Mario Remy Almeida

Hi All,

Dose anyone has a patch for qmail-ldap to block attachments on per user 
basis?


For example:
us...@example.com is allowed to send emails but us...@example.com is not 
allowed to send emails with attachments.


Re: block attachments on per user basis

2012-09-17 Thread Mario Remy Almeida

Hi,

I have the attached patched which works fine, but its per IP base not 
per user. I need to know how can I read an attribute from ldap in 
qmail-smtpd.c.




Subject: Re: block attachments on per user basis
Date: Mon, 17 Sep 2012 15:47:28 +0100
From: Nicolas de Bari Embriz Garcia Rojas 
To: Mario Remy Almeida Cc: qmail-ldap@qmail-ldap.org


attachments + txt build the full email package so for been available
to allow user to send only attachments maybe you will need something
that could read the full package before releasing the email, maybe is
simpler to limit the user via send quota.

On Mon, Sep 17, 2012 at 1:03 PM, Mario Remy Almeida  wrote:

Hi All,

Dose anyone has a patch for qmail-ldap to block attachments on per user
basis?

For example:
us...@example.com is allowed to send emails but us...@example.com is not
allowed to send emails with attachments.




--- qmail-ldap-1.03-20120221.orig/execcheck.c	2012-09-14 22:17:21.0 +0400
+++ qmail-ldap-1.03-20120221/execcheck.c	2012-09-14 22:17:39.0 +0400
@@ -52,6 +52,7 @@
 
 static int checkexecutable = 0;
 static int flagexecutable;
+static int flagattachment;
 static stralloc signatures = {0};
 
 void
@@ -81,6 +82,12 @@
 	return flagexecutable;
 }
 
+int
+attachmentcheck_flag(void)
+{
+	return flagattachment;
+}
+
 static int
 signatures_match(stralloc *line, char *sig)
 {
@@ -107,6 +114,17 @@
 	return 0;
 }
 
+static int
+attachments_check(stralloc *line)
+{
+	char *s;
+	s = "Content-Disposition: attachment; filename=";
+
+	if(signatures_match(line, s))
+		return 1;
+	return 0;
+}
+
 static int linespastheader;	/* = 0 if in header (mime or mail)
 			 	 * = 1 line after blank line
  * = 2 somewhere in body
@@ -217,6 +235,7 @@
 	boundary_start = 0;
 	boundary_len = 0;
 	flagexecutable = 0;
+	flagattachment = 0;
 	flagrfc822 = 0;
 	linetype = ' ';
 }
@@ -243,6 +262,9 @@
 		 * in mail or mime header, search for content-type
 		 * and possible boundary
 		 */
+		if(attachments_check(&line))
+			flagattachment = 1;
+
 		if (line.len == 1) {	/* end of header */
 			linespastheader = 1;
 			if (content.len) /* MIME header */
--- qmail-ldap-1.03-20120221.orig/execcheck.h	2012-09-14 22:17:21.0 +0400
+++ qmail-ldap-1.03-20120221/execcheck.h	2012-09-14 22:17:39.0 +0400
@@ -40,6 +40,7 @@
 void execcheck_start(void);
 int execcheck_on(void);
 int execcheck_flag(void);
+int attachmentcheck_flag(void);
 void execcheck_put(struct qmail *, const char *);
 
 #endif
--- qmail-ldap-1.03-20120221.orig/qmail-smtpd.c	2012-09-14 22:17:21.0 +0400
+++ qmail-ldap-1.03-20120221/qmail-smtpd.c	2012-09-14 22:19:06.0 +0400
@@ -307,6 +307,9 @@
 unsigned int tarpitdelay = 5;
 unsigned int maxrcptcount = 0;
 unsigned int badrcptdelay = 0;
+int senderlocalflag = 0;
+int attachmentcheck = 0;
+int rcptlocalflag = 0;
 int greylist = 0;
 int sendercheck = 0;
 int rcptcheck = 0;
@@ -431,6 +434,7 @@
   if (env_get("BLOCKRELAYPROBE")) blockrelayprobe = 1;
   if (env_get("ENFORCEFQDNHELO")) enforcefqdnhelo = 1;
   if (env_get("SENDERCHECK")) {
+if (env_get("BLOCKATTACHMENT")) attachmentcheck = 1;
 sendercheck = 1;
 if (!case_diffs("LOOSE",env_get("SENDERCHECK"))) sendercheck = 2;
 if (!case_diffs("STRICT",env_get("SENDERCHECK"))) sendercheck = 3;
@@ -1180,6 +1184,7 @@
 
 switch (ldaplookup(addr.s, &s)) {
   case 1: /* valid */
+	senderlocalflag = 1;
 	logline(4,"sender verify OK");
 break;
   case 0: /* invalid */
@@ -1306,6 +1311,7 @@
 
   /* check if recipient exists in ldap */
   if (rcptcheck) {
+rcptlocalflag = 0;
 if (!goodmailaddr()) {
   logline(4,"recipient verify, recipient not in goodmailaddr");
   if (addrlocals()) {
@@ -1313,6 +1319,7 @@
 	logline(4,"recipient verify, recipient is local");
 switch (ldaplookup(addr.s, &s)) {
   case 1: /* valid */
+	rcptlocalflag = 1;
 	logline(4,"recipient verify OK");
 break;
   case 0: /* invalid */
@@ -1694,6 +1701,18 @@
   }
 #endif
 
+#ifdef SMTPEXECCHECK
+/* check if the email has attachment*/
+if (attachmentcheck) {
+  if (senderlocalflag && attachmentcheck_flag() && !rcptlocalflag) {
+  //out("552 You are not allowed to send email with attachment other then to local address (#5.3.5)\r\n");
+  logline(3,"email with attachment other then to local address denied");
+  if (errdisconnect) err_quit();
+return;
+  }
+}
+#endif
+
   logpid(1);
   if (*qqx == 'D') {
 out("554 "); logstring(1,"message permanently not accepted because: ");
--- qmail-ldap-1.03-20120221.orig/QLDAPINSTALL	2012-09-14 22:17:21.0 +0400
+++ qmail-ldap-1.03-20120221/QLDAPINSTALL	2012-09-14 22:17:39.0 +0400
@@ -1087,6 +1087,14 @@
  Affects: