LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-28-2007, 12:45 PM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Rep: Reputation: 30
Postfix installation to send out email from localhost


dear all,

i'm running an ubuntu server. i need to be able to send out emails from this server from a script.

i do not need to receive emails, just to send them out, and i want to be sure that nobody can use my smtp server from the outside.

i thought i would use sendmail, but i was convinced to use postfix instead.

anyone can please point me out to configure properly postfix just to send out email from local scripts? i want everything else to be not allowed.

thank you in advance for those kind souls replying to this

wc.
 
Old 09-28-2007, 01:55 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You don't need postfix for this. You can just use an intelligent MUA, such as mailx (formely, nail). There's also ssmtp.
 
Old 09-29-2007, 08:33 AM   #3
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
thank you for your response. so, you would use mailx? any good resource to strart from?

thank you,

aj.
 
Old 09-29-2007, 09:04 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Different programs go by the name mailx. I mean this one. With mailx, all you need is the following line in /etc/nail.rc:
Code:
set smtp=smtp.server.com
Thereafter, any mail submitted via mailx would be delivered through smtp.server.com. To call it from a script, you'd do something like
Code:
mailx -r me@src.com   you@dst.com < email.txt
Anyway, so, yes, I'd use mailx, since it's installed by default in Slackware. Not sure about Ubuntu. Mutt is popular and should have similar facilities.
 
Old 09-29-2007, 09:12 AM   #5
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
hi again,

however if i'm correct you're actually suggesting to use an external smtp server.

i have a quite powerful server which will need to send out notification emails to quite a big social network. this is why i would have preferred using a localhost smtp server.

however i'm really not familiar with this, so you would suggest just calling an external SMTP?
 
Old 09-29-2007, 09:24 AM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
In order for the mail to be delivered it'll have to be sumitted to an smtp server. You don't need to be running an smtp server to submit mail, which is what you plan to be doing. What I had in mind is that you'd contact some upstream server, such as the one maintained by your ISP. I'm assuming you want to send mail to people having accounts outside your LAN.

Something to consider is that, unless you have a static IP address, many mail servers will not accept your mail (due to the abundance of spam), and so you'll have to relay your mail through your ISP's servers anyway.
 
Old 09-29-2007, 10:31 AM   #7
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
again, thank you.

i actually have a static IP server, which will be doing quite an intensive mail sending [notifications on activities, such as 'you have received a new private message', etc].

still think it's the best solution?

thank you again for your time.

cheers,

aj.
 
Old 09-29-2007, 11:39 AM   #8
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
still think it's the best solution?
No. It's always good to run a mail server, even if just to get cron notifications. What you want to do can be done without one, but there are benefits to having one: logs, controlled throuput, etc. You say you don't want people to use your server from the outside. Can you explain what you mean by that? In particular, how do you plan to handle bounced messages?
 
Old 09-29-2007, 12:24 PM   #9
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
i have not thought about it yet. i am managing the info@mydomain.com box thorugh a service of my dns registrar. all of these will then be incoming in here.

would you suggest i might actually put up a whole smtp & pop mail servers instead?
 
Old 09-29-2007, 12:43 PM   #10
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
One possibility is to make sure your outgoing mail has info@mydomain for the envelope sender. That way, if there are any problems it would be returned there, and you wouldn't need to open port 25. Once you have things configured and running to your liking, you could add an MX record for your domain. Running a mail server is good experience. A pop/imap server would be secondary, if you don't mind reading your mail with using mail.
 
Old 09-29-2007, 01:04 PM   #11
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
ok thank you

wc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: SASL & Send mail through scripts frol localhost snjv Linux - Server 2 06-02-2007 10:53 AM
Postfix can't send email squirtle Linux - Newbie 1 09-24-2006 04:57 AM
How do I secure sendmail to only send email from php on localhost jmille34 Linux - Security 1 08-22-2006 07:51 PM
Postfix wont send email robmainella Linux - Software 3 12-04-2003 11:05 PM
How to setup Postfix to send email via POP dwynter Linux - Software 2 07-02-2002 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration