Ejemplo n.º 1
0
Archivo: run.py Proyecto: whsasf/5kong
basic_class.mylogger_record.info('Sleeping 220 seconds ...')
time.sleep(220)



basic_class.mylogger_record.info('set passphrase')
cuid,cpassphrase = mxos_operations_MessageBodyEncryption.fetch_current_uid_passphrase(mx1_mxos_host1_ip,mx1_mxos_host1_eureka_port)
basic_class.mylogger_record.info('cuid,cpassphrase: '+str(cuid)+','+cpassphrase)

if int(cuid) == -1:
    exit (1)
else:
    pass
basic_class.mylogger_record.info('new passphrase uid is: '+str(cuid))        
mxos_operations_MessageBodyEncryption.create_passphrase(mx1_mxos_host1_ip,mx1_mxos_host1_eureka_port,str(cuid),AES_mode1,ASE_key128)

# restart mss to froce to use new encryption key
remote_operations.remote_operation(mx1_mss_host1_ip,'su - {0} -c \'~/lib/imservctrl killStart mss\''.format(mx_account),root_account,root_passwd,0)
remote_operations.remote_operation(mx1_mss_host2_ip,'su - {0} -c \'~/lib/imservctrl killStart mss\''.format(mx_account),root_account,root_passwd,0)

time.sleep(30)


basic_class.mylogger_record.info('step5:appaned another messege to inbox again')
myimap = imap_operations.IMAP_Ops(mx1_imapserv_host1_ip,mx1_imapserv_host1_imap4Port)
myimap.imap_login('testuser1','testuser1')
myimap.imap_select('customerfolder')
myimap.imap_append(mailbox='customerfolder')
myimap.imap_logout()
Ejemplo n.º 2
0
basic_class.mylogger_record.info('Sleeping 50 seconds ...')
time.sleep(50)

basic_class.mylogger_record.info('set passphrase')
cuid, cpassphrase = mxos_operations_MessageBodyEncryption.fetch_current_uid_passphrase(
    mx1_mxos1_host_ip, mx1_mxos1_port)
basic_class.mylogger_record.info('cuid,cpassphrase: ' + str(cuid) + ',' +
                                 cpassphrase)

if int(cuid) == -1:
    exit(1)
else:
    pass
basic_class.mylogger_record.info('new passphrase uid is: ' + str(cuid))
mxos_operations_MessageBodyEncryption.create_passphrase(
    mx1_mxos1_host_ip, mx1_mxos1_port, str(cuid), AES_mode5, ASE_key192)

# restart mss to froce to use new encryption key
remote_operations.remote_operation(
    mx1_mss1_host_ip, root_account, root_passwd,
    'su - {0} -c \'~/lib/imservctrl killStart mss\''.format(mx_account), 0)
time.sleep(60)

basic_class.mylogger_record.info('step2:create 2 accounts')
remote_operations.remote_operation(
    mx1_host1_ip, root_account, root_passwd,
    'su - {0} -c \'for ((i=1;i<=2;i++));do account-create {1}$i@{2}   {1}$i default;done\''
    .format(mx_account, test_account_base,
            default_domain), 1, 'Mailbox Created Successfully', 2)
remote_operations.remote_operation(
    mx1_host1_ip, root_account, root_passwd,