Loading ...
Sorry, an error occurred while loading the content.
 

Re: Plus addressing not delivering to folder

Expand Messages
  • Noel Jones
    ... have you defined a user+test@example.com entry in your virtual_mailbox_maps? http://www.postfix.org/postconf.5.html#virtual_mailbox_maps -- Noel Jones
    Message 1 of 25 , Feb 27, 2009
      Charles Marcus wrote:
      > Hello,
      >
      > I'm sure this is something I'm totally missing but I have a system I'm
      > trying to get plus addressing working, and not having any luck. The
      > email is delivered, but just to the Inbox, not to the folder...
      >
      > I've got the recipient delimiter enabled in main.cf (output of postconf
      > -n shows it enabled). I'm using virtual mailbox domains/maps and the
      > postfix virtual delivery agent. The folder 'test' (minus the quotes)
      > does exist... but not as a subdirectory of Inbox (is that the problem?).
      >
      > Here's the log of the received mail that didn't get delivered to the sub
      > folder:
      >
      > Feb 27 17:26:06 myhost postfix/smtpd[14440]: connect from
      > ixe-mta-18-tx.emailfiltering.com[194.116.198.213]
      > Feb 27 17:26:07 myhost postfix/smtpd[14440]: 87CA049C274:
      > client=ixe-mta-18-tx.emailfiltering.com[194.116.198.213]
      > Feb 27 17:26:07 mmyhost postfix/cleanup[14446]: 87CA049C274:
      > message-id=<49A8687B.8080604@...>
      > Feb 27 17:26:07 mmyhost postfix/qmgr[1524]: 87CA049C274:
      > from=<user@...>, size=1378, nrcpt=1 (queue active)
      > Feb 27 17:26:07 myhost postfix/virtual[14449]: 87CA049C274:
      > to=<user+test@...>, relay=virtual, delay=0.47,
      > delays=0.47/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
      > Feb 27 17:26:07 myhost postfix/qmgr[1524]: 87CA049C274: removed
      >

      have you defined a "user+test@..." entry in your
      virtual_mailbox_maps?
      http://www.postfix.org/postconf.5.html#virtual_mailbox_maps

      -- Noel Jones
    • Victor Duchovni
      ... Plus addressing is working, mail for user+test is delivered to the mailbox of user . ... -- Viktor. Disclaimer: off-list followups get on-list replies
      Message 2 of 25 , Feb 27, 2009
        On Fri, Feb 27, 2009 at 05:48:35PM -0500, Charles Marcus wrote:

        > I'm sure this is something I'm totally missing but I have a system I'm
        > trying to get plus addressing working, and not having any luck. The
        > email is delivered, but just to the Inbox, not to the folder...

        Plus addressing is working, mail for "user+test" is delivered to the
        mailbox of "user".

        > Feb 27 17:26:07 myhost postfix/virtual[14449]: 87CA049C274:
        > to=<user+test@...>, relay=virtual, delay=0.47,
        > delays=0.47/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
        > Feb 27 17:26:07 myhost postfix/qmgr[1524]: 87CA049C274: removed

        --
        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:majordomo@...?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.
      • mouss
        ... what is a folder ? are you confusing postfix with an imap server? postfix delivers mail for virtual mailbox domains to the place defined in
        Message 3 of 25 , Feb 27, 2009
          Charles Marcus a écrit :
          > Hello,
          >
          > I'm sure this is something I'm totally missing but I have a system I'm
          > trying to get plus addressing working, and not having any luck. The
          > email is delivered, but just to the Inbox, not to the folder...
          >
          > I've got the recipient delimiter enabled in main.cf (output of postconf
          > -n shows it enabled). I'm using virtual mailbox domains/maps and the
          > postfix virtual delivery agent. The folder 'test' (minus the quotes)
          > does exist... but not as a subdirectory of Inbox (is that the problem?).
          >


          what is a "folder"? are you confusing postfix with an imap server?

          postfix delivers mail for virtual mailbox domains to the place defined
          in virtual_mailbox_maps.

          you can cheat by setting different virtual_mailbox_maps for "plus-sed"
          addresses. but you must keep in mind that postfix doesn't care.
        • LuKreme
          ... It is not postfix s job to deliver to the folder, you would need to use procmail or maildrop or something like that. Postfix is delivering to the user
          Message 4 of 25 , Feb 27, 2009
            On 27-Feb-2009, at 15:48, Charles Marcus wrote:
            > I'm sure this is something I'm totally missing but I have a system I'm
            > trying to get plus addressing working, and not having any luck. The
            > email is delivered, but just to the Inbox, not to the folder...

            It is not postfix's job to deliver to the folder, you would need to
            use procmail or maildrop or something like that. Postfix is
            delivering to the user correctly.

            This is my setup:

            master.cf:
            procmail unix - n n - - pipe
            -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
            USER=${recipient} EXTENSION=${extension} /usr/local/etc/
            procmailrc.common

            main.cf:
            virtual_transport = procmail

            procmailrc.common:
            :0
            * ! EXTENSION ?? ^^^^
            {
            :0
            * $ USER ?? $\EXTENSION@
            {
            :0
            * USER ?? ^\/[^+]+
            { SHORTU = $MATCH }

            :0
            * USER ?? @\/.*
            { SHORTD = $MATCH }

            :0
            { USER = "${SHORTU}@${SHORTD}" }
            }
            }

            :0
            * ! EXTENSION ?? ^^^^
            .$EXTENSION/

            YMMV. The last part is what delivers user+test to .test/ I honestly
            cannot remember why I needed the first recipe, but I did.

            BTW, since so many brain dead web monkeys insist that '+' is an
            invalid character in an email address, I decided to use TWO recipient
            delimiters, + and _ and I've only come across one site that refused to
            accept a username with an _


            --
            This story shall the good man teach his son; And Crispin Crispian shal
            ne'er go by, From this day to the ending of the world, But we in it
            shall be remember'd;
          • Charles Marcus
            ... OK, so from the responses its obvious I had a flawed expectation... not the first time, thats for sure. Hmmm... I m now wondering if ${extension} can
            Message 5 of 25 , Mar 6, 2009
              >> I'm sure this is something I'm totally missing but I have a system I'm
              >> trying to get plus addressing working, and not having any luck. The
              >> email is delivered, but just to the Inbox, not to the folder...
              >>
              >> I've got the recipient delimiter enabled in main.cf (output of postconf
              >> -n shows it enabled). I'm using virtual mailbox domains/maps and the
              >> postfix virtual delivery agent. The folder 'test' (minus the quotes)
              >> does exist... but not as a subdirectory of Inbox (is that the problem?).

              > have you defined a "user+test@..." entry in your
              > virtual_mailbox_maps?
              > http://www.postfix.org/postconf.5.html#virtual_mailbox_maps

              OK, so from the responses its obvious I had a flawed expectation... not
              the first time, thats for sure.

              Hmmm... I'm now wondering if ${extension} can somehow be used with the
              virtual_mailbox_maps query to accomplish what I want?

              I want to be able to use plussed addresses in such a way that if such a
              message comes in and a subfolder matches the extension, the message will
              be delivered to that subfolder, and if there is no matching subfolder,
              it is just delivered to the Inbox.

              Obviously (also judging from the replies so far), the postfix DA's don't
              support adding flags to accomplish this, like you can with the dovecot
              LDA master.cf entry. So, an obvious follow-up would be, is there a
              reason postfix's DAs don't support this? I'm not complaining, just
              asking... :)

              It would be nice if the postfix local and/or virtual DA master.cf
              entries allowed the addition of these flags to be able to do this...

              I guess in this situation I'll have to wait until I have converted to
              dovecot so I can use its LDA...

              Anyway, thanks for the replies...

              --

              Best regards,

              Charles
            • Victor Duchovni
              ... The whole concept of sub-folder is IMAP-server specific. Postfix does not know how your IMAP server works, that s why you should use LMTP or the delivery
              Message 6 of 25 , Mar 6, 2009
                On Fri, Mar 06, 2009 at 02:27:56PM -0500, Charles Marcus wrote:

                > It would be nice if the postfix local and/or virtual DA master.cf
                > entries allowed the addition of these flags to be able to do this...
                >
                > I guess in this situation I'll have to wait until I have converted to
                > dovecot so I can use its LDA...

                The whole concept of sub-folder is IMAP-server specific. Postfix
                does not know how your IMAP server works, that's why you should
                use LMTP or the delivery agent for your IMAP server.

                --
                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:majordomo@...?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.
              • Wietse Venema
                ... If you want a specific server s IMAP folder features, use the delivery agent that was written for that IMAP server. It makes no sense to copy code from
                Message 7 of 25 , Mar 6, 2009
                  Charles Marcus:
                  > Obviously (also judging from the replies so far), the postfix DA's don't
                  > support adding flags to accomplish this, like you can with the dovecot
                  > LDA master.cf entry. So, an obvious follow-up would be, is there a
                  > reason postfix's DAs don't support this? I'm not complaining, just
                  > asking... :)

                  If you want a specific server's IMAP folder features, use the
                  delivery agent that was written for that IMAP server. It makes
                  no sense to copy code from every IMAP server into Postfix.

                  Wietse
                • LuKreme
                  ... Yes, but you need procmail (or, I assume, Maildrop) in a procmail file you would have: # based on the procmail pipe in master.cf ARG=$EXTENSION # For non
                  Message 8 of 25 , Mar 6, 2009
                    On 6-Mar-2009, at 12:27, Charles Marcus wrote:
                    > Hmmm... I'm now wondering if ${extension} can somehow be used with the
                    > virtual_mailbox_maps query to accomplish what I want?


                    Yes, but you need procmail (or, I assume, Maildrop)

                    in a procmail file you would have:

                    # based on the procmail pipe in master.cf
                    ARG=$EXTENSION
                    # For non virtual users
                    # ARG=$1

                    :0
                    * ! ARG ^^^^
                    .$ARG/

                    as the simplest example. Getting procmail working with virtual users
                    is a little tricky. Here's what I have:

                    /etc/postfix/main.cf
                    virtual_transport = procmail

                    /etc/postfix/master.cf
                    procmail unix - n n - - pipe
                    -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
                    USER=${recipient} EXTENSION=${extension} /usr/local/etc/
                    procmailrc.common


                    --
                    Do not meddle in the affairs of wizards for they are subtle and
                    quick to anger.
                  • Charles Marcus
                    ... Many thanks for the detail... but with Victor and Wietse s responses, I think the 2x4 is no longer needed... :) Procmail is not a beast I want to unleash
                    Message 9 of 25 , Mar 6, 2009
                      On 3/6/2009 3:43 PM, LuKreme wrote:
                      > On 6-Mar-2009, at 12:27, Charles Marcus wrote:
                      >> Hmmm... I'm now wondering if ${extension} can somehow be used with the
                      >> virtual_mailbox_maps query to accomplish what I want?

                      > Yes, but you need procmail (or, I assume, Maildrop)

                      Many thanks for the detail... but with Victor and Wietse's responses, I
                      think the 2x4 is no longer needed... :)

                      Procmail is not a beast I want to unleash on my server, so, since the
                      conversion to dovecot is probably not far away (I'm waiting for 1.2),
                      I'll just wait for that...

                      Thanks again for straightening me out...

                      --

                      Best regards,

                      Charles
                    • Jorey Bump
                      ... Cyrus IMAPd supports this behaviour.
                      Message 10 of 25 , Mar 6, 2009
                        Charles Marcus wrote, at 03/06/2009 02:27 PM:

                        > I want to be able to use plussed addresses in such a way that if such a
                        > message comes in and a subfolder matches the extension, the message will
                        > be delivered to that subfolder, and if there is no matching subfolder,
                        > it is just delivered to the Inbox.

                        Cyrus IMAPd supports this behaviour.
                      • mouss
                        ... given a list of users (which you have) and a list of acceptable extensions, you can build a list of user+extension@domain and use it. if all extensions are
                        Message 11 of 25 , Mar 7, 2009
                          Charles Marcus a écrit :
                          > On 3/6/2009 3:43 PM, LuKreme wrote:
                          >> On 6-Mar-2009, at 12:27, Charles Marcus wrote:
                          >>> Hmmm... I'm now wondering if ${extension} can somehow be used with the
                          >>> virtual_mailbox_maps query to accomplish what I want?
                          >
                          >> Yes, but you need procmail (or, I assume, Maildrop)
                          >
                          > Many thanks for the detail... but with Victor and Wietse's responses, I
                          > think the 2x4 is no longer needed... :)
                          >
                          > Procmail is not a beast I want to unleash on my server, so, since the
                          > conversion to dovecot is probably not far away (I'm waiting for 1.2),
                          > I'll just wait for that...
                          >

                          given a list of users (which you have) and a list of acceptable
                          extensions, you can build a list of user+extension@domain and use it.

                          if all extensions are acceptable (not very recommended), you can build a
                          pcre list. something like

                          /^joe+([a-z]{1,20}@example\.com$/
                          /blah/blah/example.com/joe/maildir/.$1/

                          adjust the path to match your imap server conventions.

                          PS. if using mysql or the like, these "lists" can be generated on the fly.
                        • Charles Marcus
                          ... Ok, this caught my attention... Yes, I was planning on allowing any extension to be used/made up on the fly... thje purpose for using the extension will be
                          Message 12 of 25 , Mar 7, 2009
                            On 3/7/2009, mouss (mouss@...) wrote:
                            > if all extensions are acceptable (not very recommended),

                            Ok, this caught my attention...

                            Yes, I was planning on allowing any extension to be used/made up on the
                            fly... thje purpose for using the extension will be for signing up for
                            different sites/lists/things, so I can use the same address, but be able
                            to distinguish mail that comes to me via that service...

                            I just don't want to have to create the alias before I use it...

                            So, is there maybe some kind of regex that could be used to make this
                            safer? Ie, only allow safe characters, or something?

                            Thanks mouss,

                            --

                            Best regards,

                            Charles
                          • Noel Jones
                            ... Postfix does not allow $1 etc. substitution in virtual_mailbox_maps. http://www.postfix.org/postconf.5.html#virtual_mailbox_maps Postfix virtual(8) will
                            Message 13 of 25 , Mar 7, 2009
                              Charles Marcus wrote:
                              > On 3/7/2009, mouss (mouss@...) wrote:
                              >> if all extensions are acceptable (not very recommended),
                              >
                              > Ok, this caught my attention...
                              >
                              > Yes, I was planning on allowing any extension to be used/made up on the
                              > fly... thje purpose for using the extension will be for signing up for
                              > different sites/lists/things, so I can use the same address, but be able
                              > to distinguish mail that comes to me via that service...
                              >
                              > I just don't want to have to create the alias before I use it...
                              >
                              > So, is there maybe some kind of regex that could be used to make this
                              > safer? Ie, only allow safe characters, or something?
                              >
                              > Thanks mouss,
                              >

                              Postfix does not allow $1 etc. substitution in
                              virtual_mailbox_maps.
                              http://www.postfix.org/postconf.5.html#virtual_mailbox_maps

                              Postfix virtual(8) will accept any extension, but will always
                              deliver unmatched extensions to the user's default inbox.

                              Some third-party IMAP servers may support "deliver to any
                              extension subfolder", I haven't looked.


                              -- Noel Jones
                            • Charles Marcus
                              ... They do... both cyrus and dovecot, and I think courier maildrop does as well... Since I m going to be converting to dovecot soon, I ll be using its LDA...
                              Message 14 of 25 , Mar 7, 2009
                                On 3/7/2009, Noel Jones (njones@...) wrote:
                                > Some third-party IMAP servers may support "deliver to any extension
                                > subfolder", I haven't looked.

                                They do... both cyrus and dovecot, and I think courier maildrop does as
                                well...

                                Since I'm going to be converting to dovecot soon, I'll be using its LDA...

                                Thanks again for the responses and leading me to the watering hole... :)

                                --

                                Best regards,

                                Charles
                              • Victor Duchovni
                                ... With Cyrus IMAP, delivery to +folder depends on the folder s access control list and the identity of the agent doing the delivery. Allowing mail to
                                Message 15 of 25 , Mar 7, 2009
                                  On Sat, Mar 07, 2009 at 10:44:54AM -0500, Charles Marcus wrote:

                                  > On 3/7/2009, Noel Jones (njones@...) wrote:
                                  > > Some third-party IMAP servers may support "deliver to any extension
                                  > > subfolder", I haven't looked.
                                  >
                                  > They do... both cyrus and dovecot, and I think courier maildrop does as
                                  > well...

                                  With Cyrus IMAP, delivery to "+folder" depends on the folder's access
                                  control list and the identity of the agent doing the delivery. Allowing
                                  mail to arrive in every folder (Sent, Trash, ...) is not always a good
                                  idea.

                                  --
                                  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:majordomo@...?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.
                                • LuKreme
                                  ... Yep, that s what I do, and I ve yet to hear a valid security concern other than user could create a lot of folders in their Maildir. It s very easy to do
                                  Message 16 of 25 , Mar 7, 2009
                                    On 7-Mar-2009, at 08:11, Charles Marcus wrote:
                                    > On 3/7/2009, mouss (mouss@...) wrote:
                                    >> if all extensions are acceptable (not very recommended),
                                    >
                                    > Ok, this caught my attention...
                                    >
                                    > Yes, I was planning on allowing any extension to be used/made up on
                                    > the
                                    > fly... thje purpose for using the extension will be for signing up for
                                    > different sites/lists/things, so I can use the same address, but be
                                    > able
                                    > to distinguish mail that comes to me via that service...

                                    Yep, that's what I do, and I've yet to hear a valid security concern
                                    other than "user could create a lot of folders in their Maildir.

                                    It's very easy to do in /etc/procmailrc though

                                    :0
                                    * ! ? test -f $HOME/.procmailrc
                                    {
                                    ARG=$1
                                    LOG="User has no procmailrc LOGNAME=$LOGNAME@$HOST HOME=$HOME$NL"
                                    :0 fw
                                    | /usr/local/bin/spamc -u $LOGNAME

                                    DROPPRIVS=YES
                                    DEFAULT=$HOME/Maildir

                                    :0
                                    * ! ARG ^^^^
                                    .$ARG/

                                    :0
                                    * ^X-Spam-Status:(.*\<)?Yes
                                    .SPAM/


                                    :0
                                    $DEFAULT/
                                    }
                                    LOG="User $LOGNAME@$HOST has a .procmailrc, processing...$NL"

                                    If the user does not have a .procmailrc, get teh extension and save it
                                    in ARG, check the message against SA, and then, if there was an
                                    extension. Save the file in that folder. If the message is spam,
                                    save it in .Spam, else save it in DEFAULT. (Some people will want to
                                    put the spamcheck BEFORE the ARG check.

                                    > So, is there maybe some kind of regex that could be used to make this
                                    > safer? Ie, only allow safe characters, or something?

                                    What unsafe characters are allowed in a username portion of the email
                                    address?


                                    --
                                    if you ever get that chimp of your back, if you ever find the thing
                                    you lack, ah but you know you're only having a laugh. Oh, oh
                                    here we go again -- until the end.
                                  • LuKreme
                                    ... It is pretty easy to set up a procmail transport to be used by postfix: procmail unix - n n - - pipe -o flags=uhFORD
                                    Message 17 of 25 , Mar 7, 2009
                                      On 7-Mar-2009, at 08:39, Noel Jones wrote:
                                      > Postfix does not allow $1 etc. substitution in virtual_mailbox_maps.
                                      > http://www.postfix.org/postconf.5.html#virtual_mailbox_maps

                                      It is pretty easy to set up a procmail transport to be used by postfix:

                                      procmail unix - n n - - pipe
                                      -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
                                      USER=${recipient} EXTENSION=${extension} /usr/local/etc/
                                      procmailrc.common

                                      --
                                      if you ever get that chimp of your back, if you ever find the thing
                                      you lack, ah but you know you're only having a laugh. Oh, oh
                                      here we go again -- until the end.
                                    • mouss
                                      ... sigh. I always forget that. but mysql comes to the rescue...
                                      Message 18 of 25 , Mar 7, 2009
                                        Noel Jones a écrit :
                                        > Charles Marcus wrote:
                                        >> On 3/7/2009, mouss (mouss@...) wrote:
                                        >>> if all extensions are acceptable (not very recommended),
                                        >>
                                        >> Ok, this caught my attention...
                                        >>
                                        >> Yes, I was planning on allowing any extension to be used/made up on the
                                        >> fly... thje purpose for using the extension will be for signing up for
                                        >> different sites/lists/things, so I can use the same address, but be able
                                        >> to distinguish mail that comes to me via that service...
                                        >>
                                        >> I just don't want to have to create the alias before I use it...
                                        >>
                                        >> So, is there maybe some kind of regex that could be used to make this
                                        >> safer? Ie, only allow safe characters, or something?
                                        >>
                                        >> Thanks mouss,
                                        >>
                                        >
                                        > Postfix does not allow $1 etc. substitution in virtual_mailbox_maps.
                                        > http://www.postfix.org/postconf.5.html#virtual_mailbox_maps
                                        >

                                        sigh. I always forget that. but mysql comes to the rescue...

                                        > Postfix virtual(8) will accept any extension, but will always deliver
                                        > unmatched extensions to the user's default inbox.
                                        >
                                        > Some third-party IMAP servers may support "deliver to any extension
                                        > subfolder", I haven't looked.
                                        >
                                        >
                                        > -- Noel Jones
                                      • Charles Marcus
                                        ... ... Ok, I m intrigued... if it is this simple, maybe I ll go ahead and do it, but... As I said in an earlier mail, I do NOT want the folder
                                        Message 19 of 25 , Mar 7, 2009
                                          On 3/7/2009 1:45 PM, LuKreme wrote:
                                          >> Yes, I was planning on allowing any extension to be used/made up on
                                          >> the fly... thje purpose for using the extension will be for signing
                                          >> up for different sites/lists/things, so I can use the same address,
                                          >> but be able to distinguish mail that comes to me via that
                                          >> service...

                                          > Yep, that's what I do, and I've yet to hear a valid security concern
                                          > other than "user could create a lot of folders in their Maildir.

                                          <snip>

                                          > It is pretty easy to set up a procmail transport to be used by postfix:
                                          >
                                          > procmail unix - n n - - pipe
                                          > -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
                                          > USER=${recipient} EXTENSION=${extension} /usr/local/etc/procmailrc.common

                                          Ok, I'm intrigued... if it is this simple, maybe I'll go ahead and do
                                          it, but...

                                          As I said in an earlier mail, I do NOT want the folder auto-created - if
                                          it doesn't exist, I want the message deliver to fall back to the Inbox...

                                          Is there a way to tweak the above to accomplish this?

                                          Thanks!

                                          --

                                          Best regards,

                                          Charles
                                        • LuKreme
                                          ... Sure, you can do most anything in procmail. Let me see, something like this: ARV=$1 ... * ! ? test -d .$ARG { $DEFAULT } ... .$ARV/ (if the directory .ARG
                                          Message 20 of 25 , Mar 7, 2009
                                            On 7-Mar-2009, at 12:13, Charles Marcus wrote:

                                            > As I said in an earlier mail, I do NOT want the folder auto-created
                                            > - if
                                            > it doesn't exist, I want the message deliver to fall back to the
                                            > Inbox...
                                            >
                                            > Is there a way to tweak the above to accomplish this?

                                            Sure, you can do most anything in procmail. Let me see, something
                                            like this:

                                            ARV=$1

                                            :0
                                            * ! ? test -d .$ARG
                                            { $DEFAULT }

                                            :0E
                                            .$ARV/

                                            (if the directory .ARG does no exist, save in $DEFAULT, else save in
                                            $.ARG/)


                                            --
                                            if you ever get that chimp of your back, if you ever find the thing
                                            you lack, ah but you know you're only having a laugh. Oh, oh
                                            here we go again -- until the end.
                                          • mouss
                                            ... maildrop won t create folders (except if you explicitly run the command to do so), so you can use it. and its syntax is less horrible than procmail.
                                            Message 21 of 25 , Mar 7, 2009
                                              Charles Marcus a écrit :
                                              > On 3/7/2009 1:45 PM, LuKreme wrote:
                                              >>> Yes, I was planning on allowing any extension to be used/made up on
                                              >>> the fly... thje purpose for using the extension will be for signing
                                              >>> up for different sites/lists/things, so I can use the same address,
                                              >>> but be able to distinguish mail that comes to me via that
                                              >>> service...
                                              >
                                              >> Yep, that's what I do, and I've yet to hear a valid security concern
                                              >> other than "user could create a lot of folders in their Maildir.
                                              >
                                              > <snip>
                                              >
                                              >> It is pretty easy to set up a procmail transport to be used by postfix:
                                              >>
                                              >> procmail unix - n n - - pipe
                                              >> -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
                                              >> USER=${recipient} EXTENSION=${extension} /usr/local/etc/procmailrc.common
                                              >
                                              > Ok, I'm intrigued... if it is this simple, maybe I'll go ahead and do
                                              > it, but...
                                              >
                                              > As I said in an earlier mail, I do NOT want the folder auto-created - if
                                              > it doesn't exist, I want the message deliver to fall back to the Inbox...
                                              >
                                              > Is there a way to tweak the above to accomplish this?
                                              >

                                              maildrop won't create folders (except if you explicitly run the command
                                              to do so), so you can use it. and its syntax is less horrible than
                                              procmail.
                                            • Sahil Tandon
                                              ... +1 for using Dovecot LDA for delivery. And you needn t be clever to know the benefits; literacy will suffice. From the first line of the documentation:
                                              Message 22 of 25 , Mar 8, 2009
                                                On Sun, 08 Mar 2009, KLaM Postmaster wrote:

                                                > > Ok, I'm intrigued... if it is this simple, maybe I'll go ahead and do
                                                > > it, but...
                                                > >
                                                > > As I said in an earlier mail, I do NOT want the folder auto-created - if
                                                > > it doesn't exist, I want the message deliver to fall back to the Inbox...
                                                > >
                                                > > Is there a way to tweak the above to accomplish this?
                                                > >
                                                > > Thanks!
                                                > >
                                                > >
                                                > if you are going to use dovecot as the LDA the setup below is for
                                                > Fedora 10, and virtual delivery
                                                >
                                                > dovecot unix - n n - - pipe
                                                > flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f
                                                > ${sender} -d ${user}@${nexthop} -n -m ${extension}
                                                >
                                                > This straight out of the Dovecot documentation.
                                                > If you want it Dovecot to auto create folders leave out the -n.
                                                > This setup is the one I am using for my Fedora 10 Postfix+Dovecot and
                                                > virtual delivery setup, only two local user on the system me and root.
                                                > It seems to work quit nicely, and according to a number of much cleverer
                                                > people than myself means that all the maildir/Dovecot indexes are kept
                                                > up to date.

                                                +1 for using Dovecot LDA for delivery. And you needn't be clever to know the
                                                benefits; literacy will suffice. From the first line of the documentation:

                                                The Dovecot LDA, called deliver, is a local delivery agent which takes mail
                                                from an MTA and delivers it to a user's mailbox, while keeping Dovecot index
                                                files up to date.

                                                --
                                                Sahil Tandon <sahil@...>
                                              • KLaM Postmaster
                                                ... if you are going to use dovecot as the LDA the setup below is for Fedora 10, and virtual delivery dovecot unix - n n - - pipe flags=DRhu
                                                Message 23 of 25 , Mar 8, 2009
                                                  Charles Marcus wrote:
                                                  > On 3/7/2009 1:45 PM, LuKreme wrote:
                                                  >
                                                  >>> Yes, I was planning on allowing any extension to be used/made up on
                                                  >>> the fly... thje purpose for using the extension will be for signing
                                                  >>> up for different sites/lists/things, so I can use the same address,
                                                  >>> but be able to distinguish mail that comes to me via that
                                                  >>> service...
                                                  >>>
                                                  >
                                                  >
                                                  >> Yep, that's what I do, and I've yet to hear a valid security concern
                                                  >> other than "user could create a lot of folders in their Maildir.
                                                  >>
                                                  >
                                                  > <snip>
                                                  >
                                                  >
                                                  >> It is pretty easy to set up a procmail transport to be used by postfix:
                                                  >>
                                                  >> procmail unix - n n - - pipe
                                                  >> -o flags=uhFORD user=vpopmail argv=/usr/local/bin/procmail -t -m
                                                  >> USER=${recipient} EXTENSION=${extension} /usr/local/etc/procmailrc.common
                                                  >>
                                                  >
                                                  > Ok, I'm intrigued... if it is this simple, maybe I'll go ahead and do
                                                  > it, but...
                                                  >
                                                  > As I said in an earlier mail, I do NOT want the folder auto-created - if
                                                  > it doesn't exist, I want the message deliver to fall back to the Inbox...
                                                  >
                                                  > Is there a way to tweak the above to accomplish this?
                                                  >
                                                  > Thanks!
                                                  >
                                                  >
                                                  if you are going to use dovecot as the LDA the setup below is for
                                                  Fedora 10, and virtual delivery

                                                  dovecot unix - n n - - pipe
                                                  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f
                                                  ${sender} -d ${user}@${nexthop} -n -m ${extension}

                                                  This straight out of the Dovecot documentation.
                                                  If you want it Dovecot to auto create folders leave out the -n.
                                                  This setup is the one I am using for my Fedora 10 Postfix+Dovecot and
                                                  virtual delivery setup, only two local user on the system me and root.
                                                  It seems to work quit nicely, and according to a number of much cleverer
                                                  people than myself means that all the maildir/Dovecot indexes are kept
                                                  up to date.
                                                • KLaM Postmaster
                                                  ... Depending upon who you talk to, members of my family being prime example, I am illiterate, not only that but I constantly astound some the younger member
                                                  Message 24 of 25 , Mar 8, 2009
                                                    Sahil Tandon wrote:
                                                    > On Sun, 08 Mar 2009, KLaM Postmaster wrote:
                                                    >
                                                    >
                                                    >>> Ok, I'm intrigued... if it is this simple, maybe I'll go ahead and do
                                                    >>> it, but...
                                                    >>>
                                                    >>> As I said in an earlier mail, I do NOT want the folder auto-created - if
                                                    >>> it doesn't exist, I want the message deliver to fall back to the Inbox...
                                                    >>>
                                                    >>> Is there a way to tweak the above to accomplish this?
                                                    >>>
                                                    >>> Thanks!
                                                    >>>
                                                    >>>
                                                    >>>
                                                    >> if you are going to use dovecot as the LDA the setup below is for
                                                    >> Fedora 10, and virtual delivery
                                                    >>
                                                    >> dovecot unix - n n - - pipe
                                                    >> flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f
                                                    >> ${sender} -d ${user}@${nexthop} -n -m ${extension}
                                                    >>
                                                    >> This straight out of the Dovecot documentation.
                                                    >> If you want it Dovecot to auto create folders leave out the -n.
                                                    >> This setup is the one I am using for my Fedora 10 Postfix+Dovecot and
                                                    >> virtual delivery setup, only two local user on the system me and root.
                                                    >> It seems to work quit nicely, and according to a number of much cleverer
                                                    >> people than myself means that all the maildir/Dovecot indexes are kept
                                                    >> up to date.
                                                    >>
                                                    >
                                                    > +1 for using Dovecot LDA for delivery. And you needn't be clever to know the
                                                    > benefits; literacy will suffice. From the first line of the documentation:
                                                    >
                                                    > The Dovecot LDA, called deliver, is a local delivery agent which takes mail
                                                    > from an MTA and delivers it to a user's mailbox, while keeping Dovecot index
                                                    > files up to date.
                                                    >
                                                    >
                                                    Depending upon who you talk to, members of my family being prime
                                                    example, I am illiterate, not only that but I constantly astound some
                                                    the younger member of my tribe by being able to walk and talk at the
                                                    same time.
                                                  Your message has been successfully submitted and would be delivered to recipients shortly.