Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

netqmail: reject unknown recipients during SMTP

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


pape at smarden

Aug 31, 2009, 4:01 AM

Post #1 of 8 (3184 views)
Permalink
netqmail: reject unknown recipients during SMTP

Hi, IIRC there was a plan to include functionality similar to the
qmail-realrcptto patch from Paul[0] into netqmail, possibly implemented
in a separate service daemon. Is this still the plan, or even work in
progress?

Thanks, Gerrit.

[0] http://code.dogmap.org/qmail/


feh at fehcom

Aug 31, 2009, 4:16 AM

Post #2 of 8 (3034 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

Hi Gerrit,



On Mon, 31 Aug 2009 13:01:34 +0200, Gerrit Pape <pape [at] smarden> wrote:

> Hi, IIRC there was a plan to include functionality similar to the
> qmail-realrcptto patch from Paul[0] into netqmail, possibly implemented
> in a separate service daemon. Is this still the plan, or even work in
> progress?
>
> Thanks, Gerrit.
>
> [0] http://code.dogmap.org/qmail/

Did you look at my RECIPIENTS extension for qmail recently ?

Maybe you find a solution fetching the valid recipient addresses from LDAP
more attractive.

Though the patch is build for qmail-1.03; there should be no problems with
netqmail-1.06.

regards.
--eh.

--
Dr. Erwin Hoffmann | FEHCom | http://www.fehcom.de


ar-djblists at acrconsulting

Aug 31, 2009, 4:22 AM

Post #3 of 8 (3035 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

On Monday 31 August 2009, Gerrit Pape wrote:
> Hi, IIRC there was a plan to include functionality similar to the
> qmail-realrcptto patch from Paul[0] into netqmail, possibly
> implemented in a separate service daemon. Is this still the plan,
> or even work in progress?

That sounds like my qmail-verify, it's basically qmail-realrcptto
separated into a daemon, with just the UDP glue in qmail-smtpd to call
it:

http://free.acrconsulting.co.uk/email/qmail-verify.html

It applies cleanly onto netqmail (see the web page for details).

cheers,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================


pape at smarden

Sep 7, 2009, 8:06 AM

Post #4 of 8 (2944 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

On Mon, Aug 31, 2009 at 11:01:34AM +0000, Gerrit Pape wrote:
> Hi, IIRC there was a plan to include functionality similar to the
> qmail-realrcptto patch from Paul[0] into netqmail, possibly implemented
> in a separate service daemon. Is this still the plan, or even work in
> progress?

Hi, I would be interested to have such functionality included in
netqmail (and not another fork). Can anyone from the netqmail team
comment on whether this plan

http://article.gmane.org/gmane.mail.qmail.general/53691

is still a plan, work in progress, or canceled?

Thanks, Gerrit.


lists-qmail at maexotic

Sep 7, 2009, 8:36 AM

Post #5 of 8 (2948 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

On Mon, Sep 07, 2009 at 03:06:19PM +0000, Gerrit Pape wrote:
> is still a plan, work in progress, or canceled?

from qmail.org:
- Andrew Richards has modified Paul Jarc's realrcptto into qmail-verify.
It now uses UDP for privilege separation which also allows an incoming
mail server to query a separate mailstore for larger installations.
http://free.acrconsulting.co.uk/email/qmail-verify.html

\Maex

--
Markus Stumpf


pape at smarden

Sep 9, 2009, 8:52 AM

Post #6 of 8 (2914 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

On Mon, Sep 07, 2009 at 05:36:09PM +0200, Markus Stumpf wrote:
> On Mon, Sep 07, 2009 at 03:06:19PM +0000, Gerrit Pape wrote:
> > is still a plan, work in progress, or canceled?
>
> from qmail.org:
> - Andrew Richards has modified Paul Jarc's realrcptto into qmail-verify.
> It now uses UDP for privilege separation which also allows an incoming
> mail server to query a separate mailstore for larger installations.
> http://free.acrconsulting.co.uk/email/qmail-verify.html

Thanks, I know that, and already have seen the reply from Andrew. My
question was to the netqmail maintainers about the inclusion of this
functionality into netqmail. I take the non-answer that there's no plan
anymore.

Regards, Gerrit.


kyle-qmail at memoryhole

Sep 9, 2009, 12:36 PM

Post #7 of 8 (2915 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wednesday, September 9 at 03:52 PM, quoth Gerrit Pape:
>On Mon, Sep 07, 2009 at 05:36:09PM +0200, Markus Stumpf wrote:
>> On Mon, Sep 07, 2009 at 03:06:19PM +0000, Gerrit Pape wrote:
>> > is still a plan, work in progress, or canceled?
>>
>> from qmail.org:
>> - Andrew Richards has modified Paul Jarc's realrcptto into qmail-verify.
>> It now uses UDP for privilege separation which also allows an incoming
>> mail server to query a separate mailstore for larger installations.
>> http://free.acrconsulting.co.uk/email/qmail-verify.html
>
> Thanks, I know that, and already have seen the reply from Andrew.
> My question was to the netqmail maintainers about the inclusion of
> this functionality into netqmail. I take the non-answer that
> there's no plan anymore.

Not as such, but after a long stasis, it's getting some attention.

~Kyle
- --
Disobedience, in the eyes of any one who has read history, is man's
original virtue. It is through disobedience that progress has been
made, through disobedience and through rebellion.
-- Oscar Wilde
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKqAPXAAoJECuveozR/AWe1iAP/Ax64MBbEw4tr8+B5Z8jzxWR
FEIgSxF1l1XrA+Na/pElp9bO2FfDGsN/ATzuyX53owv52OEvYv7mYnRXwZqBL0ZO
aIV/Ct0XYgW+ZxUYBqT6kMlV1ddbJs4lXo1QNUDzA4jL1Y3OkPaZsh0IXt10wddO
g+q/0p+JE7fZc6mAueVt7ETpvgDa/wA7vDkIQbiu6QwHeQPM3Y0BLuKf6wIbZTMy
5OXp0cZZ/Dg70xylWpIjr0b4m0pMUM3axomzL0gHt3pzaD1p1/zOWqTIyDXN9iXF
cRpMUqWXMISbY7MI9GvVLeP/XFPha/oMLC9gQBz7rJWbj1e7+Vd83F0lWyXYMVOg
jmWmEKQTRK2OsTdkqOU6BklrU6h6i1cOn1MOTwSaXUw8y5KZYI2WZ3KepHXpta1A
ZRrlFehWNzNW0KV74sJW0t2YU/eI4DOATldU/1Qbg4KZlGz2wFYb9Bt+6Z5/8sZO
xZYJF94jk5Zn047ymHptvp/x0NkydS2ZX5sHLOEJmz9qS/I4rOxQJpsQmx1WHSRL
2lyYJW7o6YwDEH3I21j1aO4wdiKVlkiowpiUyzd+dBYjPnDMKTZ+Ay55Gi2ctAQ0
qVkl17KEZqySDYAHqgAUUEujpAj3YntfMHTiVvujTAzrRqvt66Mrqdp1C4dWsRyk
QQP25ioiHvP9B5DpLOrZ
=T2iN
-----END PGP SIGNATURE-----


pape at smarden

Mar 22, 2010, 9:04 AM

Post #8 of 8 (1693 views)
Permalink
Re: netqmail: reject unknown recipients during SMTP [In reply to]

On Wed, Sep 09, 2009 at 02:36:55PM -0500, Kyle Wheeler wrote:
> On Wednesday, September 9 at 03:52 PM, quoth Gerrit Pape:
> >On Mon, Sep 07, 2009 at 05:36:09PM +0200, Markus Stumpf wrote:
> >> On Mon, Sep 07, 2009 at 03:06:19PM +0000, Gerrit Pape wrote:
> >> > is still a plan, work in progress, or canceled?
> >>
> >> from qmail.org:
> >> - Andrew Richards has modified Paul Jarc's realrcptto into qmail-verify.
> >> It now uses UDP for privilege separation which also allows an incoming
> >> mail server to query a separate mailstore for larger installations.
> >> http://free.acrconsulting.co.uk/email/qmail-verify.html
> >
> > Thanks, I know that, and already have seen the reply from Andrew.
> > My question was to the netqmail maintainers about the inclusion of
> > this functionality into netqmail. I take the non-answer that
> > there's no plan anymore.
>
> Not as such, but after a long stasis, it's getting some attention.

Hi, the delayed-bounce issue with qmail is one thing that I personally
think needs to be fixed. Since years I've replaced the qmail-smtp
service with mailfront, and so am able to bounce most of the junk-mail
during the smtp session.

For Debian[0] I proposed packages that include the qmail-verify patch
and its prerequisite the errmsg-logging patch, both from Andrew
Richards. Since for Debian a mail tranfer agent must support
/etc/aliases, I patched the qmail-verify patch to additionally check a
fasforward CDB if told so and if ~alias/.qmail-default exists. See
below for the patch, review and comments welcome.

May I ask again whether you motley krewe of qmail contributors plan to
include these patches into netqmail? I'd suggest to do so.

Thanks, Gerrit.

[0]
http://bugs.debian.org/510415
http://ftp-master.debian.org/new.html

-------

From e0a12b4e5772df5b656ea4cf7b7e6e2d39b9bc55 Mon Sep 17 00:00:00 2001
From: Gerrit Pape <pape [at] smarden>
Date: Fri, 5 Mar 2010 01:14:31 +0000
Subject: [PATCH 3/3] qmail-verify: optionally check aliases.cdb if fastforward is used

If qmail-verify finds ~alias/.qmail-default and the environment variable
VERIFY_FASTFORWARDCDB is set to e.g. /etc/aliases.cdb, instead of allowing
all addresses it will lookup the recipient address in that constant
database, and only allow the address if a matching entry is found.
---
qmail-verify.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/qmail-verify.c b/qmail-verify.c
index 641f920..a33c20d 100644
--- a/qmail-verify.c
+++ b/qmail-verify.c
@@ -164,6 +164,49 @@ int userext() /* from qmail-getpw.c */
}
}

+int verify_aliasescdb(addr, fn)
+char *addr;
+char *fn;
+{
+ int fd;
+ static stralloc key = {};
+ uint32 dlen;
+ int r;
+ int at;
+
+ fd = open_read(fn);
+ if (fd == -1) die_cdb();
+ if (!stralloc_copys(&key,":")) die_nomem();
+ if (!stralloc_cats(&key,addr)) die_nomem();
+ case_lowerb(key.s,key.len);
+
+ r = cdb_seek(fd,key.s,key.len,&dlen);
+ if (r == -1) die_cdb();
+ if (r) { close(fd); return 1; }
+
+ at = str_rchr(addr,'@');
+ if (!addr[at]) { close(fd); return 0; }
+
+ if (!stralloc_copys(&key,":")) die_nomem();
+ if (!stralloc_cats(&key,addr + at)) nomem();
+ case_lowerb(key.s,key.len);
+
+ r = cdb_seek(fd,key.s,key.len,&dlen);
+ if (r == -1) die_cdb();
+ if (r) { close(fd); return 1; }
+
+ if (!stralloc_copys(&key,":")) nomem();
+ if (!stralloc_catb(&key,addr,at + 1)) nomem();
+ case_lowerb(key.s,key.len);
+
+ r = cdb_seek(fd,key.s,key.len,&dlen);
+ if (r == -1) die_cdb();
+ close(fd);
+ if (r) return 1;
+
+ return 0;
+}
+
int verifyaddr(addr)
char *addr;
{
@@ -351,7 +394,16 @@ char *addr;
if (!stralloc_cats(&qme,"default")) die_nomem();
if (!stralloc_0(&qme)) die_nomem();
/* e.g. homedir/.qmail-[xxx-]default */
- if (stat(qme.s,&st) == 0) return allowaddr(addr,ADDR_OK|QVPOS12);
+ if (stat(qme.s,&st) == 0) {
+ /* if it's ~alias/.qmail-default, optionally check aliases.cdb */
+ if (!i && (quser == auto_usera)) {
+ char *s;
+ if (s = env_get("VERIFY_FASTFORWARDCDB"))
+ if (!verify_aliasescdb(addr, s))
+ return denyaddr(addr,ADDR_NOK|QVPOS12);
+ }
+ return allowaddr(addr,ADDR_OK|QVPOS12);
+ }
if (errno != error_noent) /* Maybe not running as root so access denied */
return stat_error(qme.s,errno,STATERR|QVPOS13);
}
--
1.7.0

-------
$ cat qmail-verify/run
#!/bin/sh

exec 2>&1

if CDB=$(grep fastforward ~alias/.qmail-default 2>&1); then
CDB=${CDB#|*fastforward}
CDB=${CDB##*-* }
test -z "$CDB" ||
exec env VERIFY_FASTFORWARDCDB="$CDB" /var/qmail/bin/qmail-verify
fi

exec /var/qmail/bin/qmail-verify

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.