Sponsored Content
Top Forums Shell Programming and Scripting Sendmail Fails to send emails from Linux server. Post 303003138 by drysdalk on Friday 8th of September 2017 03:25:14 AM
Old 09-08-2017
Hi,

Well done - yes, it was indeed the hosts file entry that would have been the issue. Now, your smart relay is working. But what this error indicates is that smtp.zoho.com requires you to log in or otherwise authenticate beofre you can send mail through it.

What this tells us is that smtp.zoho.com isn’t meant to act as a mail relay or smart host, but rather is just a server for customers to send mail through via a mail client. This is different from a server that can act as a smart host. The general idea of an SMTP smart host is that it takes mail from hosts that would otherwise be unable or unwilling to deliver mail straight to their target on the Internet via SMTP, and it deals with passing the e-mails on to their final destinations. This it would seem is not the configured purpose of smtp.zoho.com.

However, all is not lost. Sendmail can be configured to support this situation, by having a file that tells it how to log in to smtp.zoho.com. You will need a valid username and password for the Zoho e-mail service, and you’d also need to be sure that the maintainers of smtp.zoho.com would be happy for their service to be used as a smart relay. But if all of that is fine, then what you need to do is set up a file called /etc/mail/authinfo with the login details.

Now, one thing that worries me here is that your Sendmail setup for whatever reason seems to be largely ignoring your macro, and so unless /etc/mail/authinfo is already set up in your Sendmail configuration (and it very well may be - have a look and see if it’s mentioned in the .cf), then it’s going to be a very unpleasant job to hack this into working shape.

Anyway, the format of /etc/mail/authinfo (which would then need compiled via makemap hash /etc/mail/authinfo < /etc/mail/authinfo in the usual way) is:

Code:
AuthInfo:smtp.zoho.com "U:USERNAME" "P:PASSWORD" "M:PLAIN"

This sets up authentication for smtp.zoho.com, with the specified username and password, and tells it to use plain-text authentication (which may or may not be right - you’d have to know what kind of authentication is supported for the Zoho SMTP service).

In short: without a working Sendmail macro this could be a lot of work to get up and running. A better bet here is to find another host on your network that can actualy be configured to act as a genuine smart relay for your domain, and to just set Sendmail up to use that host as its smart relay rather than this external service.
 

10 More Discussions You Might Find Interesting

1. Solaris

how to send mails to users on exchange server from sendmail/solaris(mailx)

Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies

2. Red Hat

Sendmail fails receiving mail since the IP changed on Redhat Server

Hi, Since i move my Linux Redhat server on another Network with new IP address. WE'RE ABLE TO SEND MAIL OUTSIDE BUT we can not receive any incoming mail. It alway points to the old IP. I updated new IP in /etc/hosts and /etc/sysconfig/network then reboot the system. 10.117.32.20 is an old ip... (3 Replies)
Discussion started by: lamoul
3 Replies

3. UNIX for Dummies Questions & Answers

How do I configure Linux server to be able to send emails internally?

Hi The script: #!/bin/sh #set -x # set admin email so that you can get email ADMIN="myemailaddress" # set alert level ALERT=4 df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output usep=$(echo $output | awk '{ print... (5 Replies)
Discussion started by: wbdevilliers
5 Replies

4. Shell Programming and Scripting

Send email from sendmail on AIX using exchange server as SMTP server

i am new in AIX i am trying to write a script to take a backup for specific files on server to and check error log if backup success send email to administrator , script done except for sending mail , i try to configure sendmail on aix to use our exchange server to send emails but still get error... (0 Replies)
Discussion started by: ahmed_salah
0 Replies

5. UNIX for Dummies Questions & Answers

Can't configure sendmail to send mails to external SMTP Server

Hi all,I know, that this is very common issue, but I can't find where is the problem... I have Solaris 10 installed.I want to send mail to external SMTP server, like:echo "letter body"| mailx -s "subject" test@test.comBut I donno what kind of changes I have to do in /etc/hosts and sendmail.cf or... (5 Replies)
Discussion started by: nypreH
5 Replies

6. UNIX for Advanced & Expert Users

mailx Vs sendmail to send internal emails to exchange

Hi Gurus, I have been searching for this around, but sendmail seems complicated and not sure if "mail" command would do, since all what I need to send internal emails from my solaris 10 box to our exchange server. Would the mailx or mail command do ? I tried the : # mailx -s test... (2 Replies)
Discussion started by: aladdin
2 Replies

7. Linux

Sendmail takes too long to start and the host is unable to send emails

Hello All, Sendmail takes too long to start and the host is unable to send emails, below are the steps followed, Please let me know if I'm missing anything, is there a debug mode for mailx? # time service sendmail restart Shutting down sm-client: Shutting... (6 Replies)
Discussion started by: lovesaikrishna
6 Replies

8. UNIX for Dummies Questions & Answers

Emails sent from Linux server are rejected by recipient

Hello i have this longterm issue which im unable to solve, i think this is quite simple issue, i hope you may know the cause It is on CentOS Redhat server with qmail installed. # service qmail status # service qmail start Starting Qmail: # ps aux | grep mail qmails 1688 0.0 0.0 ... (1 Reply)
Discussion started by: postcd
1 Replies

9. AIX

Sendmail daemon is inactive, but still i can send emails

Hi, I did setup sendmail on one of AIX LPARs. Its working as expected. But, would like to clarify something with you all. I stopped the sendmail daemon on AIX LPAR, now it is inactive(&commented it on /etc/rc.tcpip ). But still, am able to send the emails even after stopping daemon. ... (6 Replies)
Discussion started by: system.engineer
6 Replies

10. Shell Programming and Scripting

How to configure mutt to send emails on Linux.?

Hello, I am trying to use mutt in order to send emails. I have installed mutt using yum and pasted some details about it later in the post. When I try to run: echo test | mutt -s "Test Email" user@id.com It doesn't do anything. I dont receive any emails. I have the SMTP details for... (1 Reply)
Discussion started by: vaibhavraj
1 Replies
Mail::SpamAssassin::Plugin::PhishTag(3pm)		User Contributed Perl Documentation		 Mail::SpamAssassin::Plugin::PhishTag(3pm)

NAME
PhishTag - SpamAssassin plugin for redirecting links in incoming emails. SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::PhishTag trigger_ratio 0.1 trigger_target RULE_NAME http://www.antiphishing.org/consumer_recs.html DESCRIPTION
PhishTag enables administrators to rewrite links in emails that trigger certain tests, preferably anti-phishing blacklist tests. The plugin will inhibit the blocking of a portion of the emails that trigger the test by SpamAssassin, and let them pass to the users' inbox after the rewrite. It is useful in providing training to email users about company policies and general email usage. OPTIONS
The following options can be set by modifying the configuration file. o trigger_ratio percentage_value Sets the probability in percentage that a positive test will trigger the email rewrite, e.g. 0.1 will rewrite on the average 1 in 1000 emails that match the trigger. o trigger_target RULE_NAME http_url The name of the test which would trigger the email rewrite; all the URLs will be replaced by http_url. DOWNLOAD
The source of this plugin is avaliable at: http://umut.topkara.org/PhishTag/PhishTag.pm a sample configuration file is also available: http://umut.topkara.org/PhishTag/PhishTag.cf SEE ALSO
Check the list of tests performed by SpamAssassin to modify the configuration file to match your needs from http://spamassassin.apache.org/tests.html AUTHOR
Umut Topkara, 2008, <umut@topkara.org> http://umut.topkara.org COPYRIGHT AND LICENSE
This plugin is free software; you can redistribute it and/or modify it under the same terms as SpamAssassin itself, either version 3.2.4 or, at your option, any later version of SpamAssassin you may have available. perl v5.14.2 2011-06-06 Mail::SpamAssassin::Plugin::PhishTag(3pm)
All times are GMT -4. The time now is 06:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy