TUTORIAL Install gMail as SMTP SmartHost for SendMail

jehowe

Guru
Joined
Nov 14, 2007
Messages
288
Reaction score
4
Just a comment on an old thread. Maybe I'm just not very smart, but I lost an hour trying to figure out that any changes made to the client-info file don't just require a sendmail reload, but also need to be followed up with the command:

makemap -r hash client-info.db < client-info

Doh! Spamhaus just recently banned my Comcast IP range (which yahoo uses), with no recourse, sending me running to this thread. Thanks Ward for the gmail setup.
 

cb122

New Member
Joined
Jan 9, 2009
Messages
18
Reaction score
0
Troubles

I have followed this to the T as well and I get the following in my maillog

.
Jan 13 21:17:01 pbx sendmail[2061]: n0E1VJaN032521: to=<[email protected]>, delay=00:45:41, xdelay=00:28:00, mailer=esmtp, pri=313780, relay=alt1.aspmx.l.google.com. [xx.xx.xxx.114], dsn=4.0.0, stat=Deferred: Connection timed out with alt1.aspmx.l.google.com.



Any Pointers?



Thanks
 

cb122

New Member
Joined
Jan 9, 2009
Messages
18
Reaction score
0
Nevermind

I uninstalled and deleted my /etc/mail dir and reinstalled. I also had to install sendmail-cf to get this to work. but the important thing is it works.


Thanks
Chris
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
Running on ROGERS CABLE here in Ontario and I know they block port 25. I tried all the native SMART AUTH recommendations and even tried a recommendation from a thread that talked about setting up Sendmail to handle all Rogers Authentication for just general use on the LAN but to no avail.

Then I restored all the Access, access.db, sendmail.mc, sendmail.cf files and tried to set things up like Ward has shown and I am getting nowhere. Seems like the changes are taking since I do some things correct in the Logs but I keep seeing stuff like status=deferred. Can't help but wonder if it has somethnig to do with the fact I put a dyndns entry in my hosts file. I have messed with this for HOURS! Arghhhh!:banghead:

I can't even cut and paste the log here either since I have not figured out why I can't Telnet to the CentOS box (so I can cut and paste to my Windoze email client)

Any other straight forward instructions so I can start to try this again? Is there something about Rogers that is jamming this up?

SIGNED BORN-AGAIN NEWBIE.:cryin:
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
I can't even cut and paste the log here either since I have not figured out why I can't Telnet to the CentOS box (so I can cut and paste to my Windoze email client)

We use secure SSH to connect to the box - google on puTTY to find the windows application.

It's select to copy , and right click to paste.

Joe
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
This definately looks messed.

OK, I've tried this like a 100 times now and am getting nowhere. In fact the log messages are getting worse and worse.

How do I re-do the sendmail from scratch. What is all this missing certificate stuff?

:banghead::banghead:

Jan 25 09:10:52 pbx sendmail[1107]: NOQUEUE: stopping daemon, reason=signal
Jan 25 09:10:53 pbx sendmail[1266]: alias database /etc/aliases rebuilt by root
Jan 25 09:10:53 pbx sendmail[1266]: /etc/aliases: 77 aliases, longest 16 bytes, 785 bytes total
Jan 25 09:10:53 pbx sendmail[1271]: starting daemon (8.13.8): SMTP+queueing@01:00:00
Jan 25 09:10:53 pbx sendmail[1271]: STARTTLS: ServerCertFile missing
Jan 25 09:10:53 pbx sendmail[1271]: started as: /usr/sbin/sendmail -bd -q1h
Jan 25 09:10:53 pbx sm-msp-queue[1279]: starting daemon (8.13.8): queueing@01:00:00
Jan 25 09:10:53 pbx sendmail[1272]: n0PDgRUD001108: SMTP outgoing connect on pbx
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS: ClientCertFile missing
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS: ClientKeyFile missing
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS: CACertPath missing
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS: CACertFile missing
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS: CRLFile missing
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, init=1
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, start=ok
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, info: fds=11/8, err=2
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, info: fds=11/8, err=2
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, get_verify: 20 get_peer: 0x9759300
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-MD5, bits=128/128
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=client, cert-subject=/C=US/ST=California/L=Mountain+20View/O=Google+20Inc/CN=smtp.gmail.com, cert-issuer=/C=ZA/S
T=Western+20Cape/L=Cape+20Town/O=Thawte+20Consulting+20cc/OU=Certification+20Services+20Division/CN=Thawte+20Premium+20Server+20CA/emailAddress=premium-serve
[email protected], verifymsg=unable to get local issuer certificate
Jan 25 09:10:53 pbx sendmail[1272]: STARTTLS=read, info: fds=11/8, err=2
Jan 25 09:10:54 pbx last message repeated 2 times
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: [email protected], delay=00:28:25, xdelay=00:00:01, mailer=relay, pri=123325, relay=smtp.gmail.com [72.
14.205.111], dsn=5.0.0, stat=Service unavailable
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: alias MAILER-DAEMON => postmaster
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: alias postmaster => root
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: alias root => [email protected]
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: alias postmaster => root
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: alias root => [email protected]
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: n0PEAriu001272: return to sender: Service unavailable
Jan 25 09:10:54 pbx sendmail[1272]: STARTTLS=read, info: fds=11/8, err=2
Jan 25 09:10:54 pbx sendmail[1272]: STARTTLS=read, info: fds=11/8, err=2
Jan 25 09:10:54 pbx sendmail[1272]: n0PEAriu001272: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=35175, relay=smtp.gmail.com, dsn=
5.0.0, stat=Service unavailable
Jan 25 09:10:54 pbx sendmail[1272]: n0PEAriu001272: alias MAILER-DAEMON => postmaster
Jan 25 09:10:54 pbx sendmail[1272]: n0PEAriu001272: alias postmaster => root
Jan 25 09:10:54 pbx sendmail[1272]: n0PEAriu001272: alias root => [email protected]
Jan 25 09:10:54 pbx sendmail[1272]: n0PEAriu001272: done; delay=00:00:00, ntries=1
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: Losing ./qfn0PDgRUD001108: savemail panic
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: SYSERR(root): savemail: cannot save rejected email anywhere
Jan 25 09:10:54 pbx sendmail[1272]: n0PDgRUD001108: done; delay=00:28:25, ntries=2
Jan 25 09:10:54 pbx sendmail[1272]: STARTTLS=read, info: fds=11/8, err=2
Jan 25 09:10:54 pbx sendmail[1272]: STARTTLS=client, SSL_shutdown not done
root@pbx:/var/log $

HELP! (Please...)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
SendMail appears to be really hosed. You can download the original Orgasmatron config of sendmail but it doesn't have all the pieces of the sendmail executables, etc. Issue these commands after making a backup of your existing stuff. No guarantees!!

HTML:
service sendmail stop
cd /
wget http://nerdvittles.dreamhosters.com/pbxinaflash/source/sendmail/sendmail.zip
unzip sendmail.zip
mv /etc/mail /etc/mail-hosed
tar zxvf sendmail.tgz
service sendmail restart

Then you can try making your changes again. Or, better yet, follow the VPN in a Flash tutorial. Good luck!
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
It was hosed, munged, trashed, whatever all right. Although I still think I see Log issues (might that be the non 587 port auth attempt) it is now WORKING! Yeah! Thanks!

And thanks to the other member for answering on my Telnet issue and directing my to puTTY. Worked like a charm.

(Now to fix SAMBA so its accessible and does not fight with my server over being Browse Master)

J
 

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Is there anyway to change the user it come from, because right now it is working, but the e-mail come from:

root ([email protected])

is there anyway to change the name root to something else, i would like to put FaxServer as name or something like that, where can i cange that thanx!
 

tenortim

New Member
Joined
Mar 6, 2009
Messages
5
Reaction score
1
Slight error in the original instructions

I believe the main problem with these instructions is the use of the echo command. The echo command stips double-quotes from whatever is echo'd so that client-info file doesn't contain the double-quotes. To fix this problem, when you edit client-info to change user-id and password, reinsert the double-quotes. This fixed it for me.

Undrhil

Bingo! You hit the nail on the head. The auth-info syntax requires the username, password etc to be surrounded by double-quotes, but if you follow the directions in the original article, the shell is going to wind up stripping them. Edit the auth-info file, make sure there are double-quotes around each part i.e.
"U:smmsp" "I:user_id" "P:password" "M:pLAIN"
not
U:smmsp I:user_id P:password M:pLAIN

Rerun the makemap and you should be in business.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
I believe this is explained in the file itself. You had to open it to insert your credentials. :rolleyes:
 

jeffersonkim

New Member
Joined
Sep 12, 2008
Messages
25
Reaction score
0
OMG IT WORKED FOR ME!!! I just copied what was in post 1 and it wass all good THANK YOU!
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
Just installed a Pbxiaf server on an AT&T DSL network. The maillog is showing the messages pasted below. I know the sendmail config is correct because I did a Mondo backed-up / restored from a working system (Brighhouse cable).

Can someone provide me some clues?
thx

Jun 12 21:12:24 pbx sendmail[4086]: n5D1B48V004066: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:40, xdelay=00:00:20, mailer=relay, pri=120346, relay=smtp.gmail.com, dsn=4.0.0, stat=Deferred: Name server: smtp.gmail.com: host name lookup failure
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
Just installed a Pbxiaf server on an AT&T DSL network. The maillog is showing the messages pasted below. I know the sendmail config is correct because I did a Mondo backed-up / restored from a working system (Brighhouse cable).

Can someone provide me some clues?
thx

Jun 12 21:12:24 pbx sendmail[4086]: n5D1B48V004066: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:40, xdelay=00:00:20, mailer=relay, pri=120346, relay=smtp.gmail.com, dsn=4.0.0, stat=Deferred: Name server: smtp.gmail.com: host name lookup failure

can you manually ping smtp.gmail.com, if not, check /etc/resolv.conf - do you have nameservers listed?

My router is on 192.168.0.1, so i have a

nameserver 192.168.0.1

in my file. Its acting like a DNS issue

Myk
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
My DNS seems to be OK and I can ping gmail.com and google.com.

root@pbx:/var/log $ cat /etc/resolv.conf
nameserver 192.168.1.254

root@pbx:/var/log $ ping smtp.gmail.com
PING gmail-smtp-msa.l.google.com (72.14.247.111) 56(84) bytes of data.
64 bytes from ag-in-f111.google.com (72.14.247.111): icmp_seq=1 ttl=243 time=46.6 ms


root@pbx:/var/log $ ping google.com
PING google.com (74.125.67.100) 56(84) bytes of data.
64 bytes from gw-in-f100.google.com (74.125.67.100): icmp_seq=1 ttl=54 time=47.1 ms
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
Also, Im certain that sendmail is functioning on the PBX. I have several emails sent from this PBX BEFORE I moved it to another location. The problem must be related to the router or AT&T.
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
My DNS seems to be OK and I can ping gmail.com and google.com.

root@pbx:/var/log $ cat /etc/resolv.conf
nameserver 192.168.1.254

root@pbx:/var/log $ ping smtp.gmail.com
PING gmail-smtp-msa.l.google.com (72.14.247.111) 56(84) bytes of data.
64 bytes from ag-in-f111.google.com (72.14.247.111): icmp_seq=1 ttl=243 time=46.6 ms


root@pbx:/var/log $ ping google.com
PING google.com (74.125.67.100) 56(84) bytes of data.
64 bytes from gw-in-f100.google.com (74.125.67.100): icmp_seq=1 ttl=54 time=47.1 ms

Fixed!

Added OpenDNS as a DNS server.
 

ubergoober

New Member
Joined
Jun 26, 2009
Messages
17
Reaction score
0
domain gmail.com required

I finally got this working after reading a gmail help article that was send back in my returned mail by the google server. It was complaining that I hadn't used @gmail.com when logging in. Edited up the client-info file to included same, deleted sendmail.cf and then did a make. All was suddenly well.

Tom
 

raphou

Member
Joined
Nov 8, 2008
Messages
77
Reaction score
2
Hi!

You guys are so lucky it works...

I still have the same issue whatever I do...

My email comes back everytime with the following message (I go to webmin/sendmail and then check mailboxes)

Code:
[SIZE=1][B]From[/B][/SIZE] [SIZE=1]Mail Delivery Subsystem <[EMAIL="[email protected]"][email protected][/EMAIL]>[/SIZE]   [SIZE=1][B]To[/B][/SIZE] [SIZE=1]<[EMAIL="[email protected]"][email protected][/EMAIL]>[/SIZE]   [SIZE=1][B]Date[/B][/SIZE] [SIZE=1]Sun, 12 Jul 2009 18:18:05 +0200[/SIZE]   [SIZE=1][B]Subject[/B][/SIZE] [SIZE=1]Returned mail: see transcript for details[/SIZE]     
       The original message was received at Sun, 12 Jul 2009 18:18:04 +0200
from pbx.dyndns.org [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<[email protected]>
    (reason: 530-5.5.1 Authentication Required. Learn more at                   
)

   ----- Transcript of session follows -----
... while talking to smtp.gmail.com:
>>> MAIL From:<[email protected]> SIZE=1388
<<< 530-5.5.1 Authentication Required. Learn more at                            
<<< 530 5.5.1 [url]http://mail.google.com/support/bin/answer.py?answer=14257[/url] 10sm4129489eyd.7
554 5.0.0 Service unavailable

I've doubled check and I did eveything it was written (actually I didn't have to do much as my system is Vpn-in-a-flash). I even tried to generate ssl certificates with no success. I'm sure of my login/password as I can login with fedora remixed thru vnc/hamachi)

Any idea?

Thanks a lot!
 

Members online

Forum statistics

Threads
25,782
Messages
167,509
Members
19,203
Latest member
frapu
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top