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