Fix for undeletable user-defined Squirrelmail folder

I run my own mail server and use Squirrelmail to facilitate webmail access using HTTPS.  I encountered problems trying to delete a folder that I created as part of a test to find out if things were working correctly:

ERROR : Could not delete “Archive” 
Given: Invalid mailbox name

SquirrelMail is a Webmail application started by Nathan and Luke Ehresman and written in the PHP scripting language. It can be installed on almost all web servers so long as PHP is present and the web server has access to an IMAP and SMTP server

After some digging around, I found that after modifying a setting via ./ I was able to delete the folder.  If you’re experiencing the same thing, do the following:

1.   Open a terminal window.

2.   Navigate to Squirrelmail’s root dir, which in my case is /usr/share/squirrelmail.

3.   Navigate to the config/ folder then type: ./

4.   Select option 3 then 1 and enter none.

5.   Save your changes and exit.

It may not work on all situations, and some have said that in version 1.4.0, you may need to set/pick your IMAP server (I use Dovecot), like so:

1.   Open terminal window (again).

2.   Navigate to the config/ folder then type: ./

3.  From the menu options, select D, then save and exit.

If you still have problems after performing these steps, modify your php.ini config file to report more verbosely by changing the following lines:

display_errors = on
error_reporting = E_ALL

After saving the modifications you just made, restart your web server via (I run FC6 so) service httpd restart, then watch your Apache error_log for more info. 

That’s it.  Hopefully, this helps you from having to do the legwork.  Take care.  =0)

Use another SMTP server with Postfix

Over the weekend, I finally installed and configured my own e-mail server. What a challenge that was!

I’m successfully running Postfix, Dovecot, Spamassassin, Amavisd-new, ClamAV, SQLgrey, and Squirrelmail. I, however, encountered problems sending to Gmail.

It returned with the following message:

host[] said:
550-5.7.1 [] Our system has detected an unusual amount of unsolicited 550-5.7.1 mail originating from your IP address. To protect our
550-5.7.1 users from spam, mail sent from your IP address has been 550-5.7.1 rejected. Please visit 550-5.7.1 to review 550 5.7.1 our Bulk Email Senders Guidelines. 39si20019987nzk (in reply to end of DATA command)

Rejected? Huh? Apparently, my IP address has been blacklisted because Google couldn’t identify my server; also because I don’t have a static IP.

They said:

To ensure that Gmail can identify you:

  • Use a consistent IP address to send bulk mail.
  • Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
  • Use the same address in the ‘From:’ header on every bulk mail you send.

We also recommend publishing an SPF record, and signing with DomainKeys.

At this point, I don’t really want to run and maintain my own DNS server nor obtain a static IP (everything works fine and it’s cheaper!), so I found a way around it: Set Postfix to use another SMTP server.

Here’s how:

1. Edit /etc/postfix/, and add or edit this line:

relayhost =

2. Restart the Postfix service (I run FC6), so:

sudo service postfix restart

That’s it! Your server will now send to the SMTP server specified above rather than sending directly to the destination, which as a result, will not be “rejected” by Gmail or the like. ;0)