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

Re: Case sensitive oddity when mail delivered.

Expand Messages
  • Darren Pilgrim
    ... Configure Dovecot to case-fold the email address by setting auth_username_format = %Lu.
    Message 1 of 10 , Apr 30, 2009
    • 0 Attachment
      postfix@... wrote:
      > if I have an account user1@... it works just
      > fine. However, when mail is sent to USER1@... it also
      > delivers, but ends up creating a new file structure so I end up with:
      >
      > /var/spool/mail/example.com/user1 (with lower case mail in it)
      > and
      > /var/spool/mail/EXAMPLE.COM/USER1 (with uppercase mail in it)
      >
      >
      > Any ideas where I would look in postfix to change the case of
      > incoming mail before the email is "deliver"ed to the mailbox?

      Configure Dovecot to case-fold the email address by setting
      auth_username_format = %Lu.
    • Rick
      Following up on my previous posts, I m still experiencing this issue of sometimes email being delivered as upper case (which ends up in the file system as
      Message 2 of 10 , May 28 12:07 PM
      • 0 Attachment
        Following up on my previous posts, I'm still experiencing this issue of sometimes email being delivered as upper case (which ends up in the file system as upper case). I appreciate the guidance I've received, but I hate putting fixes in place without understanding what's broken.

        Empirical testing shows  SOME email addresses appear to stay upper case when they deliver, and others do not.

        Example:
        telnet mail.example.com 25
        EHLO corwyn.net
        MAIL FROM: dovecot@...
        RCPT TO: TEST222@...
        DATA
        SUBJECT: TEST CAPS
        .

        delivers mail to /var/spool/mail/migration.EXAMPLE.COM (which would be bad, as part of it is upper case).

        Yet the EXACT same sequence using TEST22@..., TEST2222@..., TEST111@...  all deliver to /var/spool/mail/migration.example.com.   Only TEST222@...  causes mail to be delivered without being lower-cased. (WTF?!?)

        test222@... works fine.

        To make it extra special, my internet development / preproduction domain works just fine to
        TEST222@..., and as best I can tell the config files except for the domain itself) match.

        It's just bizarre.  Anyone have any suggestions on where to look for what could be making the behaviour different for that email address?

        Rick
        alias_database = hash:/etc/aliases
        alias_maps = hash:/etc/aliases
        bounce_queue_lifetime = 2d
        bounce_size_limit = 50000
        bounce_template_file = /etc/postfix/bounce.cf
        command_directory = /usr/sbin
        config_directory = /etc/postfix
        content_filter = amavisd-new:[127.0.0.1]:10024
        daemon_directory = /usr/libexec/postfix
        debug_peer_level = 2
        default_rbl_reply = $rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}
        delay_warning_time = 2h
        disable_vrfy_command = yes
        header_checks = pcre:/etc/postfix/header_
        checks
        home_mailbox = Maildir/
        html_directory = /var/www/html/postfix
        mail_owner = postfix
        mailq_path = /usr/bin/mailq
        manpage_directory = /usr/share/man
        maximal_queue_lifetime = 2d
        message_size_limit = 30720000
        mime_header_checks = pcre:/etc/postfix/mime_header_checks
        mydestination = localhost $myhostname
        mydomain = example.com
        myhostname = mail.example.com
        myorigin = example.com
        newaliases_path = /usr/bin/newaliases
        queue_directory = /var/spool/postfix
        readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
        receive_override_options = no_address_mappings
        recipient_delimiter = +
        sendmail_path = /usr/sbin/sendmail
        setgid_group = postdrop
        show_user_unknown_table_name = no
        smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
        smtp_tls_loglevel = 2
        smtp_use_tls = yes
        smtpd_client_connection_rate_limit = 30
        smtpd_client_restrictions =
        smtpd_data_restrictions = reject_multi_recipient_bounce
        smtpd_helo_required = yes
        smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/access     reject_unknown_sender_domain reject_non_fqdn_recipient       reject_non_fqdn_sender permit_mynetworks       permit_sasl_authenticated check_client_access hash:/etc/postfix/agencies  reject_unauth_destination check_helo_access pcre:/etc/postfix/helo_checks reject_rbl_client zen.spamhaus.org      reject_rbl_client bl.spamcop.net        reject_rbl_client dnsbl.sorbs.net       reject_rbl_client cbl.abuseat.org
        smtpd_sasl_auth_enable = yes
        smtpd_sasl_path = /var/spool/postfix/private/auth
        smtpd_sasl_security_options = noanonymous
        smtpd_sasl_type = dovecot
        smtpd_sender_restrictions =
        smtpd_tls_cert_file = /etc/httpd/certs/mail_example_com.crt
        smtpd_tls_key_file = /etc/httpd/certs/mail.example.com.key.no.password
        smtpd_tls_loglevel = 1
        smtpd_tls_security_level = may
        tls_random_source = dev:/dev/urandom
        transport_maps = hash:/etc/postfix/transport
        unknown_local_recipient_reject_code = 550
        virtual_alias_domains =
        virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf
        virtual_gid_maps = static:105
        virtual_mailbox_base = /var/spool/mail
        virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
        virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf
        virtual_transport = dovecot
        virtual_uid_maps = static:1015


        Mail is running postfix and dovecot with mysql, amavisd and spamassassin.





      • Sahil Tandon
        ... Odd. I cannot reproduce that problem here, also using dovecot as virtual_transport. Just to be sure, you are passing at least the hu flags to pipe(8)
        Message 3 of 10 , May 28 7:14 PM
        • 0 Attachment
          On Thu, 28 May 2009, Rick wrote:

          > Following up on my previous posts, I'm still experiencing this issue of
          > sometimes email being delivered as upper case (which ends up in the file
          > system as upper case). I appreciate the guidance I've received, but I hate
          > putting fixes in place without understanding what's broken.
          >
          > Empirical testing shows SOME email addresses appear to stay upper case when
          > they deliver, and others do not.
          >
          > Example:
          > telnet mail.example.com 25
          > EHLO corwyn.net
          > MAIL FROM: dovecot@...
          > RCPT TO: TEST222@...
          > DATA
          > SUBJECT: TEST CAPS
          > .
          >
          > delivers mail to /var/spool/mail/migration.EXAMPLE.COM (which would be bad,
          > as part of it is upper case).
          >
          > Yet the EXACT same sequence using TEST22@...,
          > TEST2222@..., TEST111@... all deliver
          > to /var/spool/mail/migration.example.com. Only
          > TEST222@... causes mail to be delivered without being
          > lower-cased. (WTF?!?)

          Odd. I cannot reproduce that problem here, also using dovecot as
          virtual_transport. Just to be sure, you are passing at least the 'hu' flags
          to pipe(8) for dovecot's LDA, right? These two flags ensure case-folding,
          which local(8) does by default.

          --
          Sahil Tandon <sahil@...>
        • postfix@corwyn.net
          ... I finally deleted the test222 account from mysql and recreated it (the same as it was prior) and now it no longer reproduced (note I ve never been able to
          Message 4 of 10 , May 28 7:38 PM
          • 0 Attachment
            At 10:14 PM 5/28/2009, Sahil Tandon wrote:
            >Odd. I cannot reproduce that problem here, also using dovecot as
            >virtual_transport. Just to be sure, you are passing at least the 'hu' flags
            >to pipe(8) for dovecot's LDA, right? These two flags ensure case-folding,
            >which local(8) does by default.

            I finally deleted the test222 account from mysql and recreated it
            (the same as it was prior) and now it no longer reproduced (note I've
            never been able to repro it in my dev environment).

            I clearly could replicate earlier in my production env, I probably
            ran 40-50 tests and iterations with a defined methodology. It failed
            just prior to finally deleting the account, and now it doesn't. Some
            interaction in there somewhere. the problem came back before, so I
            figure I'll be able to repro again eventually.

            I have flags=DR set for flags for the dovecot transport. I do
            recognize that I probably need to add hu (or "h" actually, as I think
            "u" will break my "+Spam" recipient-delimiter in amavis that delivers
            mail to the Spam folder), but first I'd like to track down what's
            causing the oddity failure.

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