fernandoch wrote:
And how can you test it easily?
In general terms, configure your application stack to send mail - for which instructions should be available as part of its installation - and see what happens :-)
If trying to diagnose issues, you can use log files like /var/log/mail.* for the various logs Postfix generates while processing messages, check the mail queue (for stuck items) with "mailq", or if the application fails when trying to send, check out any logs specific to that application.
If instead, by "test it" you meant manually test outbound mail interactively (without your application), assuming it's primarily a setup time check, it's easy enough to just use sendmail yourself, as in:
Code:
$ sendmail user@dom.ain [ user@dom.ain ...]
and just enter some dummy text for the message (end with a line with just a period(.) or Ctrl-D). You need to manually put in headers like Subject: or To: but I usually don't bother - at worst the message will end up in a spam folder, which still shows successful receipt. Or just check the mail log to verify that it was at least properly delivered off of your host, which is really all you need to care about.
Or you can install any MUA (either one of the previously discussed simple mail utilities or a more complete mail agent like mutt) to let you interactively create messages. But this step is still optional.
I do generally end up installing bsd-mailx on my systems so I have a very simple interactive tool for generating a quick message. But that's really a choice for my own interactive use, and not something required by the applications I install. (Well, sometimes my own quick 'n dirty shell scripts)
-- David