Thursday 8 September 2011

Postfix on Ubuntu, send mail using telnet.



Post fix is said to be better than send mail as I read from many sources.

"sudo aptitude install postfix" Installed postfix for me.  Give various details when prompted for.
"/etc/postfix/main.cf" Has all the config details.

#sudo postfix start -> starts post fix if not already running.

#telnet localhost 25


ehlo localhost
mail from: user@localhost
rcpt to: someone@localhost
data
Subject: my subject

Hi,
 How are you?
regards,
Admin
. (Type the .[dot] in a new Line and press Enter )
quit

#mailq  will show you the mails to be delivered.

2 comments:

  1. smtp settings used in rails to use the local server settings, postfix in this case.

    ActionMailer::Base.smtp_settings = {
    :address => "localhost",
    :domain => "some domain name",
    :port => 25
    }

    ReplyDelete