[SOLVED] Sendmail to use Gmail's SMTP to send mail
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
After I was done with these instructions, I think I "cooked" sendmail... Can no longer configure it and it seems that I will have to start from scratch again...
Anybody can provide direction? How to get sendmail to send emails using Gmail's SMTP server?
Like i said, I followed the instructions at that link, but for some reasons, it no longer works. I am trying to send an email using a python script somebody put together, and before I tried to modify sendmail, the emails were at least created, but could not be delivered (due to the misconfiguration and not using Gmail's smtp). At least, I could see them as "Deferred" in root's inbox. I am using Webmin to manage my server and see the inboxes.
Now since I tried to modify sendmail to use Gmail's smtp servers, I no longer can access sendmail's config page (in Webmin) nor I can see root's inbox. I also dont receive the emails so this means that they are not sent. When I try to access sendmail's config page in webmin, it says:
Quote:
Your sendmail config file does not appear to be for the latest sendmail version. Webmin only supports versions 8.8 and above.
Sendmail.cf has this in it (looks rather incomplete to me...)
Well I'd certainly steer clear of webmin for anything at all. I'd also personally steer clear of sendmail as it's ancient and complicated compared to, for example, Postfix. You're never going to get anywhere using webmin errors to base a diagnosis on, what actually happens in the mail logs? Does sendmail start? Is that all that is in the cf file?? What about the sendmail.mc?
Well in light of your reply I think the best course of action is to ignore webmin for what it says and delete the config files of sendmail and restart fresh. What happens I think is somehow the procedure I followed was either flawed or I screwed up doing it (more likely to be this one) and resulted in an incomplete config file.
So if I get this straight, you're recommending to get away from sendmail for the default system email client? As for webmin you also recommend staying away from it? I use webmin on my server to have all features and info available in the same location and be able to remotely control them. Do you have a suggestion for a better replacement?
Sendmail is still the most prolific SMTP server on the web, and it's extremely good, it's just complicated and obscure - I mean, it has a config file to manage the config file!
I would never want to use an all-in-one tool for management like that. I wold rather know the actual products I'm using. SSH works well for me.
THen I restarted the sendmail daemon and got this output:
Code:
root@server:/etc/mail# /etc/rc.d/rc.sendmail start
Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q25m
451 4.0.0 /etc/mail/sendmail.cf: line 1: fileclass: cannot open 'ATURE(authinfo,hash': No such file or directory
554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m
Then I tested sendmail with
mail email@domail.com and entering subject/text body and pressing Crtl+D but I never gor the email.
So this confirms that something is wrong. Whats the problem?
451 4.0.0 /etc/mail/sendmail.cf: line 1: fileclass: cannot open 'ATURE(authinfo,hash': No such file or directory
I don't see something wrong in the .mc file, but looks line there is an error at the beginning(maybe some not printed characters), so the resulting .cf is bungled.
Take a look at this howto , here at LQ (just the "Client-Side SMTP AUTH + SMART_HOST" section) to recreate a correct .mc file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.