LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2011, 10:38 AM   #1
tsh3po
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Rep: Reputation: 0
Sending Backup Logs via email using exchange to relay


Good All,

Good people I need assistance rather urgently with a mail issue on one of our sites. Basically what I gather is that they have been sending out database backup logs/reports to an external mail address but using google's smtp to relay the messages. This setup has been working all along till their new network admins decided to block that relay and now want to use their local exchange server to relay all the messages.
Looking at some of the /var/log/maillog entries i can see that
Code:
lost connection with alt4.gmail-smtp-in.l.google.com[209.85.225.27] while performing the HELO handshake
and somewhere along that string i have
Code:
relay=alt4.gmail-smtp-in.l.google.com[209.85.225.27]:25,
meaning its clearly using gmail to relay, question is how or where do i change this relay string or rather whats the quickest way of resolving this. I'm fairly new to the linux admin world and just need a quick fix on this one.

for troubleshooting purposes, I ran "cat somefile.txt | mail -s "Subject" my_email_address@gmail.com" which generated:

Code:
Aug 18 16:13:56 server_name postfix/smtp[24320]: E9978F30140: to=<my_email_address@gmail.com>, relay=alt4.gmail-smtp-in.l.google.com[209.85.225.27]:25, delay=1930, delays=1930/0.01/0.17/0, dsn=4.4.2, status=deferred (lost connection with alt4.gmail-smtp-in.l.google.com[209.85.225.27] while performing the HELO handshake)
 
Old 08-18-2011, 12:01 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,361

Rep: Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912Reputation: 3912
Quote:
Originally Posted by tsh3po View Post
Good All,
Good people I need assistance rather urgently with a mail issue on one of our sites. Basically what I gather is that they have been sending out database backup logs/reports to an external mail address but using google's smtp to relay the messages. This setup has been working all along till their new network admins decided to block that relay and now want to use their local exchange server to relay all the messages.
Looking at some of the /var/log/maillog entries i can see that
Code:
lost connection with alt4.gmail-smtp-in.l.google.com[209.85.225.27] while performing the HELO handshake
and somewhere along that string i have
Code:
relay=alt4.gmail-smtp-in.l.google.com[209.85.225.27]:25,
meaning its clearly using gmail to relay, question is how or where do i change this relay string or rather whats the quickest way of resolving this. I'm fairly new to the linux admin world and just need a quick fix on this one.

for troubleshooting purposes, I ran "cat somefile.txt | mail -s "Subject" my_email_address@gmail.com" which generated:

Code:
Aug 18 16:13:56 server_name postfix/smtp[24320]: E9978F30140: to=<my_email_address@gmail.com>, relay=alt4.gmail-smtp-in.l.google.com[209.85.225.27]:25, delay=1930, delays=1930/0.01/0.17/0, dsn=4.4.2, status=deferred (lost connection with alt4.gmail-smtp-in.l.google.com[209.85.225.27] while performing the HELO handshake)
This isn't urgent for anyone here...we volunteer our time. If you require urgent support, then paying for it from RedHat or SuSE would be a good thing. And the relay host value will depend on if you're using sendmail or postfix. For sendmail, it's usually the /etc/mail/sendmail.cf file, and you want to change the value for the smart host server. I believe it's a different file for postfix, but the smart host directive is the same.

Since this is "urgent", Google has lots on the subject.
http://www.postfix.org/postconf.5.html
http://www.faqs.org/docs/linux_network/x15291.html
 
Old 08-19-2011, 02:25 AM   #3
tsh3po
LQ Newbie
 
Registered: Mar 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Hi All,

I finally got it working and thought i should post the solution should anyone face a similar problem

list of commands ran:

Code:
postconf -e 'relayhost = smtp.example.com'
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='
echo "smtp.example.com   username:password" > /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
/etc/init.d/postfix restart
source: http://www.howtoforge.com/postfix_re...her_mailserver
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Email from Linux to Exchange Server deepadev Linux - Server 5 07-07-2011 08:40 AM
Mointor when a user logs in and sending an email beanpost Linux - General 4 03-31-2010 06:11 AM
Sending logs by email from D Link router taylorkh Linux - Hardware 1 08-27-2007 08:03 PM
Linux newbie.. trying to set up email relay to Exchange jaybuffet Linux - Networking 4 10-29-2004 11:51 AM
Sending mail from linux using MS Exchange relay host a2k2 Linux - General 0 08-16-2004 02:55 PM


All times are GMT -5. The time now is 12:58 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