-   Linux - Software (
-   -   [SOLVED]: Sending Mail from Thunderbird with Postfix Server (

rgkwustl 08-15-2011 01:13 PM

[SOLVED]: Sending Mail from Thunderbird with Postfix Server
Here's a solution that I wanted to share with the forum and I guess it's a problem that a lot of Postfix users might face. I use a sheeva plug as my Postfix server and also my internet firewall/gw. I have a laptop on which I run Thunderbird. I've always been able to send/recv mails using my Windows Thunderbird client but after I switched to using gmail as my outgoing SMTP server, I started having trouble with sending out of Thunderbird. If I used Squirrelmail, I had no problems. I realized of course that Squirrelmail sends mail out of the server whereas with Thunderdbird, I was coming in thru the Internet and submitting outgoing mail. The Postfix mail.log would give a "NOQUEUE" error and would not even forward the mail to the SMTP relay.

I solved the problem using SSH tunneling. I setup an SSH
tunnel going over the Internet between my Windows box and my Postfix server. I used Putty to setup a tunnel that would forward traffic submitted to localhost:2525 over the tunnel to my Postfix server and deliver it to postfix-server:25. Here 'postfix-server' is the hostname of my Postfix Server. I set my thunderbird client's Outgoing SMTP Server as 'localhost:2525'. I'll do my best to describe how to setup the Putty tunnel below:
1. In the Putty GUI create a session 'smtptunnel' by filling in your Postfix server's public IP (or DNS name) into the 'Host Name' Box. Then type 'smtptunnel' into the 'Saved Sessions' Box and hit 'Save'.
2. Then go to the bottom of the left pane in the Putty GUI and click on 'Tunnels'. In the 'Source port' Box type 2525. In the 'Destination' Box type 'postfix-server:25'. Then click on the 'Add' button. Of course you must replace 'postfix-server' with the hostname of your Postfix server (This need not be the DNS name of your server but should be the local hostname of the server in /etc/hosts. I think you can even say localhost here but I've not tried it).
3. Then go back to the 'Session' tab in the left pane of the Putty GUI and click on 'Save'.

On Thunderbird, all you have to do is go to 'Server Settings' and set your 'Outgoing SMTP server' to localhost:2525.

Every time before you run Thunderbird, you must run Putty and create the tunnel by clicking on 'smtptunnel' in the list of save Putty sessions and login to the Postfix server. Then run Thunderbird and it should be able to login to your Postfix Server and receive as well as send E-mail (I assume you have IMAP/POP to receive mail).

All times are GMT -5. The time now is 03:42 AM.