LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-14-2013, 10:05 AM   #1
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Rep: Reputation: Disabled
Send Email from Private SMTP to Internet


I want to setup a private SMTP server on my linux machine. At the same time, how can I send the email from my private smtp server to gmail or to any other email ID on the internet?
 
Old 08-14-2013, 10:26 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 20,707

Rep: Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088Reputation: 5088
Quote:
Originally Posted by sunveer View Post
I want to setup a private SMTP server on my linux machine. At the same time, how can I send the email from my private smtp server to gmail or to any other email ID on the internet?
You need to configure an email server on your Linux system (postfix or sendmail work fine), then configure it to use a smarthost somewhere else (such as Gmail/Yahoo).

There are plenty of how-to guides you can find on Google for doing both.
 
Old 08-15-2013, 03:49 AM   #3
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
I want to create my own webmail and my own email servers and not to use google or yahoo.
 
Old 08-15-2013, 03:56 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,638

Rep: Reputation: 434Reputation: 434Reputation: 434Reputation: 434Reputation: 434
Then you need a registered domain name, and a public ip in a 'static non-consumer' range would be helpful.
 
Old 08-15-2013, 05:22 AM   #5
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
I tried to send mail from sendmail on fedora to gmail and ymail and emails were properly delivered to the inbox.

Then, I got my public IP registered with the DNS service at cloudns.net and checked whether my domain MX records pointing to my machine with "mtoolbox" service and all was perfect.

I also opened smtp port 25 in my router and machine and then tried to send email from gmail and ymail to my private sendmail server as

sunveer@mymail.cloudns.org

But I didn't receive any email on my local machine and didn't receive any failure notice on gmail or ymail.

What additional setting is required to receive the email.

Last edited by sunveer; 08-15-2013 at 06:24 AM.
 
Old 08-15-2013, 06:48 AM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,353

Rep: Reputation: Disabled
You may want to set up procmail to route mail to your home ~/Mail folder. Usually without that it ends up in /var/spool/mail/root. Did you look in there to see if your test messages were received?
 
Old 08-15-2013, 07:02 AM   #7
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dive View Post
You may want to set up procmail to route mail to your home ~/Mail folder. Usually without that it ends up in /var/spool/mail/root. Did you look in there to see if your test messages were received?
No!, They are not there.
 
Old 08-15-2013, 07:51 AM   #8
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,353

Rep: Reputation: Disabled
One way of testing sendmail is to tail -f /var/log/maillog and then send yourself a test message. It should show up in the log if it receives it.
 
Old 08-15-2013, 03:38 PM   #9
Dafydd
Member
 
Registered: Oct 2008
Posts: 344

Rep: Reputation: 29
I have some php scripts that allow me to send batch email from my terminal. I use it once a month to send announcements about a club meeting to the membership.
 
Old 08-16-2013, 09:51 AM   #10
sunveer
Member
 
Registered: Jul 2012
Posts: 139

Original Poster
Rep: Reputation: Disabled
I also noticed another issue in sending email.

Sometimes, when I send email to gmail, it is sent successfully but sometimes, it says
Code:
host gmail-smtp-in.l.google.com[74.125.127.27] said:
    550-5.7.1 [59.90.144.48] The IP you're using to send mail is not authorized
    to 550-5.7.1 send email directly to our servers. Please use the SMTP relay
    at your 550-5.7.1 service provider instead. Learn more at
    550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336
    b21si2383474ana.176 (in reply to end of DATA command)
I have checked at spamhouse.org, that my IP is listed in PBL list which states
Code:
It is the policy of Airtel Telemedia Services that unauthenticated email sent from this IP address should be sent out only via the designated outbound mail server allocated to Airtel Telemedia Services customers.

Also, I have not subscribed to my ISP email service, then how come my email gets delivered to gmail sometimes and sometimes not.

Also, I still can't receive any emails from internet external domains. My reverse DNS lookup mismatch with my forward DNS, could this be a reason for not receiving emails. But I tell you I have received emails a few times though, don't know how?

Update: Now receiving emails from yahoo but not from gmail.

Last edited by sunveer; 08-16-2013 at 11:43 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 08:40 AM
Send email to specific SMTP servers per email from my server? neilius Linux - Server 6 06-25-2009 07:31 AM
Can't send email using SMTP...stuck smiley_lauf Linux - Newbie 4 01-31-2006 09:20 PM
can't send email, smtp or sendmail dtra Linux - Software 1 11-19-2005 07:00 PM
SENDMAIL as an SMTP RELAY SERVER that can send email to internet. how? kublador Linux - Software 7 10-25-2003 09:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration