Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 26, 2011 5:23 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
Hello,

Is it possible to configure postfix to send emails without setting up a domain for the server? I am using Ubuntu 10.04.

In this guide http://library.linode.com/email/postfix ... 0.04-lucid it asks for a FQDN. I just want to test sending emails.

Thank you


Top
   
PostPosted: Thu May 26, 2011 5:27 pm 
Offline
Senior Member

Joined: Sun Oct 30, 2005 7:52 pm
Posts: 97
fernandoch wrote:
In this guide http://library.linode.com/email/postfix ... 0.04-lucid it asks for a FQDN. I just want to test sending emails.

For testing purposes, you could use the default reverser dns for your static IP address as your FQDN, such as li-x-x.members.linode.com.

--
Travis


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 4:07 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
I installed postfix, but how can I test it? I try the "mail" command but it says "command not found"

Thank you


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 4:37 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
The postfix package is an MTA (mail transport agent) that doesn't include a "mail" front end program MUA (mail user agent). It does support a sendmail-compatible interface which many programs use, but that's not really for injecting fully formed messages and not for interactive use.

There are any number of mail user agent packages that you can use on top of postfix for delivery (and you can install more than one), but if you're just looking for a very basic/traditional "mail" command, try the bsd-mailx package.

-- David


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 4:46 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
Thank you David for the reply, but still not too clear.

You mean I can use postfix alone to send emails from a web application like wordpress or drupal because it is sendmail-compatible?

I just want my server to be able to send emails, only that...


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 6:13 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
I think this cannot be done with postfix...

I will try it with exim by following this guide

http://library.linode.com/email/exim/se ... 0.04-lucid


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 6:55 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
It can be done with postfix, all my servers used postfix as a send only mailserver. Exim can do it too.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 6:56 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
It can be done, but mailutils has to be installed too.


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 4:28 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
fernandoch wrote:
It can be done, but mailutils has to be installed too.

That will depend on just what is generating the mail (you haven't mentioned any specifics). If your application stack and/or scripts need a command line "mail" command to be able to prepare and queue a message to be sent, then yes, you'll need another package. I think on Ubuntu, any of bsd-mailx (what I typically use), heirloom-mailx, or mailutils (gnu version along with other tools) would all work at least. It's not like installing one of these hurts if you end up not using it, so if it solved your issue, that's great.

However, that fact doesn't imply that you must install such a package to be able to configure an outbound only server.

While it's not that uncommon for shell scripts or other simpler stuff to want to use "mail", I would expect most larger application stacks to format messages themselves and either deliver through a sendmail interface or directly to an SMTP server (which can also be your local Postfix installation). In the latter case no extra packages would be required.

-- David


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 4:51 pm 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
db3l wrote:
While it's not that uncommon for shell scripts or other simpler stuff to want to use "mail", I would expect most larger application stacks to format messages themselves and either deliver through a sendmail interface or directly to an SMTP server (which can also be your local Postfix installation). In the latter case no extra packages would be required.

-- David


And how can you test it easily?


Top
   
 Post subject:
PostPosted: Thu Jun 02, 2011 5:45 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
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


Top
   
 Post subject:
PostPosted: Fri Jun 03, 2011 2:14 am 
Offline
Senior Member

Joined: Fri May 20, 2011 2:45 am
Posts: 63
Location: Spain
Thank you David, pretty clear.

I will try that.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group