mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #818] Import of aliases broken #732
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#732
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ddt-consult on GitHub (Dec 17, 2015).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/818
The import of aliases into modoboa 1.4.2 is broken.
If I try to import one domain with one account and one alias pointing to this account into a fresh installation of modoboa (see CSV files below), the import of the identities fails with "Local recipient not found".
AFAIKT in Alias.set_recipients() modoboa checks whether the target for an alias already exists in the DB. If that's not the case, it checks whether the target is itlself another alias. If that's not the case either, it raises an exception instead of creating the target.
Just for testing I commented lines 133-139 in alias.py, i. e.
and the import of my identities file succeeded.
domains.csv:
domain;ddt-consult.de;100000;Trueidentities.csv:
account;admin@ddt-consult.de;{SHA512-CRYPT}$6$rounds=70000$yOfLHTrqigEMkPlW$.6Oq0b1bmcrfk8OcuDNzZYbOEVVgkcmrnPH3Mmqwyg6qlBjxVbRX7fGwxWUqYsimYxnGABXME4Ba8xt.1KaTK/;;;True;DomainAdmins;admin@ddt-consult.de;100000;ddt-consult.de alias;abuse@ddt-consult.de;True;admin@ddt-consult.de@tonioo commented on GitHub (Jan 5, 2016):
Hi,
I can't reproduce your issue with 1.4.2. Are you importing from the CLI or from the interface ?
@ddt-consult commented on GitHub (Jan 12, 2016):
From the command line.
If you just copied the identities.csv above from this webpage, the linefeed between the account and the alias line may get eaten. Then you would have just one line in the CSV and only the account would get created but not the alias (which triggers the error).
BTW: that's the traceback I get when I try to import this identities.csv:
@tonioo commented on GitHub (Jan 18, 2016):
I still can't reproduce it. Which database do you use ? Have you made modifications to your settings file ?
@ddt-consult commented on GitHub (Jan 18, 2016):
DB: MySQL.
Of course I have made modifications to settings.py: ALLOWED_HOSTS, LANGUAGE_CODE, ...
@tonioo commented on GitHub (Jan 18, 2016):
Would it be easy for you to check the behaviour using a postgresql database ?
@tonioo commented on GitHub (Jan 27, 2016):
@ddt-consult ping
@dirtyhillbilly commented on GitHub (Oct 3, 2020):
I have the same problem. The misleading part is that when an identity is created, the associated mailbox is not.
@tonioo commented on GitHub (Oct 5, 2020):
@dirtyhillbilly Can you provide the file you used for import?
@dirtyhillbilly commented on GitHub (Oct 6, 2020):
The file I used lacked the "address" part, thus creating the account didn't create the mailbox.
Things like that work as expected :