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

Re: Emails getting piped to the wrong Virtual Domain

Expand Messages
  • Wietse Venema
    ... If the address rewriting from dan@ccpop.itco.co to dan@companycouk.com is now what you want, then do not specify such a mapping in virtual_alias_maps.
    Message 1 of 7 , Apr 18, 2013
    • 0 Attachment
      Dan Clovis:
      > Apr 18 15:44:06 companycoServer1 postfix/local[15179]: 5F6A214EE1B4: to=<
      > dan@...>, orig_to=<dan@...>, relay=local, delay=0.35,
      > delays=0.29/0/0/0.06, dsn=2.0.0, status=sent (delivered to command:
      > procmail -a "$EXTENSION")

      If the address rewriting from dan@... to dan@...
      is now what you want, then do not specify such a mapping in
      virtual_alias_maps.

      postconf -n:
      ...
      myorigin = /etc/mailname
      ...
      virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
      mysql:/etc/postfix/mysql-virtual_email2email.cf

      With virtual_alias_maps queries, be sure to return user@domain as the
      result value, not a bare username. Otherwise, Postfix will append the
      myorigin value.

      Wietse
    • Dan Clovis
      ... Thank you Wietse - mail is getting saved in the /var/mail directory now... - it was going to *postconf -n .... *virtual_mailbox_base = /home/vmail I
      Message 2 of 7 , Apr 18, 2013
      • 0 Attachment


        On 18/04/2013 16:28, Wietse Venema wrote:
        Dan Clovis:
        
        Apr 18 15:44:06 companycoServer1 postfix/local[15179]: 5F6A214EE1B4: to=<
        dan@...>, orig_to=<dan@...>, relay=local, delay=0.35,
        delays=0.29/0/0/0.06, dsn=2.0.0, status=sent (delivered to command:
        procmail -a "$EXTENSION")
        
        If the address rewriting from dan@... to dan@...
        is now what you want, then do not specify such a mapping in 
        virtual_alias_maps.
        
        postconf -n:
            ...
            myorigin = /etc/mailname
            ...
            virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, 
        	mysql:/etc/postfix/mysql-virtual_email2email.cf
        
        With virtual_alias_maps queries, be sure to return user@domain as the
        result value, not a bare username. Otherwise, Postfix will append the
        myorigin value.
        
        	Wietse
        
        Thank you Wietse - mail is getting saved in the /var/mail directory now...  - it was going to

        postconf -n
        ....
        virtual_mailbox_base = /home/vmail

        I followed the howto to install - I'm guessing it would have worked if I left it as default.  But the only changes I made was to add an additional field for username, so that usernames could be independent of emails (as per customer requirements)...  I wonder if this has broken something between Dovecot and Postfix...  Any further assistance would be greatly appreciated...

        Apr 18 17:21:39 companycoServer1 postfix/smtpd[15572]: connect from mail-ee0-f48.google.com[74.125.83.48]
        Apr 18 17:21:40 companycoServer1 postfix/smtpd[15572]: 0262314EE1B4: client=mail-ee0-f48.google.com[74.125.83.48]
        Apr 18 17:21:40 companycoServer1 postfix/cleanup[15576]: 0262314EE1B4: message-id=<51701E74.6000909@...>
        Apr 18 17:21:40 companycoServer1 postfix/qmgr[15502]: 0262314EE1B4: from=<dan.clovis1@...>, size=1798, nrcpt=1 (queue active)
        Apr 18 17:21:40 companycoServer1 postfix/local[15577]: 0262314EE1B4: to=<dan@...>, relay=local, delay=0.06, delays=0.06/0/0/0, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
        Apr 18 17:21:40 companycoServer1 postfix/qmgr[15502]: 0262314EE1B4: removed
        Apr 18 17:21:40 companycoServer1 postfix/smtpd[15572]: disconnect from mail-ee0-f48.google.com[74.125.83.48]

        postconf -n

        alias_database = hash:/etc/aliases
        alias_maps = hash:/etc/aliases
        append_dot_mydomain = no
        biff = no
        broken_sasl_auth_clients = yes
        config_directory = /etc/postfix
        html_directory = /usr/share/doc/postfix/html
        inet_interfaces = all
        mailbox_command = procmail -a "$EXTENSION"
        mailbox_size_limit = 0
        message_size_limit = 30720000
        mydestination = companycouk.com, ccpop.itco.co, localhost, localhost.localdomain, companycoServer1, companycoServer1.companycoServer1
        myhostname = pop3.companycouk.com
        mynetworks = 127.0.0.0/8
        myorigin = /etc/mailname
        proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
        readme_directory = /usr/share/doc/postfix
        recipient_delimiter = +
        relayhost =
        smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
        smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
        smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
        smtpd_sasl_auth_enable = yes
        smtpd_sasl_authenticated_header = yes
        smtpd_tls_cert_file = /etc/postfix/smtpd.cert
        smtpd_tls_key_file = /etc/postfix/smtpd.key
        smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
        smtpd_use_tls = yes
        virtual_alias_domains =
        virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
        virtual_gid_maps = static:5000
        virtual_mailbox_base = /home/vmail
        virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
        virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
        virtual_transport = dovecot
        virtual_uid_maps = static:5000
      • Wietse Venema
        ... See http://www.postfix.org/DATABASE_README.html First implement the database with hash: files. Then test with postmap -q all the queries that are
        Message 3 of 7 , Apr 18, 2013
        • 0 Attachment
          Dan Clovis:
          > Apr 18 15:44:06 companycoServer1 postfix/local[15179]: 5F6A214EE1B4: to=<
          > dan@...>, orig_to=<dan@...>, relay=local, delay=0.35,
          > delays=0.29/0/0/0.06, dsn=2.0.0, status=sent (delivered to command:
          > procmail -a "$EXTENSION")

          Wietse:
          > If the address rewriting from dan@... to dan@...
          > is now what you want, then do not specify such a mapping in
          > virtual_alias_maps.
          ...
          > myorigin = /etc/mailname
          > virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
          > mysql:/etc/postfix/mysql-virtual_email2email.cf
          >
          > With virtual_alias_maps queries, be sure to return user@domain as the
          > result value, not a bare username. Otherwise, Postfix will append the
          > myorigin value.

          Dan Clovis:
          > I followed the howto to install - I'm guessing it would have worked if I
          > left it as default. But the only changes I made was to add an
          > additional field for username, so that usernames could be independent of
          > emails (as per customer requirements)... I wonder if this has broken
          > something between Dovecot and Postfix... Any further assistance would
          > be greatly appreciated...

          See http://www.postfix.org/DATABASE_README.html

          First implement the database with hash: files. Then test with
          "postmap -q" all the queries that are described in the virtual(5)
          manpage, and don't proceed unless that looks right.

          Then, implement the database with mysql: files. Your job now is to
          get the same same query results the queries that you got with hash:
          files.

          If you don't know what the queries and replies should look like,
          then you need help there, first. Maybe someone else on the list
          has time to walk you through the steps.

          Wietse
        • Dan Clovis
          ... Ave Maria! Wietse - can I do both emails and usernames with different values... If that works - then I shall proceed... God Bless
          Message 4 of 7 , Apr 19, 2013
          • 0 Attachment
            On 18/04/2013 19:05, Wietse Venema wrote:
            > Dan Clovis:
            >> Apr 18 15:44:06 companycoServer1 postfix/local[15179]: 5F6A214EE1B4: to=<
            >> dan@...>, orig_to=<dan@...>, relay=local, delay=0.35,
            >> delays=0.29/0/0/0.06, dsn=2.0.0, status=sent (delivered to command:
            >> procmail -a "$EXTENSION")
            > Wietse:
            >> If the address rewriting from dan@... to dan@...
            >> is now what you want, then do not specify such a mapping in
            >> virtual_alias_maps.
            > ...
            >> myorigin = /etc/mailname
            >> virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
            >> mysql:/etc/postfix/mysql-virtual_email2email.cf
            >>
            >> With virtual_alias_maps queries, be sure to return user@domain as the
            >> result value, not a bare username. Otherwise, Postfix will append the
            >> myorigin value.
            > Dan Clovis:
            >> I followed the howto to install - I'm guessing it would have worked if I
            >> left it as default. But the only changes I made was to add an
            >> additional field for username, so that usernames could be independent of
            >> emails (as per customer requirements)... I wonder if this has broken
            >> something between Dovecot and Postfix... Any further assistance would
            >> be greatly appreciated...
            > See http://www.postfix.org/DATABASE_README.html
            >
            > First implement the database with hash: files. Then test with
            > "postmap -q" all the queries that are described in the virtual(5)
            > manpage, and don't proceed unless that looks right.
            >
            > Then, implement the database with mysql: files. Your job now is to
            > get the same same query results the queries that you got with hash:
            > files.
            >
            > If you don't know what the queries and replies should look like,
            > then you need help there, first. Maybe someone else on the list
            > has time to walk you through the steps.
            >
            > Wietse
            Ave Maria!

            Wietse - can I do both emails and usernames with different values... If
            that works - then I shall proceed...

            God Bless
          Your message has been successfully submitted and would be delivered to recipients shortly.