Hello,
Something along the lines of the following could work - in
a bit of testing, you actually have to have a userid of user@
for this method to work, it'd be nice if you could just specify
an alias (but I don't want to mess with that right now :).
Disclaimer: please don't use in production w/o testing; it may
not work.
diff -u pipe.c newpipe.c
--- pipe.c 2003-03-17 09:04:08.000000000 -0700
+++ newpipe.c 2003-10-08 09:00:29.000000000 -0600
@@ -224,13 +224,38 @@
"checking for domain aliases. Domain = [%s]",domain);
/* checking for domain aliases */
- auth_check_user(domain,&userids,-1);
+ this_user = auth_check_user(domain,&userids,-1);
trace (TRACE_DEBUG,"insert_messages(): "
"domain [%s] found total of [%d] aliases",domain,
userids.total_nodes);
}
}
+ /* we did not find any direct delivers for this user
+ nor any domain forwards - try user catch-all */
+ if (this_user==0)
+ {
+ trace (TRACE_INFO,"insert_messages(): domain forwards found to
deliver to. "
+ "Checking for user catch-alls");
+
+ strncpy((char *)tmp->data,userid_string,MAX_U64_STRINGSIZE -1);
+ userid_string[MAX_U64_STRINGSIZE] = '\0';
+
+ if (strchr((char *)userid_string, '@')!=NULL)
+ {
+ strchr((char *)userid_string, '@')[1] = '\0';
+
+ trace (TRACE_DEBUG,"insert_messages(): "
+ "checking for user catch-alls. User =
[%s]",userid_string);
+
+ /* checking for user catch-alls */
+ auth_check_user(userid_string,&userids,-1);
+ trace (TRACE_DEBUG,"insert_messages(): "
+ "user [%s] found total of [%d]
aliases",userid_string,
+ userids.total_nodes);
+ }
+ }
+
/* user does not exists in aliases tables
so bounce this message back with an error message */
if (userids.total_nodes==0)
---- Original Message ----
From: Jesse Norell <[email protected]>
To: [email protected]
Subject: RE: [Dbmail] question...
Sent: Wed, 8 Oct 2003 08:26:42 -0600 (MDT)
>
> Hello,
>
> Right now that cannot be done within dbmail. You might look at
> the capabilities of your mta - eg. you could do that with postfix
> (I believe using the virtual map). One time, about a year ago,
> someone on the irc channel asked that message and we through together
> a trivial patch to allow that to happen... it might still be in
> someone's irc logs (eg. probably mine), or it would be easy to
> recreate. We simply changed the place where it handles domain
> catchalls ("@domain.com") and had it look for a user catch-all first;
> possibly that order should be reversed, but either way will be
> backward compatible, as you don't have user catch-alls currently.
>
> There are definite implications if you use postfix
> local_recipient_maps pointing to the aliases table, which probably
> can be handled, but I've not thought through/tested them.
>
>
> ---- Original Message ----
> From: Doug Stanley <[email protected]>
> To: [email protected]
> Subject: [Dbmail] question...
> Sent: Wed, 08 Oct 2003 09:19:19 -0400
>
> > If I have multiple domains, is there a way I can define a single
> > user...say sales and so any mail to [EMAIL PROTECTED] goes all to
> > the same place? It gets very annoying all the junk mail randomly
> > sent to sales@ each of my domains...also info@ too...anyays...
> > Can i just put sales in the alias table instead of [EMAIL PROTECTED] for
> > example?
> >
> > Doug
> >
> > _______________________________________________
> > Dbmail mailing list
> > [email protected]
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> -- End Original Message --
>
>
> --
> Jesse Norell
> jesse (at) kci.net
>
>
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
-- End Original Message --
--
Jesse Norell
jesse (at) kci.net