Yeah, something like that ought to work.  I think postfix catch-all
aliases will still work, you just need to put entries in dbmail's
aliases table for them (eg. alias = "@yourdomain" deliver_to = your
email addr).


---- Original Message ----
From: Micah Stevens <[email protected]>
To: [email protected]
Subject: Re: [Dbmail] forwarded bounces
Sent: Thu, 12 Jun 2003 11:00:22 -0700

> Ack, sorry, it would have to be:
> 
> select_field = deliver_to
> where_field = alias
> additional_conditions = and deliver_to is like '[EMAIL PROTECTED]'
> 
> of course that doesn't consider how postfix expects catch all aliases to 
> appear. 
> 
> -Micah
> 
> On Thu June 12 2003 10:56 am, Micah Stevens wrote:
> > How about I make the virtual.cf use this query:
> >
> > --- virtual.cf
> >
> > # the database name on the servers
> > dbname = dbmail
> >
> > # the table name
> > table = aliases
> >
> > select_field = dest
> > where_field = alias
> > additional_conditions = and deliver_to is like '[EMAIL PROTECTED]'
> >
> > ----
> >
> > wouldn't that just return a list of forwarded addresses only as any direct
> > delivery wouldn't include the '@' sign?
> >
> > -Micah
> >
> > On Thu June 12 2003 10:48 am, Jesse Norell wrote:
> > > Hello,
> > >
> > > > alright, I undertstand. Thanks for doing that research Jesse.
> > >
> > >   Oh sure ... we're gonna need to fix that for our setup here too
> > > (or rewrite some inhouse apps, but fixing dbmail would be better).
> > >
> > > > Has anyone set up a postfix query to pull just forwarding aliases from
> > > > thhe dbmail alias table? it would be inconvenient to make a new table.
> > >
> > >   You don't want to do that - a normal dbmail alias entry has the
> > > user_idnr as the deliver_to, so when postfix sees that it'll try to
> > > forward to a user of that name (eg. [EMAIL PROTECTED]).
> > >
> > > > Probably wouldn't be that hard I suppose, I'll have a go at it.
> > >
> > >   It's pretty simple - as seems the normal case, our setup is a
> > > little more complex :), but here's what we use (this in postgres):
> > >
> > > create table postfix_aliases (
> > >   idnr          serial,
> > >   alias         varchar(255) not null,
> > >   recipient     varchar(255) not null,
> > >   host          varchar(255) null default '',
> > >   disabled      bit not null default B'0',
> > >   comment       varchar(255) null
> > > );
> > >
> > > grant select on postfix_aliases to postfix;
> > >
> > >
> > >   And our .cf entry for postfix to use this is:
> > >
> > > user = postfix
> > > password = something
> > > dbname = dbmail
> > > hosts = dbhostname
> > >
> > > table = postfix_aliases
> > > select_field = recipient
> > > where_field = alias
> > > additional_conditions = host in ('','mail2','mail2.kci.net') and disabled
> > > = B'0'
> > >
> > >
> > >   This example was from mail2.kci.net, and the setup allows for
> > > aliases to only exist on one of the mail servers (we have multiple
> > > dbmail servers for the same db).  You can drop the host, disabled,
> > > and comments fields from the table, and the additional_conditions
> > > from the .cf file.  You also need a line in main.cf pointing to this,
> > > of course, eg.:
> > >
> > > alias_maps = proxy:pgsql:/etc/postfix/postfix_aliases.cf
> > >
> > > > -Micah
> > > >
> > > > On Thu June 12 2003 10:05 am, Jesse Norell wrote:
> > > > > Hello,
> > > > >
> > > > >   From rfc 2821, we have excerpts:
> > > > >
> > > > > "SMTP servers performing a relay function MUST NOT inspect the
> > > > > message data, and especially not to the extent needed to determine
> > > > > if Return-path headers are present."
> > > > >
> > > > > and
> > > > >
> > > > > "     a gateway from elsewhere->SMTP SHOULD delete any return-path
> > > > >       header present in the message, and either copy that information
> > > > > to the SMTP envelope or combine it with information present in the
> > > > > envelope of the other transport system to construct the reverse path
> > > > > argument to the MAIL command in the SMTP envelope."
> > > > >
> > > > >   So, if dbmail is considered part of the SMTP implimentation, it
> > > > > is broken, and shouldn't remove the Return-Path: that was there - but
> > > > > I don't think it is part of SMTP, it's more a "gateway from
> > > > > elsewhere" which becomes an SMTP sender, in which case it SHOULD make
> > > > > this work right, but strictly speaking, doesn't have to.
> > > > >
> > > > >   In short, use postfix aliases right now, and this should be put on
> > > > > a todo list to fix in dbmail (ie. when it strips the Return-Path:
> > > > > out of a message it is forwarding somewhere, use that address as the
> > > > > envelop sender in MAIL FROM command).
> > > > >
> > > > > Later...
> > > > >
> > > > > ---- Original Message ----
> > > > > From: Jesse Norell <[email protected]>
> > > > > To: [email protected]
> > > > > Subject: Re: [Dbmail] forwarded bounces
> > > > > Sent: Thu, 12 Jun 2003 10:42:23 -0600 (MDT)
> > > > >
> > > > > > Heh...
> > > > > >
> > > > > >   It just occured to me, that I am using a dbmail forward myself as
> > > > > > of last weekend.  Looking that this message (the one I'm replying
> > > > > > to), there is a single "Return-Path: <[EMAIL PROTECTED]>" header. 
> > > > > > That will be where bounces are sent, and from some testing it looks
> > > > > > like that is inserted by the smtp receiver, using the MAIL FROM
> > > > > > address. (There was no Return-Path: in the message headers of what
> > > > > > dbmail sent me on a forward, so the one I see has to be added by
> > > > > > the local smtp receiver).  Lemme see what I can find in rfc 2822.
> > > > > >
> > > > > >
> > > > > > ---- Original Message ----
> > > > > > From: Jesse Norell <[email protected]>
> > > > > > To: [email protected]
> > > > > > Subject: Re: [Dbmail] forwarded bounces
> > > > > > Sent: Thu, 12 Jun 2003 09:23:59 -0600 (MDT)
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > >   You might need to use postfix aliases for this right now, which
> > > > > > > work the way you want.  I'll try testing a dbmail off-site
> > > > > > > forward and see if I get the same results.  Can you look in the
> > > > > > > relayed message for Return-Path: headers?  See if there are
> > > > > > > multiple ones there, or just one with [EMAIL PROTECTED] (or none
> > > > > > > at all, I guess). I'd have to look at the rfc for proper
> > > > > > > behavior, but it seems dbmail should leave the Return-Path: that
> > > > > > > postfix puts in there alone, so the far end replies to that
> > > > > > > address.  If dbmail changes it itsself (which I kind of doubt),
> > > > > > > it's probably broken. If the far end smtp server is putting a
> > > > > > > Return-Path: from the smtp MAIL FROM command, then... I don't
> > > > > > > know if it ought to be configured not to do that when a
> > > > > > > Return-Path: is already present, of if dbmail should use the
> > > > > > > Return-Path: address in it's MAIL FROM command - but one or the
> > > > > > > other should probably fix it.
> > > > > > >
> > > > > > > More ramblings from the desk of,
> > > > > > > Jesse
> > > > > > >
> > > > > > > ---- Original Message ----
> > > > > > > From: Micah Stevens <[email protected]>
> > > > > > > To: [email protected]
> > > > > > > Subject: Re: [Dbmail] forwarded bounces
> > > > > > > Sent: Thu, 12 Jun 2003 07:59:51 -0700
> > > > > > >
> > > > > > > > Yes, that entry is:
> > > > > > > > dbmail    unix  -       n       n       -       -       pipe
> > > > > > > >   flags=R  user=dbmail:dbmail argv=/usr/local/sbin/dbmail-smtp
> > > > > > > > -d ${recipient}
> > > > > > > >
> > > > > > > > On Thu June 12 2003 7:21 am, Jesse Norell wrote:
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > >   Do you have flags=R in your master.cf entry for dbmail?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ---- Original Message ----
> > > > > > > > > From: Micah Stevens <[email protected]>
> > > > > > > > > To: [email protected]
> > > > > > > > > Subject: [Dbmail] forwarded bounces
> > > > > > > > > Sent: Wed, 11 Jun 2003 22:30:01 -0700
> > > > > > > > >
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > As I have many forwarded aliases to other domain in the
> > > > > > > > > > table, I've been noticing that if a mail is forwarded
> > > > > > > > > > through dbmail and gets rejected from the recipient's
> > > > > > > > > > server, the mail gets bounced to postmaster at the dbmail
> > > > > > > > > > domain. Ideally, the error notice should then get sent back
> > > > > > > > > > to the original sender, but it's just getting dropped into
> > > > > > > > > > my postmaster account.
> > > > > > > > > >
> > > > > > > > > > Is this behavior standard for mail forwarding or is it
> > > > > > > > > > peculiar to dbmail? It seems wrong as the sender will never
> > > > > > > > > > know that the mail was not recieved, but I wasn't sure if
> > > > > > > > > > there was a technical hurdle for this happen or not. If I
> > > > > > > > > > was using Postfix for forwarding, would it behave
> > > > > > > > > > differently?
> > > > > > > > > >
> > > > > > > > > > My other thought was that there was something configured
> > > > > > > > > > wrong, but I couldn't think of what to change. I'm running
> > > > > > > > > > dbmail CVS as of a couple of months ago, with MySQL /
> > > > > > > > > > Postfix.
> > > > > > > > > >
> > > > > > > > > > Thanks for any insight on this,
> > > > > > > > > > -Micah
> > > > > > > > > >
> > > > > > > > > > _______________________________________________
> > > > > > > > > > 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
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > 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
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > 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
> > > >
> > > > _______________________________________________
> > > > 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
> >
> > _______________________________________________
> > Dbmail mailing list
> > [email protected]
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> 
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
> 
-- End Original Message --


--
Jesse Norell
jesse (at) kci.net


Reply via email to