ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Create Bulk Accounts in Zimbra

    IT Discussion
    zimbra zimbra 8.7 email mta
    2
    7
    4.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nagendra
      last edited by scottalanmiller

      do we have any specific tools to create Bulk Email's in Zimbra approx 250 Accounts..

      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        You mean to import accounts? Like, by providing a CSV?

        1 Reply Last reply Reply Quote 1
        • N
          nagendra
          last edited by

          Yes

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @nagendra
            last edited by

            @nagendra said in Create Bulk Email's in Zimbra:

            Yes

            I renamed your thread so that it makes sense. It is accounts that you want to make, not emails. Bulk emails are SPAM. Quite a different thing.

            N 1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller
              last edited by

              https://wiki.zimbra.com/wiki/Bulk_Provisioning

              Command line provisioning on Zimbra looks like this...

              createAccount [email protected] password displayName 'Andy Anderson' givenName Andy sn Anderson
              createAccount [email protected] password displayName 'Betty Brown' givenName Betty sn Brown
              
              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                And here is a script for using these commands to import a CSV to Zimbra...

                #!/usr/bin/perl
                 
                # Lookup the valid COS (Class of Service) ID in the interface or like this
                my $cosid = `su - zimbra -c 'zmprov gc Default |grep zimbraId:'`;
                $cosid =~ s/zimbraId:\s*|\s*$//g;
                  
                while (<>) {
                       chomp;
                 
                       # CHANGE ME: To the actual fields you use in your CSV file
                       my ($email, $password, $first, $last) = split(/\,/, $_, 4);
                         
                       my ($uid, $domain) = split(/@/, $email, 2);
                 
                       print qq{ca $uid\@$domain $password\n};
                       print qq{ma $uid\@$domain zimbraCOSid "$cosid"\n};
                       print qq{ma $uid\@$domain givenName "$first"\n};
                       print qq{ma $uid\@$domain sn "$last"\n};
                       print qq{ma $uid\@$domain cn "$uid"\n};
                       print qq{ma $uid\@$domain displayName "$first $last"\n};
                       print qq{ma $uid\@$domain zimbraPasswordMustChange TRUE\n};
                       print qq{\n};
                }
                
                1 Reply Last reply Reply Quote 1
                • N
                  nagendra @scottalanmiller
                  last edited by

                  @scottalanmiller sorry typo mistake bulk accounts...

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post