[SOLVED] Configure SendMail to send mails to Googlemail?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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:
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
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
Of course you need to use the real name of the isp mail server and make a backup of sendmail.cf before editing. After that restart sendemail service and test again.
Thanks - I did that and tried again and got it returned again with a different error -
Code:
> ----- The following addresses had permanent fatal errors -----
> <xxxxxx@googlemail.com>
> (reason: 553 5.1.8 <root@localhost.localdomain>: Sender address rejected: Domain not found)
>
> ----- Transcript of session follows -----
> ... while talking to smtp.orangehome.co.uk.:
> >>> MAIL From:<root@localhost.localdomain> SIZE=706
> <<< 553 5.1.8 <root@localhost.localdomain>: Sender address rejected: Domain not found
> 501 5.6.0 Data format error
Maillog looks like: -
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
Mar 19 11:24:55 joshua11 sendmail[2383]: o2JBOtHA002383: from=root, size=226, class=0, nrcpts=1, msgid=<201003191124.o2JBOtHA002383@joshua11>, relay=root@localhost
Mar 19 11:24:56 joshua11 sendmail[2384]: o2JBOtjk002384: from=<root@joshua11>, size=490, class=0, nrcpts=1, msgid=<201003191124.o2JBOtHA002383@joshua11>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Mar 19 11:24:56 joshua11 sendmail[2383]: o2JBOtHA002383: to=xxxxxx@googlemail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30226, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o2JBOtjk002384 Message accepted for delivery)
Mar 19 11:24:58 joshua11 sendmail[2386]: o2JBOtjk002384: to=<xxxxxx@googlemail.com>, ctladdr=<root@joshua11> (0/0), delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=120490, relay=smtp.orangehome.co.uk. [193.252.22.140], dsn=5.6.0, stat=Data format error
Mar 19 11:24:58 joshua11 sendmail[2386]: o2JBOtjk002384: o2JBOwjk002386: DSN: Data format error
Mar 19 11:24:58 joshua11 sendmail[2386]: o2JBOwjk002386: to=<root@joshua11>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31730, dsn=2.0.0, stat=Sent
Usually, when using, say, Outlook (urgh), I'd have to supply my ISP account username and password to send e-mails. Does this still apply if I'm simply using the smtp.orangehome.co.uk server as a relay?
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
Back to this - I have a domain with DynDNS, but my hostname is different on this box. Any more ideas? Still can't get mail sent from my server to my ISP and on to GoogleMail.
Usually, when using, say, Outlook (urgh), I'd have to supply my ISP account username and password to send e-mails. Does this still apply if I'm simply using the smtp.orangehome.co.uk server as a relay?
In this case you have to supply the same info to sendmail, so it can use the ISP mail server as a relay.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.