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

Re: alias question

Expand Messages
  • /dev/rob0
    Massive confusion, and looking back on the thread somewhat, I still think we re lacking a good description of the problem. ... Don t do this. It probably
    Message 1 of 13 , Mar 2, 2009
      Massive confusion, and looking back on the thread somewhat, I still
      think we're lacking a good description of the problem.

      On Mon March 2 2009 06:31:09 Leonardo Coelho wrote:
      > I'm sorry but i don't get it, if i have this two lines:
      >
      > > local_transport = virtual

      Don't do this. It probably doesn't work anyway. We have address classes
      with proper *_transport defaults. The local_transport is of course
      local(8), which is designed to work with Unix users and traditional
      Unix system aliases(5).

      Where did you get this idea? It's a bad idea. See the
      ADDRESS_CLASS_README to begin to understand how different classes are
      handled in Postfix ... the right way.

      > > virtual_alias_maps = hash:/etc/postfix/alias-virtual

      See the VIRTUAL_README and aforementioned ADDRESS_CLASS_README to get
      the difference between virtual(8) mailboxes and virtual(5) aliases.
      Also, be aware that virtual_alias_maps apply to ALL mail, not just the
      domains defined in virtual_alias_domains.

      > and before i had:
      > > virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
      >
      > and isn't work anyway.

      MYSQL_README tells you how to construct a proper query, but it assumes
      you're already up to speed on mysql. A hash: map is the way to start
      out, then when that works, all you have to do is import the data into
      your relational database.

      I suggest, as does DATABASE_README, that you figure out the Postfix
      workings before you muddy it all up with mysql confusion.

      > Can anyone give me another direction?

      Read the documentation? Well, I'll look at your config and logs below.

      > On Sat, Feb 28, 2009 at 3:16 PM, mouss <mouss@...> wrote:
      > > Leonardo Coelho a écrit :
      > > > Hey guys this is my postconf -n output:
      > > >
      > > > append_dot_mydomain = no
      > > > biff = no
      > > > config_directory = /etc/postfix
      > > > disable_vrfy_command = yes
      > > > inet_interfaces = 127.0.0.1, 10.1.1.107, 189.11.37.1xx
      > > > invalid_hostname_reject_code = 450
      > > > local_transport = virtual
      > >
      > > alias_maps only work in "local", not "virtual". so move your alias
      > > to virtual_alias_maps.
      > >
      > > > mailbox_command = procmail -a "$EXTENSION"
      > > > mailbox_size_limit = 0
      > > > mailbox_transport = virtual
      > > > maps_rbl_reject_code = 450

      This was deprecated YEARS ago. You must have followed a HOWTO which is
      outdated in addition to being just plain bad.

      > > > message_size_limit = 0
      > > > mime_header_checks =
      > > > regexp:/etc/postfix/mime_header_checks.regexp mydestination =
      > > > mail.domain.com.br <http://mail.domain.com.br>, localhost,
      > > > mail2.domain.com.br <http://mail2.domain.com.br> myhostname =
      > > > mail.domain.com.br <http://mail.domain.com.br> mynetworks =
      > > > 192.168.0.0/24 <http://192.168.0.0/24> 192.168.x.x/24
      > > > 192.168.x.x/24 192.168.x.x/24 189.11.37.1xx/32
      > > > non_fqdn_reject_code = 450
      > > > receive_override_options = no_address_mappings

      See postconf.5.html#receive_override_options to understand what this
      does. Don't use settings that you don't understand. Looks like that
      describes a big part of your configuration.

      > > > recipient_delimiter = +
      > > > relayhost =
      > > > smtp_tls_session_cache_database =
      > > > btree:${queue_directory}/smtp_scache smtpd_banner = $myhostname
      > > > ESMTP $mail_name (Debian/Rox)
      > > > smtpd_client_restrictions =
      > > > permit_mynetworks, reject_non_fqdn_sender, reject_rbl_client
      > > > sbl-xbl.spamhaus.org <http://sbl-xbl.spamhaus.org>,

      (Please do NOT post in HTML on a mailing list, thank you.)

      > > > reject_rbl_client bl.spamcop.net <http://bl.spamcop.net>,
      > > > reject_unknown_sender_domain, permit
      > > > smtpd_helo_required = yes
      > > > smtpd_recipient_restrictions = permit_mynetworks,
      > > > permit_sasl_authenticated, reject_non_fqdn_sender,
      > > > reject_unauth_destination,
      > > > smtpd_sasl_auth_enable = yes
      > > > smtpd_sasl_local_domain = domain.com.br <http://domain.com.br>
      > > > smtpd_sasl_path = private/auth
      > > > smtpd_sasl_security_options = noanonymous
      > > > smtpd_sasl_type = dovecot
      > > > smtpd_sender_restrictions = permit_mynetworks,
      > > > reject_unknown_sender_domain, reject_non_fqdn_sender, permit

      Three different smtpd(8) restriction stages, no good reason for them
      (such as a whitelisting restriction which might be unsafe in
      smtpd_recipient_restrictions.) I would suggest consolidation of these
      into smtpd_recipient_restrictions, making it easier to follow and to
      maintain.

      > > > smtpd_tls_auth_only = yes
      > > > smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
      > > > smtpd_tls_key_file = /etc/ssl/private/postfix.pem
      > > > smtpd_tls_session_cache_database =
      > > > btree:${queue_directory}/smtpd_scache smtpd_use_tls = yes
      > > > transport_maps = hash:/etc/postfix/transport

      Why are you using transport_maps ?

      > > > virtual_alias_maps = hash:/etc/postfix/alias-virtual
      > > > virtual_gid_maps = static:5000
      > > > virtual_mailbox_base = /home/vmail
      > > > virtual_mailbox_domains =
      > > > mysql:/etc/postfix/mysql_virtual_domains_maps.cf
      > > > <http://mysql_virtual_domains_maps.cf>
      > > > virtual_mailbox_limit = 0
      > > > virtual_mailbox_maps =
      > > > mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
      > > > <http://mysql_virtual_mailbox_maps.cf>
      > > > virtual_minimum_uid = 5000
      > > > virtual_transport = dovecot

      So, you also changed the default virtual_transport.

      > > > virtual_uid_maps = static:5000

      You did not set myhostname, mydomain, mydestination: common and basic
      settings. Do you know what they are? I bet you don't.

      > > > and log non-verbose:
      snip
      > > > mail2 postfix/pipe[4168]: 901AB5FAFD2:
      > > > to=<suporte@...
      > > > <mailto:suporte@...>>, relay=dovecot, delay=1,
      > > > delays=0.98/0/0/0.04, dsn=2.0.0, status=sent (delivered via
      > > > dovecot service)

      This seems to have been handled as a virtual mailbox class domain.
      There's no indication of a problem here. What SHOULD have happened?

      Oh, I know the answer to that.

      You SHOULD have read the Postfix documentation, and not that HOWTO.

      ;)
      --
      Offlist mail to this address is discarded unless
      "/dev/rob0" or "not-spam" is in Subject: header
    • Victor Duchovni
      ... There is nothing wrong with local_transport = virtual , if one wants virtual delivery with no aliases(5) processing or .forward processing for all local
      Message 2 of 13 , Mar 2, 2009
        On Mon, Mar 02, 2009 at 12:56:33PM -0600, /dev/rob0 wrote:

        > Massive confusion, and looking back on the thread somewhat, I still
        > think we're lacking a good description of the problem.
        >
        > On Mon March 2 2009 06:31:09 Leonardo Coelho wrote:
        > > I'm sorry but i don't get it, if i have this two lines:
        > >
        > > > local_transport = virtual
        >
        > Don't do this. It probably doesn't work anyway. We have address classes
        > with proper *_transport defaults. The local_transport is of course
        > local(8), which is designed to work with Unix users and traditional
        > Unix system aliases(5).

        There is nothing wrong with "local_transport = virtual", if one wants
        virtual delivery with no aliases(5) processing or .forward processing
        for all local users, but often setting mailbox_transport is a better
        way to handle "local" (system-user) mail.

        --
        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.
      • /dev/rob0
        ... Thanks. I was thinking, as well, that the someone with such a need might do better using relay_domains and set relay_transport = dovecot , for the domains
        Message 3 of 13 , Mar 2, 2009
          On Mon March 2 2009 13:07:18 Victor Duchovni wrote:
          > On Mon, Mar 02, 2009 at 12:56:33PM -0600, /dev/rob0 wrote:
          > > Massive confusion, and looking back on the thread somewhat, I still
          > > think we're lacking a good description of the problem.
          > >
          > > On Mon March 2 2009 06:31:09 Leonardo Coelho wrote:
          > > > I'm sorry but i don't get it, if i have this two lines:
          > > > > local_transport = virtual
          > >
          > > Don't do this. It probably doesn't work anyway. We have address
          > > classes with proper *_transport defaults. The local_transport is of
          > > course local(8), which is designed to work with Unix users and
          > > traditional Unix system aliases(5).
          >
          > There is nothing wrong with "local_transport = virtual", if one wants
          > virtual delivery with no aliases(5) processing or .forward processing
          > for all local users, but often setting mailbox_transport is a better
          > way to handle "local" (system-user) mail.

          Thanks. I was thinking, as well, that the someone with such a need
          might do better using relay_domains and set "relay_transport =
          dovecot", for the domains defined in his virtual_mailbox_domains, since
          later on the OP also changed virtual_transport. Then the mydestination
          domains could be moved to virtual_mailbox_domains and mydestination
          unset. This fits in with the principle of doing the least possible
          pounding of square pegs into round holes.

          Of course this is all academic; I doubt the OP really knows what he
          needs.
          --
          Offlist mail to this address is discarded unless
          "/dev/rob0" or "not-spam" is in Subject: header
        Your message has been successfully submitted and would be delivered to recipients shortly.