Our problem is that an application hosted on Slicehost uses an external mailserver, which is located in Europe. Since neither Slicehost/Rackspace or Cogent seem to be able to fix the situation after almost two days, here’s a quick workaround.

The idea is that our relay will collect emails and send them whenever the connection permits.

Postfix install

This is a pretty simple:

Configuration

main.cf

Edit /etc/postfix/main.cf (this is my entire main.cf):

Obviously you need to replace the **ENTRIES** in caps entries (a total of three).

/etc/postfix/sasl/passwd

Create the file:

Enter something like the following in it (vi /etc/postfix/sasl/passwd):

Replace mail/mail2 with your actual SMTP. The SMTP will have to allow plain-text login for this to work.

Run the following to finish up:

Adjust

Then, configure your application to not use smtp-auth and your SMPT runs on 127.0.0.1:25 if it runs on the same server.

Please note in the above main.cf, I configured postfix to only listen on the loopback.

Fin

This is an excerpt from an email:

And that’s all, kids!