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

Re: virtual_mailbox_maps w/out massive tables?

Expand Messages
  • mouss
    ... postfix is smart too: it doesn t allow substitution :) ... Avoid tricks whenever possible. Gross hacks fire back. btw. prefer pcre over regexp. ... they
    Message 1 of 4 , Sep 24, 2008
    • 0 Attachment
      rihad wrote:
      > mouss wrote:
      >> rihad wrote:
      >>> This is probably a faq, but still... I've been playing with virtual
      >>> delivery:
      >>>
      >>> main.cf:
      >>> virtual_mailbox_domains = bar.com
      >>> virtual_mailbox_base = /home/massmail
      >>> virtual_mailbox_maps = regexp:/usr/local/etc/postfix/home.map
      >>> virtual_minimum_uid = 1002
      >>> virtual_uid_maps = static:1002
      >>> virtual_gid_maps = static:1002
      >>>
      >>> home.map:
      >>> /^(.+)@([^@]+)$/ $2/$1/
      >>>
      >>
      >> when you have it working, remind me to send mail to
      >> <../../../../tmp/@...>
      >> :)
      >>
      > Agreed :) This is just alpha version, for getting to know Postfix.
      >
      > Still I thought virtual_mailbox_base was as smart as it looked like?
      > qmail for example disallows .. in paths.
      >

      postfix is smart too: it doesn't allow substitution :)


      >>> username > homedir mapping is pretty static in its nature. How can I
      >>> still do it without silly large data tables?
      >>>
      >>
      >> You need a "silly large data table" because you need to only accept
      >> mail to valid addresses. with your wildcard setup, all addresses are
      >> valid.
      >>
      > Aha, in the strive for getting regexp: to work I haven't yet thought any
      > further. Of course you're right. So, ...
      >

      Avoid tricks whenever possible. Gross hacks fire back.

      btw. prefer pcre over regexp.

      >>
      >> if you really want to accept all mail, then "break" recipient
      >> validation (a wildcard virtual alias is enough) and use maildrop,
      >> dovecot or procmail to do the actual delivery. but you'll have to
      >> check the recipient address to avoid random stuff in your filesystem.
      >>
      > any of these alternative delivery methods aren't required to get simple
      > things going.

      they may be needed if you want to deliver to folders based on some
      criteria.
    Your message has been successfully submitted and would be delivered to recipients shortly.