mailgw woes
Tom Ekberg <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <MWHPR08MB2941E73E1969C3902557597ACA4F9@MWHPR08MB2941.namprd08.prod.outlook.com> |
I have a tracker that has an entry in /etc/aliases the defines an email alias name and a call to 'tee' to write stdout to a file and call roundup_mailgw with the tracker home as the only argument. This part has been working fine. I use the email that tee writes to simulate sending an email to roundup-mailgw while testing so I don't have to send an email every time.
The problem I'm having is that when a user, that has no corresponding tracker user, sends an email, the issue gets created by user Anonymous. I tracked the problem down to mailgw.py in the get_author_id function in this code fragment:
create = 1
anonid = self.db.user.lookup('anonymous')
if not (self.db.security.hasPermission('Register', anonid, 'user')
and self.db.security.hasPermission('Email Access', anonid)):
create = 0
The "Register' part of the 'if' statement returns 0, while the 'Email Access' part returns 1. This causes create to be set to 0, failing to create a tracker user using the sender's email. I have these lines in my schema.py for this tracker:
db.security.addPermissionToRole('Anonymous', 'Email Access')
db.security.addPermissionToRole('Anonymous', 'Register', 'user')
Which should cause both the 'Register' and "Email Address' parts of the if in get_author_id to return 1, leaving create being set to 1.
Any ideas where I went wrong?
Tom Ekberg
Senior Computer Specialist
Department of Laboratory Medicine and Pathology
4th Floor, Pat Steel Building, currently WFH
Home: (253) 561-2509
Email: [email protected]
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users