Fixed PostfixAdmin error with creating mailboxes on later Postfix versions
Posted by Richard5 under PostFix[3] Comments
There was always a bug in PostfixAdmin 2.1.0 that prevented the creation of a mailbox when you created a new email address because PostfixAdmin send the incorrect commands to the Postfix mailserver. It was a small error and was also noted at the forum and bugtracker at the PostfixAdmin site. The error was that the smtp_mail function was sending an ‘EHLO’ command instead of the required ‘HELO’ command. I had the change of the function documented in the install notes.
But in the ongoing endeavor to stop spammers in sending emails to us the Postfix developers set stricter rules on their server communications. One of them being the stricter rules on sending multiple commands to the mailserver without listening for an answer from the mailserver after each command, which is typical for spam software. However this was also what PostfixAdmin was doing, sending all these commands to send an email to the newly created mail address without listening properly to the answers Postfix was sending.
The bug is fixed in PostfixAdmin CVS and is, as far as I can tell, scheduled to be released in the 2.1.1 release. But we encounter the bug now, I get remarks from people who are installing PostfixAdmin on top of Postfix 2.2.0 or later.
To help myself and them I copied some of the code that would solve the problem from CVS and put it into the current 2.1.0 source of PostfixAdmin. It solves the problem of Postfix rejecting emails being send from PostfixAdmin with the error:
Data command rejected: Improper use of SMTP command pipelining.
The error is solved by changing the ‘smtp_mail’ function to listen for answers send by the Postfix server in the ‘functions.in.php’ source file.
To help you out you can download the edited ‘functions.inc.php’ from here. To see what I’ve changed look at the forum entry describing the error.
I didn’t create the fix, I just copied some of the code that was available in CVS and back ported it to the current stable 2.1.0 version.
- No related posts
February 7th, 2007 at 11:46 am
Interesting that this bugfix isn’t in the latest a-few-days-ago-dowloaded official non-cvs version. A little thank you from me
September 21st, 2007 at 2:12 pm
I created my own fix after troubleshooting for 6 hours to no avail.
Replace the smtp_mail function in functions.inc.php with this…
http://www.workforceconnections.biz/postfixadmin_fix/functions.inc.mod.txt
and download this program and install it into the /postfixadmin directory. http://phpmailer.sourceforge.net/
I would tgz my phpmailer directory and upload it, but I don’t wanna infringe on any licensing issues.
September 21st, 2007 at 2:35 pm
Could you let me know what the error was you where trying to solve ?