Configure SendMail to send mails to Googlemail?
I am on a residential ISP. My Linux server at home is on 24/7 and I use DynDNS to access it from anywhere. I have sendmail running and it sends various system alerts to my root mail which I pickup with "mail" when logged into the server via SSH. Is it possible to configure sendmail to send these mails to my GoogleMail account without the server being a "legitimate" e-mail server....so I don't have to mess with TX records or whatever they're called like you get with business-style Internet accounts? I know at work when we set up our own e-mail server, we had to update the TX record (whatever that is) so that mail from people outside the office would reach us.
Any resources or advice on how to do this would be great, assuming it's possible. Erm - I've not explained that too well, but hopefully someone will know what I mean :D |
Hi,
Have you ever tried to send an email from your server and see what happens? Maybe all you have to do is to define a smarthost for sendmail, if your ISP doesn't let you use your mailserver for outgoing mail. You can test with: Code:
mail -s "Test" yourname@gmail.com < /dev/null Regards |
Good idea - but didn't work :) Got returned. Presumably at the very least I'd need to configure SendMail at the minimum to point to my ISP's smtp server?
|
You should have looked at the logs (/var/log/maillog usually) to help us identify the reason mail was returned.
Also posting distro, sendmail version etc could help Regards |
Apologies - I'm using Fedora 12 and my version of sendmail is 8.14.3. My maillog looks like this: -
Code:
Mar 19 10:40:13 joshua11 sendmail[1784]: o2JAeCvj001784: from=<root@joshua11>, size=490, class=0, nrcpts=1, msgid=<201003191040.o2JAeBdC001783@joshua11>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] |
It looks like you cannot reach gmail maybe because of your isp blocks your mail server..
To add your isp mail server as a smarthost, edit /etc/mail/sendmail.cf (maybe yours is in a different location), find the line hat starts with DS and change it, to: Code:
DSmail.isp.com |
Thanks - I did that and tried again and got it returned again with a different error -
Code:
> ----- The following addresses had permanent fatal errors ----- Code:
Mar 19 11:24:40 joshua11 sendmail[2371]: o2JBObYj002371: to=<root@joshua11>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31730, dsn=2.0.0, stat=Sent |
gmail rejects your mail because it comes from an unqualified domain (localhost.localdomain)
You can try to edit /etc/hosts and add your domain in localhost address and see if it works Code:
127.0.0.1 domain.com localhost.localdomain If it doesn't work, then you have to use masquerading Do not forget to always make backups before editing files Regards |
That didn't work...my /etc/hosts file entry looks like: -
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 joshua11.<dummydomain>.org Dummydomain actualyl links to my DynDNS account hostname domain, but it's not "real" as such. Thank you anyway. |
The domain must be existant in order to prevent spammers
Use your isp domain name and put it first in /etc/hosts. Code:
127.0.0.1 isp-domain.com localhost localhost.localdomain |
Quote:
|
Reviewing the thread I saw that I've missed
Quote:
Since you're using fedora have a look at this post, to see what you need to do. Before anything else you should backup your current sendmail.mc and sendmail.cf Regards |
I'm still getting an error...
Code:
Jun 11 14:16:53 joshua11 sendmail[13852]: o5BDGq0c013850: o5BDGr0c013852: DSN: Data format error Code:
define(`SMART_HOST',`smtp.orangehome.co.uk')dnl Code:
AuthInfo:smtp.orangehome.co.uk "U:root" "I:<SMTP SERVER USER HERE>" "P:<SMTP SERVER PASSWORD HERE>" "M:LOGIN PLAIN". |
What's in the mail sent back to you?
|
That's just it, the mail never actually gets bounced back. It just kinda vanishes.
|
All times are GMT -5. The time now is 09:31 AM. |