Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've setup my sendmail to send mail using Google SMPT. However, I keep getting this error.

Jun 20 11:35:24 server sendmail[2370]: p5KBZO3X002370: from=apache, size=1646, class=0, nrcpts=1, msgid=<1308569724029ade80ec0a5bf4a6186a0294c806b9@anuary.com>, relay=apache@localhost
Jun 20 11:35:24 server sendmail[2371]: p5KBZOal002371: from=<apache@server.hotelpublisher.com>, size=1755, class=0, nrcpts=1, msgid=<1308569724029ade80ec0a5bf4a6186a0294c806b9@anuary.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jun 20 11:35:24 server sendmail[2370]: p5KBZO3X002370: to=g.kuizinas@gmail.com, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31646, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p5KBZOal002371 Message accepted for delivery)
Jun 20 11:35:24 server sendmail[2373]: STARTTLS=client: file /etc/mail/certs/sendmail.pem unsafe: Group readable file
Jun 20 11:35:25 server sendmail[2373]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=OK, cipher=RC4-SHA, bits=128/128
Jun 20 11:35:25 server sendmail[2373]: p5KBZOal002371: to=<g.kuizinas@gmail.com>, ctladdr=<apache@server.hotelpublisher.com> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=121755, relay=smtp.gmail.com [74.125.39.109], dsn=5.0.0, stat=Service unavailable
Jun 20 11:35:25 server sendmail[2373]: p5KBZOal002371: p5KBZPal002373: DSN: Service unavailable
Jun 20 11:35:25 server sendmail[2373]: p5KBZPal002373: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33011, dsn=2.0.0, stat=Sent

If any more information is required, please ask.

share|improve this question
    
I /think/ GMail will only let you send mail from the authed account. I.E. if you're logging into the GMail account as 'bob@gmail.com' you can only send emails from bob@gmail.com, otherwise people would use it as a spam gateway. Not sure if that's causing the errors (It says something about DNS so I guess not). Also GMail can get pretty pissy about using them as an SMTP gateway so it might be worth looking at something like Amazon SES if you're going to be a heavy user –  sam Jun 20 '11 at 11:43
    
@samarudge, none of this is true. You shouldn't comment to say your opinion about some technical. –  Guy Jun 20 '11 at 11:53
    
I said "I think", back when I didn't really know what I was doing (guess that's still now haha) I had my GMail account closed 'cuz I was sending a few hundred emails a day by SMTP. I've not used Gmail as SMTP in my own apps for a while but I remember something about not being able to send from a user other than the account owner, not sure if they changed that –  sam Jun 20 '11 at 11:55

2 Answers 2

dsn=5.0.0, stat=Service unavailable is generic error.

For details you should read DSN (Delivery Status Notification) email which was delivered to root mailbox.

Jun 20 11:35:25 server sendmail[2373]: p5KBZPal002373: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33011, dsn=2.0.0, stat=Sent

share|improve this answer

You need to change the hostname of your server / configuration so that it's not "localhost.localdomain".

share|improve this answer
    
My /etc/sysconfig/network is gist.github.com/e42996616e47c822fab6. Do I need to change it anywhere else? –  Guy Jun 20 '11 at 11:47
    
Not sure, but "Jun 20 11:35:24 server sendmail[2371]: p5KBZOal002371: from=<apache@server.hotelpublisher.com>, size=1755, class=0, nrcpts=1, msgid=<1308569724029ade80ec0a5bf4a6186a0294c806b9@anuary.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]" sugests it's showing up somewhere. Ages since I worked with sendmail to be fair. –  EightBitTony Jun 20 '11 at 11:58
    
It is OK to have localhost.localdomain there because it means that message was accepted from 127.0.0.1 which IS localhost. –  AlexD Jun 20 '11 at 12:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.