Hello guys,

Great module, is there any chance we will see this going to D7?

Comments

Mapi99’s picture

I have made a version of this module which i have working on drupal 7, it does not work exactly the same as this module so im not sure if i should make it into a new project

alxsvdr’s picture

Hello Mapi99,

Do you need CVS access? There's currently no D7 version, so if you want your version to become the official trunk, this would be awesome.

Nigel, do you agree?

Best regards,

A. Saavedra

nigelcunningham’s picture

Thanks for asking for my input - I'm seeing a similar discussion with regard to og_mailinglist, and didn't realise at first that this was dealing with Mailfix!

Mapi99, would you post your code where we can see it? We can then review it and decide whether we're happy to have it be the D7 branch.

I'm generally in favour of the idea, but I'd like to see what the differences are in your version. Perhaps we can get them equivalent in functionality.

Regards,

Nigel

nigelcunningham’s picture

By the way, I'd be interested to know what you did (if anything) about Postfix integration.

I'm imagining that I'll need to add support for the salted passwords to libpammysql (assuming I remember it's name right).

Regards,

Nigel

Mapi99’s picture

Hello guys,

Yes i ran into that exact problem with the salted passwords.

I've made my version very simple,

On user add: creates "email" and "password" entry in {postfix_users) using user and pass values from {users}
On user edit: updates values accordingly
Added two admin options: Generate email, and Update email in admin/people

I havent added quota, forward, bcc yet as i dont need it myself.
I dont know how to fix the salted password so as a work around i made it so my users can set their password in their profile.

Can one of you please pm or email me you email adress and i will send you the module code.

thanks,
Jeff

Mapi99’s picture

it seems i have fixed it by rehashing the passwords to SHA256 unsalted before they are injected into {postfix_users}

i cannot connect to my mail yet but im not getting the password error anymore, seems passwords match now

nigelcunningham’s picture

I'll email you my address shortly.

I'd rather have it work 'out of the box', so I'll work on submitting a patch to libpam-mysql when I find some time.

Nigel

alxsvdr’s picture

We could have a password field in Mailfix tables, and synchronize it with Drupal password through hook_user_update. This password could be encrypted using non-salted MD5, which Postfix supports out of the box.

nigelcunningham’s picture

That's an idea. It does undo the security improvements in D7 though, and would probably earn us a security alert! :)

Mapi99’s picture

that wouldnt be a very good idea to do

nigelcunningham’s picture

No, I agree.

I want to create a patch to libpam-mysql to let the Postfix side of things be able to handle the salted passwords. Once I get around to that, I'll put effort into a D7 port (if we haven't seen anything from you by then).

nigelcunningham’s picture

StatusFileSize
new5.62 KB

First cut of a patch against libpam-mysql as it is found in Ubuntu Maverick.

Completely untested - just put here so it doesn't get misplaced.

nigelcunningham’s picture

First working version of the patch against pam-mysql.

This is prepared against the Ubuntu Maverick source, but shouldn't be too hard to apply for other distros. Pam-MySql looks quite badly maintained. I might try contacting the developers to see if I can take it off their hands.

With this patch applied, I can successfully authenticate using the email address and salted password of a row in a D7 user table. The only change to my configuration from doing this in D6 is to modify /etc/pam.d/dovecot to say "crypt=5" instead of "crypt=3". This makes it use the new D7 code.

#%PAM-1.0
auth    sufficient   pam_mysql.so user=pam passwd=pam_test host=127.0.0.1 db=drupal7 table=users usercolumn=mail passwdcolumn=pass crypt=5
account sufficient pam_mysql.so user=pam passwd=pam_test host=127.0.0.1 db=drupal7 table=users usercolumn=mail passwdcolumn=pass crypt=5

@include common-auth
@include common-account
@include common-session

The test:

pamtester -v dovecot nigel@tuxonice.net authenticate
pamtester: invoking pam_start(dovecot, nigel@tuxonice.net, ...)
pamtester: performing operation - authenticate
Password:
pamtester: successfully authenticated

Now work can begin on porting Mailfix itself :)

nigelcunningham’s picture

StatusFileSize
new7.19 KB

Oh, you might like the actual patch, too :)

klonos’s picture

Title: Port Mailfix to D7 » Port Mailfix module to D7
Issue tags: +D7 porting, +port to d7, +d7 ports
nigelcunningham’s picture

I'm working on the Fasttoggle port at the moment, and will come back to Mailfix after that.

klonos’s picture

Great! Thanx for the update Nigel ;)

nigelcunningham’s picture

Started a 7.x-1.x branch. Not usable yet.

nigelcunningham’s picture

Just thought I'd let you know I'm plodding away, getting my head around the changes to the form API and database querying. Getting there slowly :)

nigelcunningham’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
ErnestoJaboneta’s picture

Is the D7 port still in progress(ie. not dead)? I wish I could help but I'm still learning Drupal!

nigelcunningham’s picture

It's not dead. It's just that I'm working on a couple of other projects, and they're swallowing all available time at the moment. Sorry!

nigelcunningham’s picture

Making some progress - the base module is ready for testing; currently working on the mailfix_admin module.

t.payne’s picture

Assigned: Unassigned » t.payne
Category: feature » support

I see that as of last month this was in need of testing... If the module is ready, I would like to help test and help in whatever ways I can.

Best,
Travis Payne

nigelcunningham’s picture

Assigned: t.payne » Unassigned

The base module (mailfix itself) should be usable, and I'd appreciate feedback on it. I'm still trying to find time to finish off the other modules (views integration and so on).

Regards,

Nigel

klonos’s picture

Category: support » task

There already exists a 7.x dev version for all of us that want to test things and provide feedback, so I think we should mark this task here as fixed (we do have an initial -partially- working version after all). Let's just file separate issues for missing features against the 7.x branch, shall we? This way it will be easier for people to test specific things and provide better feedback.