Tag "mail/milter" retourne ServerFault, example scripts

Bonjour,

J’étais en train de toucher à l’API et notamment au module IServer. Je me suis très fortement basé sur le script exemple pour créer des domaines(createDomain example) et lorsque j’attribue le tag “mail/milter” à la ligne 92 j’obtient ceci:

python Bluecdom.py -d "createdbyscript.com" -c "Snake"
Traceback (most recent call last):
  File "Bluecdom.py", line 207, in <module>
    blue.main()
  File "Bluecdom.py", line 55, in main
    self.create_domain(self.args.domain, self.args.client)
  File "Bluecdom.py", line 195, in create_domain
    iServer.assign(masterServer, domainName, "mail/milter")
  File "/home/ggousseaud/.local/lib/python2.7/site-packages/netbluemind/server/api/IServer.py", line 203, in assign
    return self.handleResult__(None, response)
  File "/home/ggousseaud/.local/lib/python2.7/site-packages/netbluemind/python/client.py", line 115, in handleResult__
    sf.get("message", "unknown"))
netbluemind.python.client.ServerFault: (u'UNKNOWN', u'ServerFault', u'Assignement of server without mail/milter tag refused.')

Sans la ligne:

iServer.assign(masterServer, domainName, "mail/milter")

Le code s’exécute très bien et sans erreur. Même avec la ligne et son erreur, la création se passe c’est juste que j’obtient une erreur.

La partie de l’erreur:

'Assignement of server without mail/milter tag refused.'

semble indiqué que le server ne comporte pas d’option pour ce tag.

À quoi correspond ce tag? Pourquoi ne fonctionne-t-il pas sur mon serveur?

Cordialement.

Concernant le mail/milter je viens de trouver son utilité mais une idée de pourquoi celà se passe-t-il?

Voici une partie de notre core.log:

2018-07-03 15:07:58,785 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/photos/bmhiddensysadmin. File not found
2018-07-03 15:07:58,785 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/icons/bmhiddensysadmin. File not found
2018-07-03 15:07:58,794 [vert.x-worker-thread-19] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com
2018-07-03 15:07:58,799 [vert.x-worker-thread-19] n.b.d.p.f.FilesystemStore WARN - Cannot delete document book_addressbook_createdbyscript.com/photos/bmhiddensysadmin. File not found
2018-07-03 15:07:58,799 [vert.x-worker-thread-19] n.b.d.p.f.FilesystemStore WARN - Cannot delete document book_addressbook_createdbyscript.com/icons/bmhiddensysadmin. File not found
2018-07-03 15:07:58,808 [vert.x-worker-thread-19] n.b.a.s.i.AddressBookService INFO - addressbook_createdbyscript.com batch updates: 0 added, 0 updated, 1 removed.
2018-07-03 15:07:58,812 [vert.x-worker-thread-11] n.b.e.v.EasContainerChangeVerticle INFO - Wake up system devices for contacts changes
2018-07-03 15:07:58,816 [vert.x-worker-thread-19] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com DONE in 22 ms
2018-07-03 15:07:58,841 [pool-2-thread-10] n.b.b.c.i.CyrusMailboxesStorage WARN - group without physical mailbox
2018-07-03 15:07:58,842 [vert.x-worker-thread-6] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Updating postfix maps
2018-07-03 15:07:58,898 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/photos/5996AFB6-2750-46C5-AAC6-9DB7AC26B66C. File not found
2018-07-03 15:07:58,898 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/icons/5996AFB6-2750-46C5-AAC6-9DB7AC26B66C. File not found
2018-07-03 15:07:58,954 [pool-2-thread-10] n.b.b.c.i.CyrusMailboxesStorage WARN - group without physical mailbox
2018-07-03 15:07:59,005 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/photos/BF883CDB-F57F-4E6D-9ACE-3EE7CC282A5A. File not found
2018-07-03 15:07:59,005 [pool-2-thread-10] n.b.d.p.f.FilesystemStore WARN - Cannot delete document dir_createdbyscript.com/icons/BF883CDB-F57F-4E6D-9ACE-3EE7CC282A5A. File not found
2018-07-03 15:07:59,387 [BM-Core29] n.b.m.s.h.DomainMailFilterHook INFO - Deleting domain mail filters of domain createdbyscript.com
2018-07-03 15:07:59,643 [BM-Core29] n.b.m.s.MailflowDomainHook INFO - Deleting all mailflow rules of domain createdbyscript.com
2018-07-03 15:07:59,742 [BM-Core29] n.b.s.s.i.ServerDomainHook INFO - Deleting all server assignments of domain createdbyscript.com
2018-07-03 15:07:59,745 [BM-Core29] n.b.d.s.i.DomainsService INFO - Notification for domain.deleted sent.
2018-07-03 15:07:59,771 [core-heartbeat-timer] n.b.s.s.StateContext INFO - Core state heartbeat : core.state.running
2018-07-03 15:08:00,247 [vert.x-worker-thread-6] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Postfix maps updated (1405 ms)
2018-07-03 15:08:03,771 [core-heartbeat-timer] n.b.s.s.StateContext INFO - Core state heartbeat : core.state.running
2018-07-03 15:08:03,798 [vert.x-worker-thread-13] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com
2018-07-03 15:08:03,799 [vert.x-worker-thread-13] n.b.a.d.i.DomainAddressBookService WARN - no domain addressbook for domain createdbyscript.com
2018-07-03 15:08:03,799 [vert.x-worker-thread-13] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com DONE in 1 ms
2018-07-03 15:08:07,771 [core-heartbeat-timer] n.b.s.s.StateContext INFO - Core state heartbeat : core.state.running
2018-07-03 15:08:08,845 [vert.x-worker-thread-10] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Updating postfix maps
2018-07-03 15:08:08,922 [BM-Core28] n.b.u.s.i.TokenAuthProvider ERROR - Fail to validate token for admin0 from [10.42.21.42, 127.0.0.1]
2018-07-03 15:08:08,924 [BM-Core28] n.b.a.s.Authentication INFO - l: 'admin0@global.virt', o: 'python' successfully authentified
2018-07-03 15:08:08,989 [vert.x-worker-thread-18] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com
2018-07-03 15:08:08,990 [vert.x-worker-thread-18] n.b.a.d.i.DomainAddressBookService WARN - no domain addressbook for domain createdbyscript.com
2018-07-03 15:08:08,990 [vert.x-worker-thread-18] n.b.a.d.v.DomainBookVerticle INFO - replicate domain book createdbyscript.com DONE in 1 ms
2018-07-03 15:08:09,010 [BM-Core19] n.b.u.s.i.f.ContainersFoldersHook WARN - owner is not a user DirEntry [kind=ADDRESSBOOK, path=createdbyscript.com/addressbooks/addressbook_createdbyscript.com, displayName=Directory, entryUid=addressbook_createdbyscript.com, email=null, archived = false] for container ContainerDescriptor [uid=addressbook_createdbyscript.com, name=$$domain.addressbook$$, owner=addressbook_createdbyscript.com, type=addressbook, defaultContainer=true, domainUid=createdbyscript.com]
2018-07-03 15:08:09,018 [BM-Core19] n.b.c.c.h.AbstractEmailHook ERROR - Cannot find user createdbyscript.com
2018-07-03 15:08:09,018 [BM-Core19] n.b.r.s.i.ResourcesContainerDomainHook INFO - create default resource type for domain [createdbyscript.com]
2018-07-03 15:08:09,032 [BM-Core19] n.b.d.s.i.DomainsService INFO - Create user bmhiddensysadmin for domain createdbyscript.com
2018-07-03 15:08:09,032 [BM-Core19] n.b.d.s.DirDomainValueSanitizer WARN - no imap server found for domain createdbyscript.com 
2018-07-03 15:08:09,046 [BM-Core19] n.b.u.p.UserStore INFO - insert complete: User [login=bmhiddensysadmin, archived=false, system=true, hidden=true, routing=none, dataLocation=null]
2018-07-03 15:08:09,047 [BM-Core19] n.b.d.s.i.DomainsService INFO - Create user group and admin group for domain createdbyscript.com
2018-07-03 15:08:09,048 [BM-Core19] n.b.d.s.DirDomainValueSanitizer WARN - no imap server found for domain createdbyscript.com 
2018-07-03 15:08:09,067 [BM-Core19] n.b.u.s.i.f.ContainersFoldersHook WARN - owner is not a user DirEntry [kind=GROUP, path=createdbyscript.com/groups/DE33EEF2-900D-4E17-A46A-45980C9EC277, displayName=user, entryUid=DE33EEF2-900D-4E17-A46A-45980C9EC277, email=null, archived = false] for container ContainerDescriptor [uid=mailbox:acls-DE33EEF2-900D-4E17-A46A-45980C9EC277, name=_user, owner=DE33EEF2-900D-4E17-A46A-45980C9EC277, type=mailboxacl, defaultContainer=true, domainUid=createdbyscript.com]
2018-07-03 15:08:09,074 [BM-Core19] n.b.m.s.i.MailboxesService INFO - initialized folders for DE33EEF2-900D-4E17-A46A-45980C9EC277
2018-07-03 15:08:09,075 [BM-Core19] n.b.b.c.i.CyrusMailboxesStorage INFO - mailbox created, going to configure it in cyrus
2018-07-03 15:08:09,075 [BM-Core19] n.b.b.c.i.CyrusMailboxesStorage WARN - no datalocation for DE33EEF2-900D-4E17-A46A-45980C9EC277
2018-07-03 15:08:09,123 [BM-Core19] n.b.d.s.DirDomainValueSanitizer WARN - no imap server found for domain createdbyscript.com 
2018-07-03 15:08:09,142 [BM-Core19] n.b.u.s.i.f.ContainersFoldersHook WARN - owner is not a user DirEntry [kind=GROUP, path=createdbyscript.com/groups/9EA1A1FF-A762-49B4-995D-C87E102C8EF4, displayName=admin, entryUid=9EA1A1FF-A762-49B4-995D-C87E102C8EF4, email=null, archived = false] for container ContainerDescriptor [uid=mailbox:acls-9EA1A1FF-A762-49B4-995D-C87E102C8EF4, name=_admin, owner=9EA1A1FF-A762-49B4-995D-C87E102C8EF4, type=mailboxacl, defaultContainer=true, domainUid=createdbyscript.com]
2018-07-03 15:08:09,147 [BM-Core19] n.b.m.s.i.MailboxesService INFO - initialized folders for 9EA1A1FF-A762-49B4-995D-C87E102C8EF4
2018-07-03 15:08:09,148 [BM-Core19] n.b.b.c.i.CyrusMailboxesStorage INFO - mailbox created, going to configure it in cyrus
2018-07-03 15:08:09,148 [BM-Core19] n.b.b.c.i.CyrusMailboxesStorage WARN - no datalocation for 9EA1A1FF-A762-49B4-995D-C87E102C8EF4
2018-07-03 15:08:09,171 [BM-Core19] n.b.d.s.i.DomainsService INFO - Notification for domain.created sent.
2018-07-03 15:08:09,211 [BM-Core2] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag mail/smtp
2018-07-03 15:08:09,211 [BM-Core2] n.b.b.p.SmtpTagServerHook INFO - server bm-master:10.42.13.106 assigned to domain ItemValue [uid=createdbyscript.com, externalId=null, displayName=createdbyscript.com, value=net.bluemind.domain.api.Domain@3eb8b2cd] as mail/smtp
2018-07-03 15:08:09,211 [BM-Core2] n.b.s.s.i.ServerService INFO - Assigned bm-master as mail/smtp to createdbyscript.com
2018-07-03 15:08:09,258 [BM-Core13] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/core
2018-07-03 15:08:09,259 [BM-Core13] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/core to createdbyscript.com
2018-07-03 15:08:09,303 [BM-Core25] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/hps
2018-07-03 15:08:09,303 [BM-Core25] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/hps to createdbyscript.com
2018-07-03 15:08:09,348 [BM-Core17] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/xmpp
2018-07-03 15:08:09,348 [BM-Core17] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/xmpp to createdbyscript.com
2018-07-03 15:08:09,394 [BM-Core24] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/ac
2018-07-03 15:08:09,394 [BM-Core24] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/ac to createdbyscript.com
2018-07-03 15:08:09,439 [BM-Core8] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/cal
2018-07-03 15:08:09,439 [BM-Core8] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/cal to createdbyscript.com
2018-07-03 15:08:09,487 [BM-Core0] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/webmail
2018-07-03 15:08:09,487 [BM-Core0] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/webmail to createdbyscript.com
2018-07-03 15:08:09,540 [BM-Core12] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/contact
2018-07-03 15:08:09,540 [BM-Core12] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/contact to createdbyscript.com
2018-07-03 15:08:09,592 [BM-Core14] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/settings
2018-07-03 15:08:09,593 [BM-Core14] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/settings to createdbyscript.com
2018-07-03 15:08:09,643 [BM-Core26] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/redirector
2018-07-03 15:08:09,643 [BM-Core26] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/redirector to createdbyscript.com
2018-07-03 15:08:09,709 [BM-Core16] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag filehosting/data
2018-07-03 15:08:09,709 [BM-Core16] n.b.s.s.i.ServerService INFO - Assigned bm-master as filehosting/data to createdbyscript.com
2018-07-03 15:08:09,723 [vert.x-worker-thread-10] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Postfix maps updated (877 ms)
2018-07-03 15:08:09,724 [vert.x-worker-thread-10] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Updating postfix maps
2018-07-03 15:08:09,764 [BM-Core4] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/nginx
2018-07-03 15:08:09,764 [BM-Core4] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/nginx to createdbyscript.com
2018-07-03 15:08:09,802 [BM-Core11] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/pgsql
2018-07-03 15:08:09,802 [BM-Core11] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/pgsql to createdbyscript.com
2018-07-03 15:08:09,842 [BM-Core6] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag bm/es
2018-07-03 15:08:09,842 [BM-Core6] n.b.e.i.ElasticSearchServerHook INFO - server bm-master:10.42.13.106 assigned to domain ItemValue [uid=createdbyscript.com, externalId=null, displayName=createdbyscript.com, value=net.bluemind.domain.api.Domain@320df920] as bm/es
2018-07-03 15:08:09,971 [BM-Core6] n.b.l.e.ESearchActivator INFO - Created client with 1 nodes: 10.42.13.106
2018-07-03 15:08:09,971 [BM-Core6] n.b.s.s.i.ServerService INFO - Assigned bm-master as bm/es to createdbyscript.com
2018-07-03 15:08:10,011 [BM-Core1] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag mail/imap
2018-07-03 15:08:10,367 [BM-Core1] n.b.b.c.CyrusService INFO - Attempting restart on 10.42.13.106
2018-07-03 15:08:10,912 [vert.x-worker-thread-10] n.b.b.p.i.m.e.DirtyMapEvent-1539671747 INFO - Postfix maps updated (1188 ms)
2018-07-03 15:08:11,771 [core-heartbeat-timer] n.b.s.s.StateContext INFO - Core state heartbeat : core.state.running
2018-07-03 15:08:13,467 [BM-Core1] n.b.b.c.i.CyrusMailboxesStorage INFO - **** Partition created for createdbyscript.com
2018-07-03 15:08:13,608 [BM-Core1] n.b.s.s.i.ServerService INFO - Assigned bm-master as mail/imap to createdbyscript.com
2018-07-03 15:08:13,655 [BM-Core22] n.b.s.s.i.ServerService INFO - Server bm-master:10.42.13.106 assigned createdbyscript.com tag mail/imap_frontend
2018-07-03 15:08:13,655 [BM-Core22] n.b.s.s.i.ServerService INFO - Assigned bm-master as mail/imap_frontend to createdbyscript.com
2018-07-03 15:08:13,694 [BM-Core10] n.b.c.r.b.RestServiceMethodHandler ERROR - Error during restcall RestRequest [path=/api/servers/default/createdbyscript.com/assignments/bm-master/_assign, method=POST, User-Agent=python-requests/2.18.4, params=tag: mail/milter
, remoteAddresses=[10.42.21.42, 127.0.0.1], origin=null]:  class net.bluemind.core.api.fault.ServerFault: Assignement of server without mail/milter tag refused.
	at net.bluemind.server.service.internal.ServerService.assign(ServerService.java:296)
	... 17 common frames omitted

Hello,

apparemment, l’exemple n’est pas à jour, le tag “mail/milter” n’existe plus à partir de la version 3.5.8, milter est maintenant activé par défaut.
Pour fixer le problème, tu peux simplement supprimer la ligne dans le script.
Je vais mettre à jour l’exemple.

tommy

Ajouter

iServer.assign(masterServer, domainName, "mail/archive")

Me semble aussi être une bonne idée.
Mettre à jour la doc concernant mail/milter aussi : https://forge.bluemind.net/wrap/confluence/display/BM35/Logs±+Fichiers+journaux