Re: recipient_delimiter and virtual users

2009-02-12 Thread mouss
post...@corwyn.net a écrit :
 
 
 OK, so I've become intrigued with recipient delimiters.
 
 My users are currently stored in a mysql database, 'postfix'.  The table
 format is as postfixadmin sets it up, so in the  username is the user
 email address u...@example.com
 
 Before I started tinkering, email to u...@example.com worked. Email to
 user+...@example.com failed with unknown recipient, all well and good.
 
 It looks like even with recipient_delimiter = + set, mail is still
 bounced for the same reason. I theorize that recipient_delimiter is
 actually checked at the end of the address such that with it enabled
 what I really have is u...@example.com+foo working (which, of course,
 won't work).
 
 Does this mean that I can't really use recipient_delimiter with my users
 defined as u...@example.com? If so, I presume I need to munge up (even
 more) my SQL statement so that instead of checking for username='%s' 
 I'm going to need to strip %s apart into its constituent components and
 then reassemble it, so that user+...@example.com, user+...@example.com
 works?  Or would I just use '%d', which looks like it might be the left
 side of the email address (tho I'd still have to make the SQL match that).
 
 The end result that would be cool would be that if foo was defined as a
 folder, mail would get delivered there, and if not mail would be
 delivered to the default inbox.
 
 I can currently (with my existing sql) create a second user
 user+...@example.com and get mail to deliver to inbox/foo , but that
 means that a) I have to maintain a u...@example.com AND a
 user+...@example.com, and additionally if I want to add additional
 extensions I have to create additional accounts, which seems tiresome.
 
 Thanks for any guidance!
 

recipient_delimiter works out of the box. there is no need to change
your tables, your sql statements nor add users.

if it doesn't work for you, then you have something misconfigured. to
get help, follow the directions in
http://www.postfix.org/DEBUG_README.html#mail

In particular:
- logs
- postconf -n




Re: recipient_delimiter and virtual users

2009-02-12 Thread postfix

At 04:28 AM 2/12/2009, mouss wrote:

recipient_delimiter works out of the box. there is no need to change
your tables, your sql statements nor add users.


The problem is I don't know what the out of the box behavior should be.

If I set recipient_delimiter = + then mail to u...@example.com, 
user+...@example.com, and user+spam all deliver to INBOX, regardless 
of whether there is a spam or foo folder created.


What I want is, without having to set filters in the client, for mail 
to deliver to the appropriate folder.


What is the default behavior I should expect from recipient_delimiter 
with user+...@example.com? Should mail:

go to the default inbox always, or
go to a folder foo if it's been created and inbox otherwise
go to a folder foo if it's been created, or if the folder isn't there 
create foo and place the mail in that folder?


Once I know what it should do, it's a lot easier for me to figure out 
what's broken/misconfigured :-) and ask for help appropriately.


Thanks!

Rick





Re: recipient_delimiter and virtual users

2009-02-12 Thread Victor Duchovni
On Thu, Feb 12, 2009 at 12:33:57PM -0500, post...@corwyn.net wrote:

 At 04:28 AM 2/12/2009, mouss wrote:
 recipient_delimiter works out of the box. there is no need to change
 your tables, your sql statements nor add users.

 The problem is I don't know what the out of the box behavior should be.

 If I set recipient_delimiter = + then mail to u...@example.com, 
 user+...@example.com, and user+spam all deliver to INBOX, regardless of 
 whether there is a spam or foo folder created.

 What I want is, without having to set filters in the client, for mail to 
 deliver to the appropriate folder.

This up to your LDA. No LDA bundled with Postfix understands folders.
Cyrus IMAP understands folders, and even knows that user+foo only
goes to folder foo when the folder's ACL allows anonymous POST,
otherwise mail goes to the Inbox.

These issues are dealt with by Mailstore aware delivery agents, not
the MTA. Deploy a delivery agent that co-operates with your mailstore
(Cyrus, Dovecot, ...). Postfix will pass the address and extension to
the delivery agent.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
mailto:majord...@postfix.org?body=unsubscribe%20postfix-users

If my response solves your problem, the best way to thank me is to not
send an it worked, thanks follow-up. If you must respond, please put
It worked, thanks in the Subject so I can delete these quickly.