What are default postfix smtp settings?

This may be a lame question..

All the time I was using postfix to send mails via my rails app. I just install postfix via these commands, cause i never really thought about the what actually going in this postfix thing. I was more concerned about the application of the code and all.

  sudo apt-get install postfix
  sudo apt-get install bsd-mailx

If you use postfix, then you fix it quickly by disabling tls by setting “smtpd_use_tls=no” in /etc/postfix/main.cf

sudo /etc/init.d/postfix start

Thats it. My rails app automatically start sending mails for me via postfix. But now i need smtp settings for this postfix. How can i find out that? Can anybody tell me?

EDIT

I am looking for SMTP Hostname, SMTP Username, SMTP Password, Port(Its 25 for default)


This ma be a lame answer:

You can find out the default configuration by postconf -d this is what Postfix assumes if you have no configuration. But you asked for the defaults!

If you want to find out the current(!) configured settings then you can do this with postconf -n.

When you then need to know what each setting means then you are guided to read the explanation at http://www.postfix.org/postconf.5.html


You must to open port 25 on firewall for smtp. In next link you can find basic configuration for postfix. http://www.postfix.org/STANDARD_CONFIGURATION_README.html


ok, so you have a default postfix install and one piece of r0r app that must be configured to send emails. I will assume you will install postfix on the same server you are running your ror application. If you are planning to host the postfix install on a remote server, don't. I advise on using a local postfix installation as described below, mostly for security purposes.

to make sure you installed postfix correctly do a fresh postfix install IF and only if you are ok with completely deleting the current postfix installation. If you're not ok with this just skip to __postfix_configuration_checks paragraph.

apt-get purge postfix
apt-get install postfix

On debian (and I guess on ubuntu as well) the installer will ask you how do you want to use postfix. choose "local only". That is, "the only delivered mail is the mail for local users", just as a security measure.

when the install process finishes you should have a postfix instance listening on localhost, port 25, allowing mail sent from localhost to be queued unconditionally (default settings)

__postfix_configuration_checks

you can check the policies by running postconf like this:

postconf smtpd_recipient_restrictions mynetworks

and the output you will see should be the same with:

smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

you should also (double-) check that your postfix is listening only on loopback interface, port 25:

netstat -nltp  |grep master
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      4713/master     

now you're ready to configure your rail app:

hostname='localhost' #or '127.0.0.1'
port=25
password='' #or nil, dunno
username='' #or nil?

you should be able to send emails from your ror app thru your postfix install